Skip to content

Commit c89be01

Browse files
committed
[jgitflow-maven-plugin] merging 'release/1.11.2' into 'master'
2 parents 0b178aa + 86f3cc3 commit c89be01

10 files changed

Lines changed: 42 additions & 15 deletions

File tree

changes.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,15 @@
2323
xsi:schemaLocation="http://maven.apache.org/changes/1.0.0 https://maven.apache.org/plugins/maven-changes-plugin/xsd/changes-1.0.0.xsd">
2424
<body>
2525

26+
<release version="1.11.2" date="2020-04-28">
27+
<action type="update" dev="sseifert">
28+
conga-aem-maven-plugin: Allow to defined custom package properties for 'cloudmanager-all-package' goal.
29+
</action>
30+
<action type="fix" dev="sseifert">
31+
Fail content package build when node or property names contains illegal characters (not following JCR standards).
32+
</action>
33+
</release>
34+
2635
<release version="1.11.0" date="2020-04-23">
2736
<action type="add" dev="sseifert">
2837
Add support for package properties "packageType", "requiresRoot", "requiresRestart", "allowIndexDefinitions".

conga-aem-plugin/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232
<groupId>io.wcm.devops.conga.plugins</groupId>
3333
<artifactId>io.wcm.devops.conga.plugins.aem</artifactId>
34-
<version>1.11.0</version>
34+
<version>1.11.2</version>
3535
<packaging>jar</packaging>
3636

3737
<name>CONGA AEM Plugin</name>
@@ -101,7 +101,7 @@
101101
<dependency>
102102
<groupId>io.wcm.tooling.commons</groupId>
103103
<artifactId>io.wcm.tooling.commons.content-package-builder</artifactId>
104-
<version>1.5.0</version>
104+
<version>1.5.2</version>
105105
<scope>compile</scope>
106106
</dependency>
107107
<dependency>

example/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
<dependency>
6666
<groupId>io.wcm.devops.conga.plugins</groupId>
6767
<artifactId>io.wcm.devops.conga.plugins.aem</artifactId>
68-
<version>1.10.1-SNAPSHOT</version>
68+
<version>1.11.1-SNAPSHOT</version>
6969
</dependency>
7070

7171
</dependencies>

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
<groupId>io.wcm.devops.conga.plugins</groupId>
3131
<artifactId>io.wcm.devops.conga.plugins.aem.root</artifactId>
32-
<version>1.11.0</version>
32+
<version>1.11.2</version>
3333
<packaging>pom</packaging>
3434

3535
<name>CONGA AEM Plugin</name>

tooling/conga-aem-crypto-cli/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
<groupId>io.wcm.devops.conga.plugins</groupId>
3333
<artifactId>conga-aem-crypto-cli</artifactId>
3434
<packaging>jar</packaging>
35-
<version>1.11.0</version>
35+
<version>1.11.2</version>
3636

3737
<name>CONGA AEM Crypto Command Line Interface</name>
3838
<description>Command line tool to generate Crypto keys for AEM.</description>
@@ -42,7 +42,7 @@
4242
<dependency>
4343
<groupId>io.wcm.devops.conga.plugins</groupId>
4444
<artifactId>io.wcm.devops.conga.plugins.aem</artifactId>
45-
<version>1.11.0</version>
45+
<version>1.11.2</version>
4646
<scope>compile</scope>
4747
<exclusions>
4848
<!-- Exclude all deps - only crypto util classes are used -->

tooling/conga-aem-maven-plugin/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
<groupId>io.wcm.devops.conga.plugins</groupId>
3333
<artifactId>conga-aem-maven-plugin</artifactId>
3434
<packaging>maven-plugin</packaging>
35-
<version>1.11.0</version>
35+
<version>1.11.2</version>
3636

3737
<name>CONGA AEM Maven Plugin</name>
3838
<description>wcm.io DevOps CONGA - CONfiguration GenerAtor Maven Plugin for AEM</description>
@@ -57,7 +57,7 @@
5757
<dependency>
5858
<groupId>io.wcm.devops.conga.plugins</groupId>
5959
<artifactId>io.wcm.devops.conga.plugins.aem</artifactId>
60-
<version>1.11.0</version>
60+
<version>1.11.2</version>
6161
<scope>compile</scope>
6262
</dependency>
6363
<dependency>

tooling/conga-aem-maven-plugin/src/main/java/io/wcm/devops/conga/plugins/aem/maven/CloudManagerAllPackageMojo.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import java.io.File;
2525
import java.io.IOException;
2626
import java.util.List;
27+
import java.util.Map;
2728
import java.util.Set;
2829

2930
import org.apache.maven.plugin.MojoExecutionException;
@@ -66,6 +67,12 @@ public final class CloudManagerAllPackageMojo extends AbstractCloudManagerMojo {
6667
@Parameter(property = "conga.cloudManager.allPackage.autoDependenciesSeparateMutable", defaultValue = "false")
6768
private boolean autoDependenciesSeparateMutable;
6869

70+
/**
71+
* Specifies additional properties to be set in the properties.xml file.
72+
*/
73+
@Parameter
74+
private Map<String, String> properties;
75+
6976
/**
7077
* Set this to "true" to skip installing packages to CRX although configured in the POM.
7178
*/
@@ -107,7 +114,7 @@ private void buildAllPackage(File environmentDir, File nodeDir, Set<String> clou
107114
.logger(getLog());
108115

109116
try {
110-
if (builder.build(contentPackages, cloudManagerTarget)) {
117+
if (builder.build(contentPackages, cloudManagerTarget, properties)) {
111118
getLog().info("Generated " + getCanonicalPath(targetFile));
112119
}
113120
else {

tooling/conga-aem-maven-plugin/src/main/java/io/wcm/devops/conga/plugins/aem/maven/allpackage/AllPackageBuilder.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
import java.util.ArrayList;
3232
import java.util.Enumeration;
3333
import java.util.List;
34+
import java.util.Map;
3435
import java.util.Properties;
3536
import java.util.Set;
3637
import java.util.stream.Collectors;
@@ -119,10 +120,12 @@ private Log getLog() {
119120
* Build "all" content package.
120121
* @param contentPackages Content packages (invalid will be filtered out)
121122
* @param cloudManagerTarget Target environments/run modes the packages should be attached to
123+
* @param properties Specifies additional properties to be set in the properties.xml file.
122124
* @return true if "all" package was generated, false if not valid package was found.
123125
* @throws IOException I/O exception
124126
*/
125-
public boolean build(List<ContentPackageFile> contentPackages, Set<String> cloudManagerTarget) throws IOException {
127+
public boolean build(List<ContentPackageFile> contentPackages,
128+
Set<String> cloudManagerTarget, Map<String, String> properties) throws IOException {
126129

127130
// collect list of cloud manager environment run modes
128131
List<String> environmentRunmodes = new ArrayList<>();
@@ -168,6 +171,11 @@ public boolean build(List<ContentPackageFile> contentPackages, Set<String> cloud
168171
String rootPath = buildRootPath(groupName, packageName);
169172
builder.filter(new PackageFilter(rootPath));
170173

174+
// additional package properties
175+
if (properties != null) {
176+
properties.entrySet().forEach(entry -> builder.property(entry.getKey(), entry.getValue()));
177+
}
178+
171179
// build content package
172180
// if auto dependencies is active: build separate "dependency chains" between mutable and immutable packages
173181
try (ContentPackage contentPackage = builder.build(targetFile)) {

tooling/conga-aem-maven-plugin/src/test/java/io/wcm/devops/conga/plugins/aem/maven/allpackage/AllPackageBuilderMixedPackageTypeTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ void testBuild() throws Exception {
6060

6161
// should fail to to "mixed" packageType
6262
assertThrows(IOException.class, () -> {
63-
builder.build(contentPackages, ImmutableSet.of());
63+
builder.build(contentPackages, ImmutableSet.of(), null);
6464
});
6565
}
6666

tooling/conga-aem-maven-plugin/src/test/java/io/wcm/devops/conga/plugins/aem/maven/allpackage/AllPackageBuilderTest.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
import org.w3c.dom.Document;
4141
import org.zeroturnaround.zip.ZipUtil;
4242

43+
import com.google.common.collect.ImmutableMap;
4344
import com.google.common.collect.ImmutableSet;
4445

4546
import io.wcm.devops.conga.plugins.aem.maven.model.ContentPackageFile;
@@ -54,7 +55,9 @@ class AllPackageBuilderTest {
5455
@BeforeEach
5556
void setUp(TestInfo testInfo) throws IOException {
5657
nodeDir = new File("src/test/resources/node");
57-
targetDir = new File("target/test-" + getClass().getSimpleName() + "_" + testInfo.getDisplayName());
58+
targetDir = new File("target/test-" + getClass().getSimpleName()
59+
+ (testInfo.getTestMethod().isPresent() ? "_" + testInfo.getTestMethod().get().getName() : ":")
60+
+ "_" + testInfo.getDisplayName());
5861
targetUnpackDir = new File(targetDir, "unpack");
5962
FileUtils.deleteDirectory(targetDir);
6063
targetDir.mkdirs();
@@ -76,7 +79,7 @@ void testBuild(Set<String> cloudManagerTarget, String[] expectedEnvironmentDirs)
7679
File targetFile = new File(targetDir, "all.zip");
7780

7881
AllPackageBuilder builder = new AllPackageBuilder(targetFile, "test-group", "test-pkg");
79-
assertTrue(builder.build(contentPackages, cloudManagerTarget));
82+
assertTrue(builder.build(contentPackages, cloudManagerTarget, ImmutableMap.of("prop1", "value1")));
8083

8184
ZipUtil.unpack(targetFile, targetUnpackDir);
8285

@@ -123,7 +126,7 @@ void testBuildWithAutoDependencies(Set<String> cloudManagerTarget, String[] expe
123126

124127
AllPackageBuilder builder = new AllPackageBuilder(targetFile, "test-group", "test-pkg")
125128
.autoDependencies(true);
126-
assertTrue(builder.build(contentPackages, cloudManagerTarget));
129+
assertTrue(builder.build(contentPackages, cloudManagerTarget, null));
127130

128131
ZipUtil.unpack(targetFile, targetUnpackDir);
129132

@@ -175,7 +178,7 @@ void testBuildWithAutoDependenciesSeparateMutable(Set<String> cloudManagerTarget
175178
AllPackageBuilder builder = new AllPackageBuilder(targetFile, "test-group", "test-pkg")
176179
.autoDependencies(true)
177180
.autoDependenciesSeparateMutable(true);
178-
assertTrue(builder.build(contentPackages, cloudManagerTarget));
181+
assertTrue(builder.build(contentPackages, cloudManagerTarget, null));
179182

180183
ZipUtil.unpack(targetFile, targetUnpackDir);
181184

0 commit comments

Comments
 (0)