Skip to content

Commit c9a66ce

Browse files
committed
Merge branch 'develop' into master
2 parents c25ff34 + d8e7373 commit c9a66ce

21 files changed

Lines changed: 550 additions & 198 deletions

File tree

changes.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@
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.14.6" date="2021-06-27">
27+
<action type="update" dev="sseifert">
28+
conga-aem-maven-plugin:cloudmanager-all-package: Extract nested sub packages and treat them in the same way as the other packages (managing dependencies and run modes).
29+
</action>
30+
</release>
31+
2632
<release version="1.14.4" date="2021-06-08">
2733
<action type="update" dev="sseifert">
2834
Update to latest AEM Content Package Builder.

conga-aem-plugin/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@
2525
<parent>
2626
<groupId>io.wcm.devops.conga.plugins</groupId>
2727
<artifactId>io.wcm.devops.conga.plugins.aem.parent</artifactId>
28-
<version>1.14.4</version>
28+
<version>1.14.6</version>
2929
<relativePath>../parent/pom.xml</relativePath>
3030
</parent>
3131

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

3737
<name>CONGA AEM Plugin</name>

conga-aem-plugin/src/main/java/io/wcm/devops/conga/plugins/aem/crypto/impl/AesCryptoSupport.java

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import java.nio.ByteBuffer;
2323
import java.security.GeneralSecurityException;
2424
import java.security.Key;
25+
import java.security.NoSuchAlgorithmException;
2526
import java.security.SecureRandom;
2627
import java.util.Random;
2728

@@ -30,6 +31,7 @@
3031
import javax.crypto.spec.IvParameterSpec;
3132
import javax.crypto.spec.SecretKeySpec;
3233

34+
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
3335
import io.wcm.devops.conga.plugins.aem.crypto.CryptoSupport;
3436

3537
/**
@@ -45,13 +47,15 @@ public class AesCryptoSupport extends CryptoSupport {
4547

4648
private static final String SECURE_RANDOM_ALGORITHM = "SHA1PRNG";
4749

48-
private final Random random;
50+
private static final Random RANDOM = initRandom();
4951

50-
/**
51-
* @throws GeneralSecurityException Security exception
52-
*/
53-
public AesCryptoSupport() throws GeneralSecurityException {
54-
this.random = SecureRandom.getInstance(SECURE_RANDOM_ALGORITHM);
52+
private static Random initRandom() {
53+
try {
54+
return SecureRandom.getInstance(SECURE_RANDOM_ALGORITHM);
55+
}
56+
catch (NoSuchAlgorithmException ex) {
57+
throw new RuntimeException(ex);
58+
}
5559
}
5660

5761
@Override
@@ -91,9 +95,10 @@ private Cipher getCipher(int cipherMode, byte[] iv, Key key) throws GeneralSecur
9195
return cipher;
9296
}
9397

98+
@SuppressFBWarnings("DMI_RANDOM_USED_ONLY_ONCE")
9499
private byte[] generateIV() {
95100
byte[] iv = new byte[IV_SIZE];
96-
random.nextBytes(iv);
101+
RANDOM.nextBytes(iv);
97102
return iv;
98103
}
99104

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.13.1-SNAPSHOT</version>
68+
<version>1.14.5-SNAPSHOT</version>
6969
</dependency>
7070

7171
</dependencies>

parent/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@
2525
<parent>
2626
<groupId>io.wcm.devops</groupId>
2727
<artifactId>io.wcm.devops.parent_toplevel</artifactId>
28-
<version>1.2.6</version>
28+
<version>1.2.8</version>
2929
<relativePath />
3030
</parent>
3131

3232
<groupId>io.wcm.devops.conga.plugins</groupId>
3333
<artifactId>io.wcm.devops.conga.plugins.aem.parent</artifactId>
34-
<version>1.14.4</version>
34+
<version>1.14.6</version>
3535
<packaging>pom</packaging>
3636

3737
<name>CONGA AEM Plugin</name>

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@
2323
<parent>
2424
<groupId>io.wcm.devops.conga.plugins</groupId>
2525
<artifactId>io.wcm.devops.conga.plugins.aem.parent</artifactId>
26-
<version>1.14.4</version>
26+
<version>1.14.6</version>
2727
<relativePath>parent/pom.xml</relativePath>
2828
</parent>
2929

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

3535
<name>CONGA AEM Plugin</name>

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@
2525
<parent>
2626
<groupId>io.wcm.devops.conga.plugins</groupId>
2727
<artifactId>io.wcm.devops.conga.plugins.aem.parent</artifactId>
28-
<version>1.14.4</version>
28+
<version>1.14.6</version>
2929
<relativePath>../../parent/pom.xml</relativePath>
3030
</parent>
3131

3232
<groupId>io.wcm.devops.conga.plugins</groupId>
3333
<artifactId>conga-aem-crypto-cli</artifactId>
3434
<packaging>jar</packaging>
35-
<version>1.14.4</version>
35+
<version>1.14.6</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.14.4</version>
45+
<version>1.14.6</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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@
2525
<parent>
2626
<groupId>io.wcm.devops.conga.plugins</groupId>
2727
<artifactId>io.wcm.devops.conga.plugins.aem.parent</artifactId>
28-
<version>1.14.4</version>
28+
<version>1.14.6</version>
2929
<relativePath>../../parent/pom.xml</relativePath>
3030
</parent>
3131

3232
<groupId>io.wcm.devops.conga.plugins</groupId>
3333
<artifactId>conga-aem-maven-plugin</artifactId>
3434
<packaging>maven-plugin</packaging>
35-
<version>1.14.4</version>
35+
<version>1.14.6</version>
3636

3737
<name>CONGA AEM Maven Plugin</name>
3838
<description>wcm.io DevOps CONGA - CONfiguration GenerAtor Maven Plugin for AEM</description>
@@ -56,7 +56,7 @@
5656
<dependency>
5757
<groupId>io.wcm.devops.conga.plugins</groupId>
5858
<artifactId>io.wcm.devops.conga.plugins.aem</artifactId>
59-
<version>1.14.4</version>
59+
<version>1.14.6</version>
6060
<scope>compile</scope>
6161
</dependency>
6262
<dependency>

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ private AllPackageBuilder createBuilder(String packageName) {
216216

217217
private void buildAllPackage(AllPackageBuilder builder) throws MojoExecutionException {
218218
try {
219+
getLog().debug("Start generating " + getCanonicalPath(builder.getTargetFile()) + "...");
219220
if (builder.build(properties)) {
220221
getLog().info("Generated " + getCanonicalPath(builder.getTargetFile()));
221222
if (attachArtifact) {
@@ -239,7 +240,7 @@ private void visitEnvironmentsNodes(EnvironmentNodeVisitor visitor) throws MojoE
239240
for (File nodeDir : nodeDirs) {
240241
Set<String> cloudManagerTarget = modelParser.getCloudManagerTarget(nodeDir);
241242
if (!cloudManagerTarget.contains(CLOUDMANAGER_TARGET_NONE)) {
242-
List<ContentPackageFile> contentPackages = modelParser.getContentPackagesForNode(nodeDir);
243+
List<? extends ContentPackageFile> contentPackages = modelParser.getContentPackagesForNode(nodeDir);
243244
visitor.visit(environmentDir, nodeDir, cloudManagerTarget, contentPackages);
244245
}
245246
}
@@ -248,7 +249,7 @@ private void visitEnvironmentsNodes(EnvironmentNodeVisitor visitor) throws MojoE
248249

249250
interface EnvironmentNodeVisitor {
250251
void visit(File environmentDir, File nodeDir, Set<String> cloudManagerTarget,
251-
List<ContentPackageFile> contentPackages) throws MojoExecutionException, MojoFailureException;
252+
List<? extends ContentPackageFile> contentPackages) throws MojoExecutionException, MojoFailureException;
252253
}
253254

254255
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
import org.apache.maven.plugins.annotations.Mojo;
3131
import org.apache.maven.plugins.annotations.Parameter;
3232

33-
import io.wcm.devops.conga.plugins.aem.maven.model.ContentPackageFile;
33+
import io.wcm.devops.conga.plugins.aem.maven.model.ModelContentPackageFile;
3434
import io.wcm.devops.conga.plugins.aem.maven.model.ModelParser;
3535
import io.wcm.tooling.commons.packmgr.install.PackageFile;
3636
import io.wcm.tooling.commons.packmgr.install.PackageInstaller;
@@ -102,7 +102,7 @@ public void execute() throws MojoExecutionException, MojoFailureException {
102102
}
103103
}
104104

105-
private PackageFile toPackageFile(ContentPackageFile item) {
105+
private PackageFile toPackageFile(ModelContentPackageFile item) {
106106
PackageFile output = new PackageFile();
107107

108108
output.setFile(item.getFile());

0 commit comments

Comments
 (0)