Skip to content

Commit

Permalink
Move core-components from /apps to /libs for AEM as a cloud (#1002)
Browse files Browse the repository at this point in the history
* [WIP] Move core-components from /apps to /libs for AEM as a cloud

- add new cloud profile to content module

* Move core-components from /apps to /libs

- use classifier option to generate extra content package for cloud

* Move core-components from /apps to /libs for AEM in the cloud deployments

- replace specific filter configurations with inline filter
- attach cloud artifact to project build
- copy resources to output directory in libs directory when cloud profile is active

* Move core-components from /apps to /libs for AEM in the cloud deployments

- move back to classifier option

* Move core-components from /apps to /libs for AEM in the cloud deployments

- add executions to create two packages at once

* [WIP] Move core-components from /apps to /libs for AEM as a cloud

- add new cloud profile to content module

* Move core-components from /apps to /libs for AEM in the cloud deployments

- replace specific filter configurations with inline filter
- attach cloud artifact to project build
- copy resources to output directory in libs directory when cloud profile is active

* Move core-components from /apps to /libs for AEM in the cloud deployments

- move back to classifier option

* Move core-components from /apps to /libs for AEM as a cloud

- update maven-filevault dependency to latest released version
- add cloud profile to extension/amp content package
- disable nodetype-validation as a workaround JCRVLT-461
- update release automation scripts

* Move core-components from /apps to /libs for AEM as a cloud

- restore filter.xml which are not relevant for cloud deployment
  • Loading branch information
bpauli committed Aug 17, 2020
1 parent 7dc6c2d commit aa5513c
Show file tree
Hide file tree
Showing 11 changed files with 169 additions and 75 deletions.
2 changes: 1 addition & 1 deletion ci/deploy_snapshots.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ if (gitTag != "@deploy-snapshot") {
try {
tools.stage("DEPLOY SNAPSHOTS");
tools.prepareGPGKey();
tools.sh("mvn deploy -B -s ci/settings.xml -Prelease -Padobe-public");
tools.sh("mvn deploy -B -s ci/settings.xml -Prelease -Padobe-public -Pcloud");
tools.stage("DEPLOY SNAPSHOTS DONE");
} finally {
tools.removeGitTag(gitTag);
Expand Down
2 changes: 1 addition & 1 deletion ci/release.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ tools.gitImpersonate('CircleCi', '[email protected]', () => {
console.log("Checking out the master branch so we can commit and push");
tools.sh("git checkout master");
tools.prepareGPGKey();
tools.sh("mvn -B -s ci/settings.xml -Prelease,adobe-public clean release:prepare release:perform" + releaseVersion);
tools.sh("mvn -B -s ci/settings.xml -Prelease,adobe-public,cloud clean release:prepare release:perform" + releaseVersion);
tools.stage("RELEASE DONE");
} finally {
tools.removeGitTag(gitTag);
Expand Down
2 changes: 1 addition & 1 deletion config/src/content/META-INF/vault/filter.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
<workspaceFilter version="1.0">
<filter root="/apps/core/wcm/config"/>
<filter root="/apps/core/wcm/config.author"/>
</workspaceFilter>
</workspaceFilter>
67 changes: 67 additions & 0 deletions content/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@
<artifactId>filevault-package-maven-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<filters>
<filter>
<root>/apps/core/wcm/components</root>
</filter>
</filters>
<packageType>application</packageType>
<dependencies>
<dependency>
Expand Down Expand Up @@ -203,6 +208,68 @@
</plugins>
</build>
</profile>
<profile>
<id>cloud</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-resources</id>
<phase>prepare-package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/jcr_root/libs</outputDirectory>
<resources>
<resource>
<directory>${basedir}/src/content/jcr_root/apps</directory>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>filevault-package-maven-plugin</artifactId>
<executions>
<execution>
<id>generate-metadata-cloud</id>
<goals>
<goal>generate-metadata</goal>
</goals>
<configuration>
<filters>
<filter>
<root>/libs/core/wcm/components</root>
</filter>
</filters>
<classifier>cloud</classifier>
</configuration>
</execution>
<execution>
<id>package-cloud</id>
<goals>
<goal>package</goal>
</goals>
<configuration>
<jcrRootSourceDirectory>${project.build.directory}/jcr_root</jcrRootSourceDirectory>
<classifier>cloud</classifier>
<workDirectory>${project.build.directory}/vault-work-cloud</workDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

<!-- ====================================================================== -->
Expand Down
19 changes: 0 additions & 19 deletions content/src/content/META-INF/vault/filter.xml

This file was deleted.

5 changes: 5 additions & 0 deletions examples/ui.content/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@
<properties>
<acHandling>merge_preserve</acHandling>
</properties>
<validatorsSettings>
<jackrabbit-nodetypes>
<isDisabled>true</isDisabled>
</jackrabbit-nodetypes>
</validatorsSettings>
<dependencies>
<dependency>
<groupId>com.adobe.cq</groupId>
Expand Down
41 changes: 11 additions & 30 deletions extensions/amp/content/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

67 changes: 67 additions & 0 deletions extensions/amp/content/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@
<version>[${project.version},)</version>
</dependency>
</dependencies>
<filters>
<filter>
<root>/apps/core/wcm/extensions</root>
</filter>
</filters>
</configuration>
</plugin>
<plugin>
Expand Down Expand Up @@ -204,6 +209,68 @@
</plugins>
</build>
</profile>
<profile>
<id>cloud</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-resources</id>
<phase>prepare-package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/jcr_root/libs</outputDirectory>
<resources>
<resource>
<directory>${basedir}/src/content/jcr_root/apps</directory>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>filevault-package-maven-plugin</artifactId>
<executions>
<execution>
<id>generate-metadata-cloud</id>
<goals>
<goal>generate-metadata</goal>
</goals>
<configuration>
<filters>
<filter>
<root>/libs/core/wcm/extensions</root>
</filter>
</filters>
<classifier>cloud</classifier>
</configuration>
</execution>
<execution>
<id>package-cloud</id>
<goals>
<goal>package</goal>
</goals>
<configuration>
<jcrRootSourceDirectory>${project.build.directory}/jcr_root</jcrRootSourceDirectory>
<classifier>cloud</classifier>
<workDirectory>${project.build.directory}/vault-work-cloud</workDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

<!-- ====================================================================== -->
Expand Down
19 changes: 0 additions & 19 deletions extensions/amp/content/src/content/META-INF/vault/filter.xml

This file was deleted.

Loading

0 comments on commit aa5513c

Please sign in to comment.