Single maven install for both author and publish AEM | Community
Skip to main content
selvaganesh
Level 5
October 16, 2015
Solved

Single maven install for both author and publish AEM

  • October 16, 2015
  • 3 replies
  • 2724 views

I am trying to install AEM project in Author and Publish by using the below maven command. but it installs only in publish. Is it possible to  install in both?

mvn -Daem.host=localhost -Daem.port=4502  -Daem.publish.host=localhost -Daem.publish.port=4503 -PautoInstallPackagePublish,autoInstallPackage  clean install

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by smacdonald2008

I have never done this - always used Maven for 1 CQ instance at a time. See the AEM docs on this: 

https://docs.adobe.com/docs/en/cq/5-6-1/core/how_to/how_to_use_the_vlttool/vlt-mavenplugin.html

3 replies

smacdonald2008
smacdonald2008Accepted solution
Level 10
October 16, 2015

I have never done this - always used Maven for 1 CQ instance at a time. See the AEM docs on this: 

https://docs.adobe.com/docs/en/cq/5-6-1/core/how_to/how_to_use_the_vlttool/vlt-mavenplugin.html

joerghoh
Adobe Employee
Adobe Employee
October 16, 2015

Hi,

it's doable, but you need to build your own Maven profile then.

Jörg

Level 2
August 22, 2024

Add this profile to your Maven setup.

<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