Skip to main content
Version: Deploy 22.1

Create a Deployment Package Using Maven

To enable continuous deployment, the Deploy Maven plugin enables you to integrate Deploy with the Maven build system. For more information, see Deploy Maven plugin.

Features

  • Create a deployment package containing artifacts from the build
  • Perform a deployment to a target environment
  • Undeploy a previously deployed application
note

The Deploy Maven plugin cannot set values for hidden CI properties.

Using the Maven jar plugin

The standard Maven jar plugin can also be used to create a Deploy package.

  • Create a manifest file conforming to the Deploy manifest standard
  • Create a directory structure containing the files as they should appear in the package

In the Maven POM, configure the jar plugin as follows:

<project>
...
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
...
<configuration>
<includes>
<include>** /* </include>
</includes>
</configuration>
...
</plugin>
</plugins>
</build>
...
</project>

To generate a Deploy package, execute:

mvn package

Managing application dependencies

You can declare your application dependencies in Maven by defining the properties in the deploymentPackageProperties node. This is a sample snippet you can add to the pom.xml file using your specific properties:

<plugin>
<groupId>com.xebialabs.xldeploy</groupId>
<artifactId>xldeploy-maven-plugin</artifactId>
...
<configuration>
...
<deploymentPackageProperties>
<applicationDependencies>
<entry key="BackEnd">[2.0.0,2.0.0]</entry>
</applicationDependencies>
<orchestrator>parallel-by-container</orchestrator>
<satisfiesReleaseNotes>true</satisfiesReleaseNotes>
</deploymentPackageProperties>
...
</configuration>
...
</plugin>

Make sure that the dependent package is already present in Deploy and has the correct version as configured in the pom.xml file.

For more information about application dependencies, see Application dependencies in Deploy.