requires project-build-plugin 7.1.0 and Axon Ivy Engine 7.1.0 RC or newer
This build example demonstrates how a full ivy application (based on multiple sub-projects) can be built and deployed to a running Axon Ivy Engine.
By running mvn clean install
you will see how:
- three ivy projects are built as ivy archive (IAR).
- the module build packs these three projects into a single (ZIP) archive.
- the module build deploys the full application (ZIP) to a running engine.
The sample application is divided into three sub projects:
- base: the domain model plus its database integration layer
- solution: the user dialogs that provide a solution
- customer: customizes the solution for a specific customer
The root pom.xml within this directory is the module that references all sub-projects that belong the ivy application.
<modules>
<module>base</module>
<module>solution</module>
<module>customer</module>
</modules>
It packs all sub-projects (archived as IAR) into a single application zip by using the maven-assembly plugin.
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<descriptors><descriptor>assembly.xml</descriptor></descriptors>
</configuration>
<executions>
<execution>
<id>create.app</id>
<goals><goal>single</goal></goals>
<phase>generate-resources</phase>
</execution>
</executions>
</plugin>
The content of the application zip is defined in the assembly.xml.
<id>app</id>
<formats><format>zip</format></formats>
<includeBaseDirectory>false</includeBaseDirectory>
<moduleSets>
<moduleSet>
<includeSubModules>true</includeSubModules>
<binaries><unpack>false</unpack></binaries>
</moduleSet>
</moduleSets>
Via the deploy-to-engine goal it deploys this zip with all projects to a running Axon Ivy Engine.
<plugin>
<groupId>com.axonivy.ivy.ci</groupId>
<artifactId>project-build-plugin</artifactId>
<version>9.1.0-SNAPSHOT</version>
<executions>
<execution>
<id>deploy.to.staging</id>
<phase>pre-integration-test</phase>
<goals><goal>deploy-to-engine</goal></goals>
<configuration>
<deployFile>${project.build.directory}/${project.artifactId}-${project.version}-app.zip</deployFile>
<deployToEngineApplication>MyApplication</deployToEngineApplication>
<deployEngineDirectory>\\myStagingSrv\ivyEngine72\deploy</deployEngineDirectory>
</configuration>
</execution>
</executions>
</plugin>