diff --git a/HISTORY b/HISTORY index 80121cdf..37b54c34 100644 --- a/HISTORY +++ b/HISTORY @@ -1,3 +1,8 @@ +2020-10-07 3.3.0 + - Allow to change primary type + - Documentation and example updates + - Fixed issue with UnsupportedOperationException (#136) + 2020-06-30 3.2.0 - Allow to limit access to AECU via group permissions. Attention: This requires configuration for non-admin users. - Autocomplete added, all AECU methods are listed. diff --git a/Readme.md b/Readme.md index fac2782c..a9cc4d95 100644 --- a/Readme.md +++ b/Readme.md @@ -38,7 +38,9 @@ Table of contents 3. [Group Specification](#test_group_spec) 4. [Tests](#test_list) 5. [Execute Tests](#test_execution) -7. [Limit Access to AECU](#limitAccess) +7. [Security](#security) + 1. [Limit Access to AECU](#limitAccess) + 2. [Service Users](#serviceUsers) 8. [JMX Interface](#jmx) 9. [Health Checks](#healthchecks) 10. [API Documentation](#api) @@ -63,7 +65,7 @@ AECU requires Java 8 and AEM 6.4 or above. For AEM 6.3 please install the last 1 # Installation -You can download the package from [Maven Central](http://repo1.maven.org/maven2/de/valtech/aecu/aecu.ui.apps/) or our [releases section](https://github.com/valtech/aem-easy-content-upgrade/releases). The aecu.ui.apps package will install the AECU software. It requires that you installed [Groovy Console](https://github.com/OlsonDigital/aem-groovy-console) before. +You can download the package from [Maven Central](https://repo1.maven.org/maven2/de/valtech/aecu/aecu.ui.apps/) or our [releases section](https://github.com/valtech/aem-easy-content-upgrade/releases). The aecu.ui.apps package will install the AECU software. It requires that you installed [Groovy Console](https://github.com/OlsonDigital/aem-groovy-console) before. ```xml @@ -80,7 +82,7 @@ You can download the package from [Maven Central](http://repo1.maven.org/maven2/ ## Bundle Installation To simplify installation we provide a bundle package that already includes the Groovy Console. This makes sure there are no compatibility issues. -The package is also available on [Maven Central](http://repo1.maven.org/maven2/de/valtech/aecu/aecu.bundle/) or our [releases section](https://github.com/valtech/aem-easy-content-upgrade/releases). +The package is also available on [Maven Central](https://repo1.maven.org/maven2/de/valtech/aecu/aecu.bundle/) or our [releases section](https://github.com/valtech/aem-easy-content-upgrade/releases). ```xml @@ -412,6 +414,7 @@ You can replace the content of String properties. This also supports multi-value * doReplaceValueInProperties(String oldValue, String newValue, String[] propertyNames): replaces the substring "oldValue" with "newValue". Applies to all specified String properties * doReplaceValueInAllPropertiesRegex(String searchRegex, String replacement): checks if the property value(s) match the search pattern and replaces it with "replacement". Applies to all String properties. You can use group references such as $1 (hint: "$" needs to be escaped with "\" in Groovy). * doReplaceValueInPropertiesRegex(String searchRegex, String replacement, String[] propertyNames): checks if the property value(s) match the search pattern and replaces it with "replacement". Applies to specified String properties. You can use group references such as $1 (hint: "$" needs to be escaped with "\" in Groovy). +* doChangePrimaryType(String newPrimaryType) (since 3.3.0): changes primary type of the resource to the given primary type ```java aecu.contentUpgradeBuilder() @@ -421,6 +424,7 @@ aecu.contentUpgradeBuilder() .doReplaceValueInProperties("old", "new", (String[]) ["propertyName1", "propertyName2"]) .doReplaceValueInAllPropertiesRegex("/content/([^/]+)/(.*)", "/content/newSub/\$2") .doReplaceValueInPropertiesRegex("/content/([^/]+)/(.*)", "/content/newSub/\$2", (String[]) ["propertyName1", "propertyName2"]) + .doChangePrimaryType("nt:unstructured") .run() ``` @@ -855,9 +859,13 @@ aecu ``` + + +# Security + -# Limit Access to AECU (since 3.2) +## Limit Access to AECU (since 3.2) For production systems it is recommended to limit the access to specific user groups. This can be done via OSGI configuration. Here you can specify groups for read and execute access. @@ -867,6 +875,18 @@ PID for OSGI config: de.valtech.aecu.core.security.AccessValidationService + + +## Service Users +The following service users are installed by AECU: + +| User | Rights | Description | +| ------------- | -------------- | --------- | +| aecu-admin | /: jcr:all | Validation of access rights, JMX executeWithHistory() to store script history | +| aecu-content-migrator | /: jcr:read
/apps: jcr:all
/conf: jcr:all
/content: jcr:all
/etc: jcr:all
/home: jcr:all
/var: jcr:all | Content changes using aecu binding | +| aecu-service | /: jcr:read
/var/aecu: jcr:all | AECU execution history | + + @@ -891,6 +911,12 @@ This will execute the given script or folder. If a folder is specified then all Parameters: * Path: file or folder to execute + +Sample curl call: + +``` +curl -u admin:admin 'http://localhost:5902/system/console/jmx/de.valtech%3Atype%3DAECU/op/executeWithHistory/java.lang.String' --data-raw 'Path=/var/groovyconsole/scripts/aecu' +``` ## GetHistory diff --git a/api/pom.xml b/api/pom.xml index 767bf95e..39d6ba00 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -4,7 +4,7 @@ de.valtech.aecu aecu - 3.2.0 + 3.3.0 aecu.api diff --git a/api/src/main/java/de/valtech/aecu/api/groovy/console/bindings/ContentUpgrade.java b/api/src/main/java/de/valtech/aecu/api/groovy/console/bindings/ContentUpgrade.java index c9517b2c..4b136ce0 100644 --- a/api/src/main/java/de/valtech/aecu/api/groovy/console/bindings/ContentUpgrade.java +++ b/api/src/main/java/de/valtech/aecu/api/groovy/console/bindings/ContentUpgrade.java @@ -305,6 +305,14 @@ public interface ContentUpgrade { */ ContentUpgrade doReplaceValueInPropertiesRegex(String searchRegex, String replacement, String[] propertyNames); + /** + * Changes jcr:primaryType. + * + * @param newPrimaryType jcr:primaryType value + * @return upgrade object + **/ + ContentUpgrade doChangePrimaryType(String newPrimaryType); + /** * Renames a resource to the given name. * diff --git a/api/src/main/java/de/valtech/aecu/api/groovy/console/bindings/package-info.java b/api/src/main/java/de/valtech/aecu/api/groovy/console/bindings/package-info.java index 3560675c..067546ac 100644 --- a/api/src/main/java/de/valtech/aecu/api/groovy/console/bindings/package-info.java +++ b/api/src/main/java/de/valtech/aecu/api/groovy/console/bindings/package-info.java @@ -22,7 +22,7 @@ * * @author Roxana Muresan */ -@Version("4.2.0") +@Version("4.3.0") package de.valtech.aecu.api.groovy.console.bindings; import org.osgi.annotation.versioning.Version; diff --git a/bundle/pom.xml b/bundle/pom.xml index 7df26ac8..7b4bbc2e 100644 --- a/bundle/pom.xml +++ b/bundle/pom.xml @@ -5,7 +5,7 @@ de.valtech.aecu aecu - 3.2.0 + 3.3.0 aecu.bundle diff --git a/bundle/src/main/content/META-INF/vault/definition/.content.xml b/bundle/src/main/content/META-INF/vault/definition/.content.xml new file mode 100644 index 00000000..2edc22d8 --- /dev/null +++ b/bundle/src/main/content/META-INF/vault/definition/.content.xml @@ -0,0 +1,20 @@ + + + + + \ No newline at end of file diff --git a/core/pom.xml b/core/pom.xml index 1fc1c79f..98e8f940 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -4,7 +4,7 @@ de.valtech.aecu aecu - 3.2.0 + 3.3.0 aecu.core diff --git a/core/src/main/java/de/valtech/aecu/core/groovy/console/bindings/actions/resource/ChangePrimaryType.java b/core/src/main/java/de/valtech/aecu/core/groovy/console/bindings/actions/resource/ChangePrimaryType.java new file mode 100644 index 00000000..d0bb98d4 --- /dev/null +++ b/core/src/main/java/de/valtech/aecu/core/groovy/console/bindings/actions/resource/ChangePrimaryType.java @@ -0,0 +1,43 @@ +package de.valtech.aecu.core.groovy.console.bindings.actions.resource; + +import javax.annotation.Nonnull; +import javax.jcr.Node; +import javax.jcr.RepositoryException; + +import org.apache.sling.api.resource.PersistenceException; +import org.apache.sling.api.resource.Resource; + +import de.valtech.aecu.core.groovy.console.bindings.actions.Action; + +/** + * Changes the jcr:primaryType of a node. + * + * @author Sajith + */ +public class ChangePrimaryType implements Action { + + protected String newPrimaryType; + + /** + * Constructor + * + * @param newPrimaryType new type + */ + public ChangePrimaryType(@Nonnull String newPrimaryType) { + this.newPrimaryType = newPrimaryType; + } + + @Override + public String doAction(@Nonnull Resource resource) throws PersistenceException { + Node node = resource.adaptTo(Node.class); + try { + if (null != node) { + node.setPrimaryType(newPrimaryType); + return "Updated jcr:primaryType to " + newPrimaryType; + } + } catch (RepositoryException e) { + throw new PersistenceException("ERROR: could not update jcr:primaryType to " + newPrimaryType, e); + } + return "WARNING: could not update jcr:primaryType to " + newPrimaryType; + } +} diff --git a/core/src/main/java/de/valtech/aecu/core/groovy/console/bindings/impl/ContentUpgradeImpl.java b/core/src/main/java/de/valtech/aecu/core/groovy/console/bindings/impl/ContentUpgradeImpl.java index a1a95da6..3ad9dbee 100644 --- a/core/src/main/java/de/valtech/aecu/core/groovy/console/bindings/impl/ContentUpgradeImpl.java +++ b/core/src/main/java/de/valtech/aecu/core/groovy/console/bindings/impl/ContentUpgradeImpl.java @@ -70,6 +70,7 @@ import de.valtech.aecu.core.groovy.console.bindings.actions.properties.MovePropertyToRelativePath; import de.valtech.aecu.core.groovy.console.bindings.actions.properties.RenameProperty; import de.valtech.aecu.core.groovy.console.bindings.actions.properties.SetProperty; +import de.valtech.aecu.core.groovy.console.bindings.actions.resource.ChangePrimaryType; import de.valtech.aecu.core.groovy.console.bindings.actions.resource.CopyResourceToRelativePath; import de.valtech.aecu.core.groovy.console.bindings.actions.resource.CreateResource; import de.valtech.aecu.core.groovy.console.bindings.actions.resource.CustomAction; @@ -218,7 +219,7 @@ private void addFilter(@Nonnull FilterBy filter) { if (this.filter instanceof ANDFilter) { ((ANDFilter) this.filter).addFilter(filter); } - ANDFilter newFilter = new ANDFilter(Arrays.asList(this.filter, filter)); + ANDFilter newFilter = new ANDFilter(new ArrayList(Arrays.asList(this.filter, filter))); this.filter = newFilter; } @@ -315,6 +316,12 @@ public ContentUpgrade doReplaceValueInPropertiesRegex(String searchRegex, String return this; } + @Override + public ContentUpgrade doChangePrimaryType(@Nonnull String newPrimaryType) { + actions.add(new ChangePrimaryType(newPrimaryType)); + return this; + } + @Override public ContentUpgrade doRename(String newName) { actions.add(new RenameResource(context.getResolver(), newName)); diff --git a/core/src/test/java/de/valtech/aecu/core/groovy/console/bindings/actions/resource/ChangePrimaryTypeTest.java b/core/src/test/java/de/valtech/aecu/core/groovy/console/bindings/actions/resource/ChangePrimaryTypeTest.java new file mode 100644 index 00000000..5aed63fa --- /dev/null +++ b/core/src/test/java/de/valtech/aecu/core/groovy/console/bindings/actions/resource/ChangePrimaryTypeTest.java @@ -0,0 +1,58 @@ +package de.valtech.aecu.core.groovy.console.bindings.actions.resource; + +import org.apache.sling.api.resource.PersistenceException; +import org.apache.sling.api.resource.Resource; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.Mock; +import org.mockito.junit.MockitoJUnitRunner; + +import javax.jcr.Node; +import javax.jcr.RepositoryException; +import javax.jcr.lock.LockException; +import javax.jcr.nodetype.ConstraintViolationException; +import javax.jcr.nodetype.NoSuchNodeTypeException; +import javax.jcr.version.VersionException; + +import static org.junit.Assert.*; +import static org.mockito.Mockito.*; + +/** + * Tests ChangePrimaryTypeTest + * + * @author Sajith + */ + +@RunWith(MockitoJUnitRunner.class) +public class ChangePrimaryTypeTest { + + private static final String newPrimaryType = "nt:unstructured"; + + @Mock + private Resource resource; + + @Mock + private Node node; + + @Before + public void setup() { + when(resource.adaptTo(Node.class)).thenReturn(node); + } + + @Test + public void test_doAction_setPrimaryType() throws PersistenceException, RepositoryException { + ChangePrimaryType changePrimaryType = new ChangePrimaryType(newPrimaryType); + String result = changePrimaryType.doAction(resource); + verify(node, times(1)).setPrimaryType(newPrimaryType); + assertEquals("Updated jcr:primaryType to " + newPrimaryType, result); + } + + @Test + public void test_doAction_nodeIsNull() throws PersistenceException, RepositoryException { + when(resource.adaptTo(Node.class)).thenReturn(null); + ChangePrimaryType changePrimaryType = new ChangePrimaryType(newPrimaryType); + changePrimaryType.doAction(resource); + verify(node, never()).setPrimaryType(newPrimaryType); + } +} diff --git a/examples/pom.xml b/examples/pom.xml index 0c09dfa2..d2b796a7 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -5,7 +5,7 @@ de.valtech.aecu aecu - 3.2.0 + 3.3.0 aecu.examples diff --git a/examples/src/main/content/META-INF/vault/definition/.content.xml b/examples/src/main/content/META-INF/vault/definition/.content.xml new file mode 100644 index 00000000..2edc22d8 --- /dev/null +++ b/examples/src/main/content/META-INF/vault/definition/.content.xml @@ -0,0 +1,20 @@ + + + + + \ No newline at end of file diff --git a/examples/src/main/content/jcr_root/var/groovyconsole/scripts/aecu/aecu-examples/advanced-filter/advanced-filter.groovy b/examples/src/main/content/jcr_root/var/groovyconsole/scripts/aecu/aecu-examples/advanced-filter/advanced-filter.groovy new file mode 100644 index 00000000..0e32f08e --- /dev/null +++ b/examples/src/main/content/jcr_root/var/groovyconsole/scripts/aecu/aecu-examples/advanced-filter/advanced-filter.groovy @@ -0,0 +1,13 @@ +def complexFilter = new ORFilter( + [ new FilterByProperty("sling:resourceType", "weretail/components/content/heroimage"), + new ANDFilter( [ + new FilterByProperty("sling:resourceType", "weretail/components/content/image"), + new FilterByNodeName("image") + ] ) + ]) + +aecu.contentUpgradeBuilder() +.forDescendantResourcesOf("/content/we-retail/us/en") +.filterWith(complexFilter) +.printPath() +.run() diff --git a/examples/src/main/content/jcr_root/var/groovyconsole/scripts/aecu/aecu-examples/generic-examples/runmode.author/script1.groovy b/examples/src/main/content/jcr_root/var/groovyconsole/scripts/aecu/aecu-examples/generic-examples/runmode.author/script1.groovy new file mode 100644 index 00000000..de713424 --- /dev/null +++ b/examples/src/main/content/jcr_root/var/groovyconsole/scripts/aecu/aecu-examples/generic-examples/runmode.author/script1.groovy @@ -0,0 +1 @@ +println "Sample script1" diff --git a/examples/src/main/content/jcr_root/var/groovyconsole/scripts/aecu/aecu-examples/project1/migrations.author/script2.fallback.groovy b/examples/src/main/content/jcr_root/var/groovyconsole/scripts/aecu/aecu-examples/generic-examples/runmode.author/script2.fallback.groovy similarity index 62% rename from examples/src/main/content/jcr_root/var/groovyconsole/scripts/aecu/aecu-examples/project1/migrations.author/script2.fallback.groovy rename to examples/src/main/content/jcr_root/var/groovyconsole/scripts/aecu/aecu-examples/generic-examples/runmode.author/script2.fallback.groovy index 5a64c6f8..cbbebb1c 100644 --- a/examples/src/main/content/jcr_root/var/groovyconsole/scripts/aecu/aecu-examples/project1/migrations.author/script2.fallback.groovy +++ b/examples/src/main/content/jcr_root/var/groovyconsole/scripts/aecu/aecu-examples/generic-examples/runmode.author/script2.fallback.groovy @@ -1,2 +1,2 @@ // Scripts with extension ".fallback.groovy" will be executed if the non-fallback script fails -println "Executing fallback script for project1 - script2" \ No newline at end of file +println "Executing fallback script for script2" \ No newline at end of file diff --git a/examples/src/main/content/jcr_root/var/groovyconsole/scripts/aecu/aecu-examples/generic-examples/runmode.author/script2.groovy b/examples/src/main/content/jcr_root/var/groovyconsole/scripts/aecu/aecu-examples/generic-examples/runmode.author/script2.groovy new file mode 100644 index 00000000..4afeb0be --- /dev/null +++ b/examples/src/main/content/jcr_root/var/groovyconsole/scripts/aecu/aecu-examples/generic-examples/runmode.author/script2.groovy @@ -0,0 +1 @@ +println "Sample script2" diff --git a/examples/src/main/content/jcr_root/var/groovyconsole/scripts/aecu/aecu-examples/generic-examples/runmode.author/script3.always.groovy b/examples/src/main/content/jcr_root/var/groovyconsole/scripts/aecu/aecu-examples/generic-examples/runmode.author/script3.always.groovy new file mode 100644 index 00000000..3afcd1b6 --- /dev/null +++ b/examples/src/main/content/jcr_root/var/groovyconsole/scripts/aecu/aecu-examples/generic-examples/runmode.author/script3.always.groovy @@ -0,0 +1,2 @@ +// scripts with always flag are executed on each deployment +println "Sample script3" diff --git a/examples/src/main/content/jcr_root/var/groovyconsole/scripts/aecu/aecu-examples/project1/migrations.author/script1.groovy b/examples/src/main/content/jcr_root/var/groovyconsole/scripts/aecu/aecu-examples/project1/migrations.author/script1.groovy deleted file mode 100644 index 63bec6eb..00000000 --- a/examples/src/main/content/jcr_root/var/groovyconsole/scripts/aecu/aecu-examples/project1/migrations.author/script1.groovy +++ /dev/null @@ -1,2 +0,0 @@ -println "Sample project1 - script1" -Thread.sleep(2000); diff --git a/examples/src/main/content/jcr_root/var/groovyconsole/scripts/aecu/aecu-examples/project1/migrations.author/script2.groovy b/examples/src/main/content/jcr_root/var/groovyconsole/scripts/aecu/aecu-examples/project1/migrations.author/script2.groovy deleted file mode 100644 index b7b40bf7..00000000 --- a/examples/src/main/content/jcr_root/var/groovyconsole/scripts/aecu/aecu-examples/project1/migrations.author/script2.groovy +++ /dev/null @@ -1,3 +0,0 @@ -println "Executing project1 - script2" -This is -a syntax error \ No newline at end of file diff --git a/examples/src/main/content/jcr_root/var/groovyconsole/scripts/aecu/aecu-examples/project1/migrations.author/script3.groovy b/examples/src/main/content/jcr_root/var/groovyconsole/scripts/aecu/aecu-examples/project1/migrations.author/script3.groovy deleted file mode 100644 index 46bd8366..00000000 --- a/examples/src/main/content/jcr_root/var/groovyconsole/scripts/aecu/aecu-examples/project1/migrations.author/script3.groovy +++ /dev/null @@ -1,13 +0,0 @@ - -def conditionMap_resourceType = [:] -conditionMap_resourceType['sling:resourceType'] = "weretail/components/content/heroimage" - -aecu.contentUpgradeBuilder() - // collectors - .forDescendantResourcesOf("/content/we-retail/ca/en") - // filters - .filterByProperties(conditionMap_resourceType) - // actions - .printPath() - .doSetProperty("useFullWidth", false) - .dryRun() \ No newline at end of file diff --git a/examples/src/main/content/jcr_root/var/groovyconsole/scripts/aecu/aecu-examples/project1/migrations.author/script4.groovy b/examples/src/main/content/jcr_root/var/groovyconsole/scripts/aecu/aecu-examples/project1/migrations.author/script4.groovy deleted file mode 100644 index 9d4759bf..00000000 --- a/examples/src/main/content/jcr_root/var/groovyconsole/scripts/aecu/aecu-examples/project1/migrations.author/script4.groovy +++ /dev/null @@ -1,10 +0,0 @@ - -aecu.contentUpgradeBuilder() - // collectors - .forChildResourcesOf("/content/we-retail/ca/en") - // filters - .filterByNodeName("equipment") - // actions - .printPath() - .doMoveResourceToRelativePath("../experience") - .dryRun() \ No newline at end of file diff --git a/examples/src/main/content/jcr_root/var/groovyconsole/scripts/aecu/aecu-examples/project2/script1.groovy b/examples/src/main/content/jcr_root/var/groovyconsole/scripts/aecu/aecu-examples/project2/script1.groovy deleted file mode 100644 index aec4fa7f..00000000 --- a/examples/src/main/content/jcr_root/var/groovyconsole/scripts/aecu/aecu-examples/project2/script1.groovy +++ /dev/null @@ -1,3 +0,0 @@ -println "Executing project2 - script1" -Thread.sleep(2000); -return "Done" diff --git a/examples/src/main/content/jcr_root/var/groovyconsole/scripts/aecu/aecu-examples/project2/script2.always.groovy b/examples/src/main/content/jcr_root/var/groovyconsole/scripts/aecu/aecu-examples/project2/script2.always.groovy deleted file mode 100644 index 4e49522e..00000000 --- a/examples/src/main/content/jcr_root/var/groovyconsole/scripts/aecu/aecu-examples/project2/script2.always.groovy +++ /dev/null @@ -1,3 +0,0 @@ -// If you name your script ".always.groovy the it will be executed by install hook on each package deploy" -println "Executing a script with 'always' option" -Thread.sleep(2000); \ No newline at end of file diff --git a/examples/src/main/content/jcr_root/var/groovyconsole/scripts/aecu/aecu-examples/resource-iteration/find-by-node-name.groovy b/examples/src/main/content/jcr_root/var/groovyconsole/scripts/aecu/aecu-examples/resource-iteration/find-by-node-name.groovy new file mode 100644 index 00000000..ceda7572 --- /dev/null +++ b/examples/src/main/content/jcr_root/var/groovyconsole/scripts/aecu/aecu-examples/resource-iteration/find-by-node-name.groovy @@ -0,0 +1,5 @@ +aecu.contentUpgradeBuilder() + .forDescendantResourcesOf("/content/we-retail/us/en") + .filterByNodeName("hero_image") + .printPath() + .run() diff --git a/examples/src/main/content/jcr_root/var/groovyconsole/scripts/aecu/aecu-examples/resource-iteration/find-by-resourcetype.groovy b/examples/src/main/content/jcr_root/var/groovyconsole/scripts/aecu/aecu-examples/resource-iteration/find-by-resourcetype.groovy new file mode 100644 index 00000000..0ad7f1fa --- /dev/null +++ b/examples/src/main/content/jcr_root/var/groovyconsole/scripts/aecu/aecu-examples/resource-iteration/find-by-resourcetype.groovy @@ -0,0 +1,5 @@ +aecu.contentUpgradeBuilder() + .forDescendantResourcesOf("/content/we-retail/us/en") + .filterByProperty("sling:resourceType", "weretail/components/content/heroimage") + .printPath() + .run() diff --git a/examples/src/main/content/jcr_root/var/groovyconsole/scripts/aecu/aecu-examples/createNodes.groovy b/examples/src/main/content/jcr_root/var/groovyconsole/scripts/aecu/aecu-examples/resource-modification/create-resource.groovy similarity index 100% rename from examples/src/main/content/jcr_root/var/groovyconsole/scripts/aecu/aecu-examples/createNodes.groovy rename to examples/src/main/content/jcr_root/var/groovyconsole/scripts/aecu/aecu-examples/resource-modification/create-resource.groovy diff --git a/examples/src/main/content/jcr_root/var/groovyconsole/scripts/aecu/aecu-examples/project3/script1.groovy b/examples/src/main/content/jcr_root/var/groovyconsole/scripts/aecu/aecu-examples/resource-modification/move-resource.groovy similarity index 100% rename from examples/src/main/content/jcr_root/var/groovyconsole/scripts/aecu/aecu-examples/project3/script1.groovy rename to examples/src/main/content/jcr_root/var/groovyconsole/scripts/aecu/aecu-examples/resource-modification/move-resource.groovy diff --git a/examples/src/main/content/jcr_root/var/groovyconsole/scripts/aecu/aecu-examples/test-page-rendering/page-rendering.groovy b/examples/src/main/content/jcr_root/var/groovyconsole/scripts/aecu/aecu-examples/test-page-rendering/page-rendering.groovy new file mode 100644 index 00000000..3c1db64d --- /dev/null +++ b/examples/src/main/content/jcr_root/var/groovyconsole/scripts/aecu/aecu-examples/test-page-rendering/page-rendering.groovy @@ -0,0 +1,5 @@ +aecu.contentUpgradeBuilder() + .forResourcesInSubtree("/content/we-retail/ca/en/experience") + .filterByProperty("sling:resourceType", "weretail/components/structure/page") + .doCheckPageRendering() + .run() diff --git a/pom.xml b/pom.xml index db021d39..8dccce28 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ de.valtech.aecu aecu pom - 3.2.0 + 3.3.0 AECU AEM Easy Content Upgrade https://github.com/valtech/aem-easy-content-upgrade @@ -341,7 +341,7 @@ org.owasp dependency-check-maven - 5.2.1 + 5.2.4 0 true diff --git a/sonar-project.properties b/sonar-project.properties index 89c2e037..ba2202bd 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -2,7 +2,7 @@ sonar.projectKey=aecu # this is the name and version displayed in the SonarQube UI. Was mandatory prior to SonarQube 6.1. sonar.projectName=AEM Easy Content Upgrade -sonar.projectVersion=3.2.0-SNAPSHOT +sonar.projectVersion=3.3.0-SNAPSHOT # Encoding of the source code. Default is default system encoding sonar.sourceEncoding=UTF-8 diff --git a/ui.apps/pom.xml b/ui.apps/pom.xml index 3ee3b4f2..87c25ab8 100644 --- a/ui.apps/pom.xml +++ b/ui.apps/pom.xml @@ -5,7 +5,7 @@ de.valtech.aecu aecu - 3.2.0 + 3.3.0 aecu.ui.apps @@ -94,6 +94,13 @@ /apps/valtech/aecu/install + + + ICF Next + aem-groovy-console + (13,15] + + diff --git a/ui.apps/src/main/content/META-INF/vault/definition/.content.xml b/ui.apps/src/main/content/META-INF/vault/definition/.content.xml new file mode 100644 index 00000000..2edc22d8 --- /dev/null +++ b/ui.apps/src/main/content/META-INF/vault/definition/.content.xml @@ -0,0 +1,20 @@ + + + + + \ No newline at end of file