Skip to content

Commit

Permalink
Use FileVault Package Maven Plugin 1.3.0
Browse files Browse the repository at this point in the history
This closes #2781 and #2043
  • Loading branch information
kwin committed Mar 27, 2022
1 parent 4d84465 commit dbfa5f9
Show file tree
Hide file tree
Showing 27 changed files with 230 additions and 337 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com)
<!-- Keep this up to date! After a release, change the tag name to the latest release -->
[unreleased changes details]: https://github.com/Adobe-Consulting-Services/acs-aem-commons/compare/acs-aem-commons-5.0.14...HEAD

### Changed

- #2043 - Switch to filevault-package-maven-plugin
- #2781 - Remove Adobe repositories from pom.xml

## 5.2.0 - 2022-03-03

### Fixed
Expand Down
97 changes: 38 additions & 59 deletions content/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,109 +16,82 @@

<artifactId>acs-aem-commons-content</artifactId>
<name>ACS AEM Commons Package</name>
<description>ACS AEM Commons container content package which delivers acs-aem-commons-ui.apps, acs-aem-commons-ui.content, the OSGi bundle and configuration.</description>
<packaging>content-package</packaging>

<build>
<resources>
<resource>
<directory>src/main/content/jcr_root</directory>
<excludes>
<exclude>**/.vlt</exclude>
<exclude>**/.vltignore</exclude>
</excludes>
</resource>
<resource>
<directory>src/main/content/META-INF/vault/definition</directory>
<targetPath>../vault-work/META-INF/vault/definition</targetPath>
</resource>
<resource>
<directory>src/main/content/META-INF/vault</directory>
<includes>
<include>nodetypes.cnd</include>
<include>privileges.xml</include>
</includes>
<targetPath>../vault-work/META-INF/vault</targetPath>
</resource>
<resource>
<directory>src/main/resources/META-INF</directory>
<targetPath>../vault-work/META-INF</targetPath>
</resource>
</resources>

<testResources>
<testResource>
<directory>src/test/resources</directory>
</testResource>
<testResource>
<directory>${maven.multiModuleProjectDirectory}/src/test/resources</directory>
</testResource>
</testResources>

<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<configuration>
<includeEmptyDirs>true</includeEmptyDirs>
</configuration>
</plugin>

<plugin>
<groupId>com.day.jcr.vault</groupId>
<artifactId>content-package-maven-plugin</artifactId>
<extensions>true</extensions>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>filevault-package-maven-plugin</artifactId>
<configuration>
<group>adobe/consulting</group>
<properties>
<description>ACS AEM Commons container content package which delivers acs-aem-commons-ui.apps and acs-aem-commons-ui.content.</description>
</properties>
<filterSource>src/main/content/META-INF/vault/filter.xml</filterSource>
<targetURL>http://${crx.host}:${crx.port}${crx.contextRoot}/crx/packmgr/service.jsp</targetURL>
<packageType>container</packageType>
<embeddeds>
<embedded>
<groupId>${project.groupId}</groupId>
<artifactId>acs-aem-commons-bundle</artifactId>
<target>/apps/acs-commons/install</target>
<filter>true</filter>
<isAllVersionsFilter>true</isAllVersionsFilter>
</embedded>
</embeddeds>
</configuration>
<executions>
<execution>
<id>default-package</id>
<id>default-generate-metadata</id>
<configuration>
<subPackages>
<subPackage>
<groupId>${project.groupId}</groupId>
<artifactId>acs-aem-commons-ui.apps</artifactId>
<scope>runtime</scope> <!-- this is hacky, but seems to be the easiest way to include the min artifacts since there's no way to specify a blank classifier -->
<filter>true</filter>
<isAllVersionsFilter>true</isAllVersionsFilter>
</subPackage>
<subPackage>
<groupId>${project.groupId}</groupId>
<artifactId>acs-aem-commons-ui.content</artifactId>
<scope>runtime</scope>
<filter>true</filter>
<isAllVersionsFilter>true</isAllVersionsFilter>
</subPackage>
</subPackages>
</configuration>
</execution>
<execution>
<id>build-min-package</id>
<phase>package</phase>
<id>generate-metadata-min-package-</id>
<goals>
<goal>package</goal>
<goal>generate-metadata</goal>
</goals>
<configuration>
<finalName>${project.build.finalName}-min</finalName>
<classifier>min</classifier>
<subPackages>
<subPackage>
<groupId>${project.groupId}</groupId>
<artifactId>acs-aem-commons-ui.apps</artifactId>
<classifier>min</classifier>
<filter>true</filter>
<isAllVersionsFilter>true</isAllVersionsFilter>
</subPackage>
<subPackage>
<groupId>${project.groupId}</groupId>
<artifactId>acs-aem-commons-ui.content</artifactId>
<classifier>min</classifier>
<filter>true</filter>
<isAllVersionsFilter>true</isAllVersionsFilter>
</subPackage>
</subPackages>
</configuration>
</execution>
<execution>
<id>build-min-package</id>
<goals>
<goal>package</goal>
</goals>
<configuration>
<classifier>min</classifier>
</configuration>
</execution>
</executions>
</plugin>

Expand Down Expand Up @@ -179,7 +152,8 @@
</executions>
</plugin>

<plugin>
<!-- disable oakpal due to false positives: https://github.com/adamcin/oakpal/issues/92
<plugin>
<groupId>net.adamcin.oakpal</groupId>
<artifactId>oakpal-maven-plugin</artifactId>
<configuration>
Expand Down Expand Up @@ -251,7 +225,7 @@
</configuration>
</execution>
</executions>
</plugin>
</plugin> -->

<!-- avoid failing on JS vulnerabilities - TODO to fix -->
<plugin>
Expand All @@ -266,6 +240,11 @@
</build>

<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>acs-aem-commons-bundle</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>acs-aem-commons-ui.apps</artifactId>
Expand Down
24 changes: 0 additions & 24 deletions content/src/main/content/META-INF/vault/definition/.content.xml

This file was deleted.

3 changes: 3 additions & 0 deletions content/src/main/content/META-INF/vault/filter.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<workspaceFilter version="1.0">
<filter root="/apps/acs-commons/config"/>
<filter root="/apps/acs-commons/config.author"/>
<filter root="/apps/acs-commons/config.publish"/>
</workspaceFilter>
File renamed without changes
111 changes: 88 additions & 23 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -224,10 +224,97 @@ Bundle-DocURL: https://adobe-consulting-services.github.io/acs-aem-commons/
<artifactId>sling-maven-plugin</artifactId>
<version>2.4.2</version>
</plugin>
<plugin>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>filevault-package-maven-plugin</artifactId>
<version>1.3.0</version>
<extensions>true</extensions>
<configuration>
<group>adobe/consulting</group>
<filterSource>src/main/content/META-INF/vault/filter.xml</filterSource>
<thumbnailImage>src/main/resources/thumbnail.png</thumbnailImage>
<validatorsSettings>
<jackrabbit-filter>
<options>
<validRoots>/,/libs,/libs/core/wcm,/apps,/etc,/etc/clientlibs,/etc/cloudservices,/etc/dam/video,/etc/designs,/etc/notification,/etc/workflow/instances,/etc/workflow/packages,/var,/tmp,/content,/content/dam,/home,/home/users,/home/users/system,/home/groups,/conf,/conf/global</validRoots>
</options>
</jackrabbit-filter>
<jackrabbit-nodetypes>
<options>
<!-- use the nodetypes and namespaces from the aem-nodetypes.jar provided in the plugin dependencies -->
<cnds>tccl:aem.cnd</cnds>
</options>
</jackrabbit-nodetypes>
<jackrabbit-packagetype>
<options>
<allowComplexFilterRulesInApplicationPackages>true</allowComplexFilterRulesInApplicationPackages>
</options>
</jackrabbit-packagetype>
<netcentric-aem-classification>
<!-- only raise to WARN once we start tackling these issues -->
<defaultSeverity>INFO</defaultSeverity>
<options>
<maps>tccl:biz/netcentric/filevault/validator/maps/aem-classification-map-deprecations/coral2deprecations.map,tccl:biz/netcentric/filevault/validator/maps/aem-classification-map-deprecations/graniteuideprecations.map,tccl:biz/netcentric/filevault/validator/maps/aem-classification-map-repo-annotations.map</maps>
</options>
</netcentric-aem-classification>
<netcentric-aem-cloud>
<options>
<allowReadOnlyMutablePaths>true</allowReadOnlyMutablePaths><!-- default value is true, as it is allowed to have /var nodes inside author-only container -->
</options>
</netcentric-aem-cloud>
</validatorsSettings>
</configuration>
<executions>
<execution>
<id>generate-cnd</id>
<goals>
<goal>generate-cnd</goal>
</goals>
<configuration>
<additionalInputCndUrls>tccl:aem.cnd</additionalInputCndUrls>
</configuration>
</execution>
</executions>
<dependencies>
<!-- validates against content classifications from AEM (https://github.com/Netcentric/aem-classification/tree/master/aem-classification-validator) -->
<dependency>
<groupId>biz.netcentric.filevault.validator</groupId>
<artifactId>aem-classification-validator</artifactId>
<version>1.0.1</version>
</dependency>
<!-- the dependency containing the actual classification map -->
<dependency>
<groupId>biz.netcentric.filevault.validator.maps</groupId>
<artifactId>aem-classification-map-repo-annotations</artifactId>
<version>6.5.3.0</version>
</dependency>
<!-- map containing additional deprecations from release notes -->
<dependency>
<groupId>biz.netcentric.filevault.validator.maps</groupId>
<artifactId>aem-classification-map-deprecations</artifactId>
<version>6.5.0.0</version>
</dependency>
<!-- contains all node types and namespaces of AEM 6.5.7, necessary for validator 'jackrabbit-nodetypes' -->
<dependency>
<groupId>biz.netcentric.aem</groupId>
<artifactId>aem-nodetypes</artifactId>
<version>6.5.7.0</version>
</dependency>
<!-- https://github.com/Netcentric/aem-cloud-validator -->
<dependency>
<groupId>biz.netcentric.filevault.validator</groupId>
<artifactId>aem-cloud-validator</artifactId>
<version>1.2.2</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>com.day.jcr.vault</groupId>
<artifactId>content-package-maven-plugin</artifactId>
<version>0.0.24</version>
<version>1.0.4</version>
<configuration>
<targetURL>http://${crx.host}:${crx.port}${crx.contextRoot}/crx/packmgr/service.jsp</targetURL>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
Expand Down Expand Up @@ -724,28 +811,6 @@ Bundle-DocURL: https://adobe-consulting-services.github.io/acs-aem-commons/
</profile>
</profiles>

<!--
Inclusion of repositories in POMs is controversial, to say the least.
It would be best if you proxied the Adobe repository using a Maven
Repository Manager. Once you do that, remove these sections.
-->
<repositories>
<repository>
<id>adobe-public-releases</id>
<name>Adobe Public Repository</name>
<url>https://repo.adobe.com/nexus/content/groups/public/</url>
<layout>default</layout>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>adobe-public-releases</id>
<name>Adobe Public Repository</name>
<url>https://repo.adobe.com/nexus/content/groups/public/</url>
<layout>default</layout>
</pluginRepository>
</pluginRepositories>

<distributionManagement>
<!-- the nexus-staging-maven-plugin only needs a snapshot repository -->
<snapshotRepository>
Expand Down
Loading

0 comments on commit dbfa5f9

Please sign in to comment.