Building and deploying
You can package the portlet application by using the following command:
mvn package
This will generated a portlet application WAR file in the target/ directory. You can then either copy this WAR file to the tomcat/webapps directory of your Jahia installation or add a section to the Plugins section of the Maven pom.xml file to automate the deployment as seen in the example below:
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>integration-test</phase>
<configuration>
<tasks>
<property environment="env"/>
<!-- This assumes that you have set a CATALINA_HOME environmental variable -->
<property name="tomcat.home" value="${env.CATALINA_HOME}"/>
<copy file="target/${pom.name}.war" todir="${tomcat.home}/webapps"/>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
You can then deploy by lauching the command:
mvn -Dtomcat.home=/path/to/jahia/tomcat integration-test

