Can you install your package on both Author and Publish with a single Maven command so you do not need to compile the package (and run unit tests) twice?
Solved! Go to Solution.
Views
Replies
Total Likes
I found you can easily add a profile to maven to achieve it:
<profile>
<id>autoInstallPackageAuthorAndPublish</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>filevault-package-maven-plugin</artifactId>
<executions>
<execution>
<id>create-package</id>
<goals>
<goal>package</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.day.jcr.vault</groupId>
<artifactId>content-package-maven-plugin</artifactId>
<executions>
<execution>
<id>install-package-author</id>
<goals>
<goal>install</goal>
</goals>
<configuration>
<targetURL>http://${aem.host}:${aem.port}/crx/packmgr/service.jsp</targetURL>
</configuration>
</execution>
<execution>
<id>install-package-publish</id>
<goals>
<goal>install</goal>
</goals>
<configuration>
<targetURL>
http://${aem.publish.host}:${aem.publish.port}/crx/packmgr/service.jsp
</targetURL>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
</profile>
Now use the following command:
mvn -s /path/to/settings.xml clean install -PautoInstallPackageAuthorAndPublish -Padobe-public
I found you can easily add a profile to maven to achieve it:
<profile>
<id>autoInstallPackageAuthorAndPublish</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>filevault-package-maven-plugin</artifactId>
<executions>
<execution>
<id>create-package</id>
<goals>
<goal>package</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.day.jcr.vault</groupId>
<artifactId>content-package-maven-plugin</artifactId>
<executions>
<execution>
<id>install-package-author</id>
<goals>
<goal>install</goal>
</goals>
<configuration>
<targetURL>http://${aem.host}:${aem.port}/crx/packmgr/service.jsp</targetURL>
</configuration>
</execution>
<execution>
<id>install-package-publish</id>
<goals>
<goal>install</goal>
</goals>
<configuration>
<targetURL>
http://${aem.publish.host}:${aem.publish.port}/crx/packmgr/service.jsp
</targetURL>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
</profile>
Now use the following command:
mvn -s /path/to/settings.xml clean install -PautoInstallPackageAuthorAndPublish -Padobe-public
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies