This presume Maven skeleton has been already created.
- UI
- Bundle
- root pom.xml files.
Update/create this entries specific to your environment in root pom.xml
Step 1.
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<!– Development/Integration Server properties –>
<!– Author –>
<cq.devint.author.host>10.29.136.192</cq.devint.author.host>
<cq.devint.author.port>4502</cq.devint.author.port>
<cq.devint.author.username>admin</cq.devint.author.username>
<cq.devint.author.password>admin</cq.devint.author.password>
<!– Publish –>
<cq.devint.publish.host>10.29.136.194</cq.devint.publish.host>
<cq.devint.publish.port>4503</cq.devint.publish.port>
<cq.devint.publish.username>admin</cq.devint.publish.username>
<cq.devint.publish.password>admin</cq.devint.publish.password>
</properties>
Step2 .
Create below profile entry in same pom.xml or where ever you want.
<profile>
<id>dev-int</id>
<build>
<plugins>
<plugin>
<groupId>com.day.jcr.vault</groupId>
<artifactId>maven-vault-plugin</artifactId>
<configuration>
<failOnError>true</failOnError>
</configuration>
<executions>
<execution>
<id>install-package-author</id>
<goals>
<goal>install</goal>
</goals>
<configuration>
<packageFile>${project.build.directory}/${project.build.finalName}.zip</packageFile>
<targetURL>http://${cq.devint.author.host}:${cq.devint.author.port}/crx/packmgr/service.jsp</targetURL>
<userId>${cq.devint.author.username}</userId>
<password>${cq.devint.author.password}</password>
</configuration>
</execution>
<execution>
<id>install-package-publish</id>
<goals>
<goal>install</goal>
</goals>
<configuration>
<packageFile>${project.build.directory}/${project.build.finalName}.zip</packageFile>
<targetURL>http://${cq.devint.publish.host}:${cq.devint.publish.port}/crx/packmgr/service.jsp</targetURL>
<userId>${cq.devint.publish.username}</userId>
<password>${cq.devint.publish.password}</password>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
and finally run this command from command line or any CI Server profile.
mvn clean install -P dev-int