Skip to content

Commit 0b178aa

Browse files
committed
[jgitflow-maven-plugin] merging 'release/1.11.0' into 'master'
2 parents 7057472 + c8752a5 commit 0b178aa

55 files changed

Lines changed: 2762 additions & 170 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.travis.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,6 @@ jdk:
2626
# Make sure travis can use container-based infrastructure
2727
sudo: false
2828

29-
# Switch back to Maven 3.6.1 due to https://github.com/mojohaus/build-helper-maven-plugin/issues/81
30-
before_install:
31-
- wget https://archive.apache.org/dist/maven/maven-3/3.6.1/binaries/apache-maven-3.6.1-bin.zip
32-
- unzip -qq apache-maven-3.6.1-bin.zip
33-
- export M2_HOME=$PWD/apache-maven-3.6.1
34-
- export PATH=$M2_HOME/bin:$PATH
35-
3629
install: "mvn -s ./.travis.maven-settings.xml clean"
3730

3831
script:

Jenkinsfile

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
@Library('pipeline-library') pipelineLibrary
2+
@Library('pv-pipeline-library') pvPipelineLibrary
3+
4+
5+
import io.wcm.devops.jenkins.pipeline.ssh.SSHTarget
6+
7+
import static de.provision.devops.jenkins.pipeline.utils.ConfigConstants.*
8+
import static io.wcm.devops.jenkins.pipeline.utils.ConfigConstants.*
9+
10+
// See:
11+
// https://github.com/pro-vision/jenkins-pv-pipeline-library
12+
// https://github.com/pro-vision/jenkins-pv-pipeline-library/blob/master/docs/config-structure.md
13+
// Also have a look at https://github.com/wcm-io-devops/jenkins-pipeline-library for further configuration options
14+
15+
List triggers = defaults.getTriggers()
16+
triggers.push(githubPush())
17+
18+
Map config = [
19+
(BUILD_WRAPPER): [
20+
(BUILD_WRAPPER_SSH_TARGETS): [new SSHTarget("ssh-wcm.io")]
21+
],
22+
(PROPERTIES) : [
23+
(PROPERTIES_PIPELINE_TRIGGERS): triggers
24+
],
25+
(STAGE_COMPILE): [
26+
(MAVEN): [
27+
(MAVEN_GOALS): ["clean", "deploy", "site-deploy"],
28+
]
29+
],
30+
(STAGE_FEATURE_PREPARATION): [
31+
(STAGE_FEATURE_PREPARATION_MERGE): [
32+
(STAGE_FEATURE_PREPARATION_MERGE_ENABLED): false
33+
]
34+
]
35+
]
36+
37+
routeDefaultJenkinsFile(config)

changes.xml

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,34 @@
2020
-->
2121

2222
<document xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/changes/1.0.0"
23-
xsi:schemaLocation="http://maven.apache.org/changes/1.0.0 http://maven.apache.org/plugins/maven-changes-plugin/xsd/changes-1.0.0.xsd">
23+
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.0" date="2020-04-23">
27+
<action type="add" dev="sseifert">
28+
Add support for package properties "packageType", "requiresRoot", "requiresRestart", "allowIndexDefinitions".
29+
</action>
30+
<action type="add" dev="sseifert">
31+
Add validator for content package based on Jackrabbit FileVault Validation (for packages with a packageType set).
32+
</action>
33+
<action type="add" dev="sseifert">
34+
Add new config parameter 'cryptoSkip' that allows to skip crypto encryption in aemCryptoEncrypt expression.
35+
</action>
36+
<action type="add" dev="sseifert">
37+
conga-aem-maven-plugin: Add 'cloudmanager-all-package' goal to build combined container package for deployment with Adobe Cloud Manager.
38+
</action>
39+
<action type="add" dev="sseifert">
40+
conga-aem-maven-plugin: Add 'cloudmanager-dispatcher-config' goal to build ZIP file with dispatcher configuration for deployment with Adobe Cloud Manager.
41+
</action>
42+
<action type="update" dev="sseifert">
43+
aem-contentpackage-osgiconfig post processor: Include only generated *.config files in AEM content package, no other .content files (exception the package is empty otherwise).
44+
Automatically set 'packageType' for packages created by this post processor.
45+
</action>
46+
<action type="update" dev="sseifert">
47+
aem-contentpackage-properties post processor: Allow to override package type with contentPackage.packageType option (useful for 3rdparty packages that have no package type defined).
48+
</action>
49+
</release>
50+
2651
<release version="1.10.0" date="2020-01-30">
2752
<action type="add" dev="sseifert">
2853
conga-aem-crypto-cli: Add command line options to encrypt and decrypt values using AEM crypto support.

conga-aem-plugin/pom.xml

Lines changed: 53 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,19 @@
1919
#L%
2020
-->
2121

22-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
22+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
2323
<modelVersion>4.0.0</modelVersion>
2424

2525
<parent>
2626
<groupId>io.wcm.devops</groupId>
2727
<artifactId>io.wcm.devops.parent_toplevel</artifactId>
28-
<version>1.2.0</version>
28+
<version>1.2.2</version>
2929
<relativePath />
3030
</parent>
3131

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

3737
<name>CONGA AEM Plugin</name>
@@ -53,27 +53,61 @@
5353
<dependency>
5454
<groupId>io.wcm.devops.conga</groupId>
5555
<artifactId>io.wcm.devops.conga.generator</artifactId>
56-
<version>1.11.0</version>
56+
<version>1.13.0</version>
5757
<scope>compile</scope>
5858
</dependency>
59+
<dependency>
60+
<groupId>io.wcm.devops.conga</groupId>
61+
<artifactId>conga-maven-plugin</artifactId>
62+
<version>1.13.0</version>
63+
<scope>provided</scope>
64+
</dependency>
5965

6066
<dependency>
6167
<groupId>io.wcm.devops.conga.plugins</groupId>
6268
<artifactId>io.wcm.devops.conga.plugins.sling</artifactId>
63-
<version>1.2.6</version>
69+
<version>1.3.0</version>
70+
<scope>compile</scope>
71+
</dependency>
72+
73+
<dependency>
74+
<groupId>com.google.guava</groupId>
75+
<artifactId>guava</artifactId>
76+
<version>15.0</version>
6477
<scope>compile</scope>
6578
</dependency>
6679

80+
<dependency>
81+
<groupId>org.apache.jackrabbit</groupId>
82+
<artifactId>filevault-package-maven-plugin</artifactId>
83+
<version>1.1.2</version>
84+
<scope>compile</scope>
85+
<exclusions>
86+
<exclusion>
87+
<groupId>org.apache.maven</groupId>
88+
<artifactId>*</artifactId>
89+
</exclusion>
90+
<exclusion>
91+
<groupId>org.apache.maven.plugin-tools</groupId>
92+
<artifactId>*</artifactId>
93+
</exclusion>
94+
<exclusion>
95+
<groupId>org.sonatype.plexus</groupId>
96+
<artifactId>*</artifactId>
97+
</exclusion>
98+
</exclusions>
99+
</dependency>
100+
67101
<dependency>
68102
<groupId>io.wcm.tooling.commons</groupId>
69103
<artifactId>io.wcm.tooling.commons.content-package-builder</artifactId>
70-
<version>1.4.4</version>
104+
<version>1.5.0</version>
71105
<scope>compile</scope>
72106
</dependency>
73107
<dependency>
74108
<groupId>io.wcm.tooling.commons</groupId>
75109
<artifactId>io.wcm.tooling.commons.crx-packmgr-helper</artifactId>
76-
<version>1.6.2</version>
110+
<version>1.6.4</version>
77111
<scope>compile</scope>
78112
</dependency>
79113

@@ -93,21 +127,21 @@
93127
<dependency>
94128
<groupId>org.apache.commons</groupId>
95129
<artifactId>commons-compress</artifactId>
96-
<version>1.19</version>
130+
<version>1.20</version>
97131
<scope>compile</scope>
98132
</dependency>
99133

100134
<dependency>
101135
<groupId>org.apache.sling</groupId>
102-
<artifactId>org.apache.sling.jcr.contentparser</artifactId>
103-
<version>1.2.6</version>
136+
<artifactId>org.apache.sling.contentparser.api</artifactId>
137+
<version>2.0.0</version>
138+
<scope>compile</scope>
139+
</dependency>
140+
<dependency>
141+
<groupId>org.apache.sling</groupId>
142+
<artifactId>org.apache.sling.contentparser.json</artifactId>
143+
<version>2.0.0</version>
104144
<scope>compile</scope>
105-
<exclusions>
106-
<exclusion>
107-
<groupId>org.apache.geronimo.specs</groupId>
108-
<artifactId>geronimo-json_1.0_spec</artifactId>
109-
</exclusion>
110-
</exclusions>
111145
</dependency>
112146
<dependency>
113147
<groupId>org.apache.geronimo.specs</groupId>
@@ -143,19 +177,19 @@
143177
<dependency>
144178
<groupId>org.xmlunit</groupId>
145179
<artifactId>xmlunit-core</artifactId>
146-
<version>2.6.2</version>
180+
<version>2.6.3</version>
147181
<scope>test</scope>
148182
</dependency>
149183
<dependency>
150184
<groupId>org.xmlunit</groupId>
151185
<artifactId>xmlunit-legacy</artifactId>
152-
<version>2.6.2</version>
186+
<version>2.6.3</version>
153187
<scope>test</scope>
154188
</dependency>
155189
<dependency>
156190
<groupId>org.zeroturnaround</groupId>
157191
<artifactId>zt-zip</artifactId>
158-
<version>1.13</version>
192+
<version>1.14</version>
159193
<scope>test</scope>
160194
</dependency>
161195

conga-aem-plugin/src/main/java/io/wcm/devops/conga/plugins/aem/AemPluginConfig.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ public final class AemPluginConfig {
3434
*/
3535
public static final String PARAMETER_CRYPTO_AES_KEY_URL = "cryptoAesKeyUrl";
3636

37+
/**
38+
* Skip AES AEM crypto support, output strings that should be encrypted without encryption.
39+
*/
40+
public static final String PARAMETER_CRYPTO_SKIP = "cryptoSkip";
41+
3742
private AemPluginConfig() {
3843
// constants only
3944
}

conga-aem-plugin/src/main/java/io/wcm/devops/conga/plugins/aem/handlebars/helper/AemCryptoEncryptHelper.java

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
package io.wcm.devops.conga.plugins.aem.handlebars.helper;
2121

2222
import static io.wcm.devops.conga.plugins.aem.AemPluginConfig.PARAMETER_CRYPTO_AES_KEY_URL;
23+
import static io.wcm.devops.conga.plugins.aem.AemPluginConfig.PARAMETER_CRYPTO_SKIP;
2324
import static io.wcm.devops.conga.plugins.aem.AemPluginConfig.PLUGIN_NAME;
2425

2526
import java.io.IOException;
@@ -29,6 +30,7 @@
2930
import java.util.Map;
3031

3132
import org.apache.commons.io.IOUtils;
33+
import org.apache.commons.lang3.BooleanUtils;
3234
import org.apache.commons.lang3.StringUtils;
3335

3436
import com.github.jknack.handlebars.Options;
@@ -65,20 +67,32 @@ public Object apply(Object context, Options options, HelperContext pluginContext
6567
return null;
6668
}
6769

68-
// Skip encryption if already encrypted
70+
// read crypto config parameter
71+
String cryptoAesKeyUrl = null;
72+
boolean cryptoSkip = false;
73+
Map<String, Object> aemPluginConfig = pluginContext.getGenericPluginConfig().get(PLUGIN_NAME);
74+
if (aemPluginConfig != null) {
75+
cryptoAesKeyUrl = (String)aemPluginConfig.get(PARAMETER_CRYPTO_AES_KEY_URL);
76+
Object cryptoSkipObject = aemPluginConfig.get(PARAMETER_CRYPTO_SKIP);
77+
if (cryptoSkipObject != null) {
78+
if (cryptoSkipObject instanceof Boolean) {
79+
cryptoSkip = (Boolean)cryptoSkipObject;
80+
}
81+
else {
82+
cryptoSkip = BooleanUtils.toBoolean(cryptoSkipObject.toString());
83+
}
84+
}
85+
}
86+
87+
// Skip encryption if configured, or if value is already encrypted
6988
String input = context.toString();
70-
if (CryptoString.isCryptoString(input)) {
89+
if (cryptoSkip || CryptoString.isCryptoString(input)) {
7190
return input;
7291
}
7392

7493
byte[] cryptoKeyData;
7594
try {
7695
// get urls to crypto keys
77-
String cryptoAesKeyUrl = null;
78-
Map<String, Object> aemPluginConfig = pluginContext.getGenericPluginConfig().get(PLUGIN_NAME);
79-
if (aemPluginConfig != null) {
80-
cryptoAesKeyUrl = (String)aemPluginConfig.get(PARAMETER_CRYPTO_AES_KEY_URL);
81-
}
8296
if (StringUtils.isBlank(cryptoAesKeyUrl)) {
8397
throw new IOException("Unable to encrypto string with AEM crypto keys: "
8498
+ "Please add plugin configuration: '" + PLUGIN_NAME + ";" + PARAMETER_CRYPTO_AES_KEY_URL + "=/path/to/master");

conga-aem-plugin/src/main/java/io/wcm/devops/conga/plugins/aem/postprocessor/ContentPackageOptions.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,4 +83,24 @@ private ContentPackageOptions() {
8383
*/
8484
public static final String PROPERTY_PACKAGE_PROPERTIES = "contentPackage.properties";
8585

86+
/**
87+
* Defines content package type (for package validation).
88+
*/
89+
public static final String PROPERTY_PACKAGE_PACKAGE_TYPE = "contentPackage.packageType";
90+
91+
/**
92+
* Package requires root.
93+
*/
94+
public static final String PROPERTY_PACKAGE_REQUIRES_ROOT = "contentPackage.requiresRoot";
95+
96+
/**
97+
* Package requires restart.
98+
*/
99+
public static final String PROPERTY_PACKAGE_REQUIRES_RESTART = "contentPackage.requiresRestart";
100+
101+
/**
102+
* Package allows index definitions.
103+
*/
104+
public static final String PROPERTY_PACKAGE_ALLOW_INDEX_DEFINITIONS = "contentPackage.allowIndexDefinitions";
105+
86106
}

0 commit comments

Comments
 (0)