This plugin can be used to automate kwatee operation during the maven lifecycle.
To use the kwatee-maven-plugin you must first install it manually as follows:
cd kwatee distrib dir/addOns/maven mvn install:install-file -Dfile=kwatee-maven-plugin-<version>.jar -DpomFile=pom.xml
The Kwatee Maven Plugin allows you to update a kwatee repository by creating/deleting artifact versions, uploading new packages to versions, and triggering deployment operations.
Goals available for this plugin:
Goal | Description |
---|---|
kwatee:create_version | Creates a new version within an existing kwatee artifacts. |
kwatee:delete_version | Deletes an artifact's version. |
kwatee:upload_package | Uploads a package to an existing artifact's version. |
kwatee:set_active_version | Sets the active version of an artifact in an environment's release. |
kwatee:tag_release | Tags an environment snapshot. |
kwatee:delete_release | Deletes an environment's release. |
kwatee:deploy | Deploy operations (deploy|undeploy|start|stop) on an environment's release. |
Communicates with a kwatee instance to create or duplicate a version within an existing artifact.
Name | Description |
---|---|
serviceUrl | base URL of a kwatee instance. This must be of the form:http://<user>:<password>@<host>:<port>/<kwateePath> |
artifact | the artifact in which to create the new version. |
version | the name of the version to create. |
Name | Description |
---|---|
duplicateFrom | the name of the version to duplicate. |
description | The description of the newly created version. |
Communicates with a kwatee instance to delete a version from an existing artifact.
Name | Description |
---|---|
serviceUrl | base URL of a kwatee instance. This must be of the form:http://<user>:<password>@<host>:<port>/<kwateePath> |
artifact | the version's artifact name. |
version | the name of the version to delete. |
Communicate with a kwatee instance to upload an package (maven artifact) to a kwatee version.
Name | Description |
---|---|
serviceUrl | base URL of a kwatee instance. This must be of the form:http://<user>:<password>@<host>:<port>/<kwateePath> |
artifact | the version's artifact. |
version | the name of the version in which to upload the package. |
file | the path of the package to upload. |
Name | Description |
---|---|
deleteOverlays | will delete existing overlays if true. |
Communicates with a kwatee instance to set the active version of a artifact in the snapshot release of the specified environment.
Name | Description |
---|---|
serviceUrl | base URL of a kwatee instance. This must be of the form:http://<user>:<password>@<host>:<port>/<kwateePath> |
environment | the environment name. |
artifact | the artifact name for which to set the active version. |
version | the new active version name. |
Name | Description |
---|---|
server | the server to which the active version applies. If no server is specified, the active version will be the default for all servers in the environment. |
Communicates with a kwatee instance to tag the snapshot release of the specified environment.
Name | Description |
---|---|
serviceUrl | base URL of a kwatee instance. This must be of the form:http://<user>:<password>@<host>:<port>/<kwateePath> |
environment | the environment name. |
release | the name of the tagged release to create. |
Name | Description |
---|---|
description | a description for the tagged release. |
Communicates with a kwatee instance to delete a release from the specified environment.
Name | Description |
---|---|
serviceUrl | base URL of a kwatee instance. This must be of the form:http://<user>:<password>@<host>:<port>/<kwateePath> |
environment | the release's environment name. |
release | the name of the release to delete. |
Communicates with a kwatee instance to trigger the deployment of a kwatee release and start/stop it's executables. To use it, declare:
Name | Description |
---|---|
serviceUrl | base URL of a kwatee instance. This must be of the form:http://<user>:<password>@<host>:<port>/<kwateePath> |
environment | the release's environment name. |
release | the name of the release on which to perform operations. |
operations | a list of deployment operations to perform. |
Name | Description |
---|---|
action | base URL of a kwatee instance. This must be of the form:http://<user>:<password>@<host>:<port>/<kwateePath> |
environment | the release's environment name. |
Name | Description |
---|---|
release | the name of the release on which to perform operations (default: snapshot). |
artifact | name of the release artifact to which the operation is applied (default: all artifacts). |
server | name of the release server to which the operation is applied (default: all servers). |
The demowebsite version 1.0 is duplicated to preserve version variables and overlays and then a new artifact is uploaded.
... <build> <plugins> ... <plugin> <groupId>net.kwatee.agiledeployment</groupId> <artifactId>kwatee-maven-plugin</artifactId> <version>${kwatee.version}</version> <executions> <execution> <id>createVersion</id> <phase>package</phase> <goals> <goal>create_version</goal> </goals> <configuration> <serviceUrl>http://admin:password@kwatee.local:8080/kwatee</serviceUrl> <artifact>demowebsite</artifact> <version>1.1</version> <duplicateFrom>1.0</duplicateFrom> <description>created with maven</description> </configuration> </execution> <execution> <id>uploadPackage</id> <phase>package</phase> <goals> <goal>update_package</goal> </goals> <configuration> <serviceUrl>http://admin:password@kwatee.local:8080/kwatee</serviceUrl> <artifact>demowebsite</artifact> <version>1.1</version> <file>${project.build.directory}/${project.artifactId}.zip</file> </configuration> </execution> </executions> </plugin> ... </plugins> </build> ...
The environment's active version for demowebsite is updated to 1.1 and then the snapshot is tagged.
... <build> <plugins> ... <plugin> <groupId>net.kwatee.agiledeployment</groupId> <artifactId>kwatee-maven-plugin</artifactId> <version>1.0.1</version> <executions> <execution> <id>updateActiveVersion</id> <phase>package</phase> <goals> <goal>set_active_version</goal> </goals> <configuration> <serviceUrl>http://admin:password@kwatee.local:8080/kwatee</serviceUrl> <environment>intro</environment> <artifact>demowebsite</artifact> <version>1.1</version> </configuration> </execution> <execution> <id>tag</id> <phase>package</phase> <goals> <goal>tag_release</goal> </goals> <configuration> <serviceUrl>http://admin:password@kwatee.local:8080/kwatee</serviceUrl> <environment>intro</environment> <release>release1.1</release> <description>tagged by maven</description> </configuration> </execution> </executions> </plugin> ... </plugins> </build> ...
Stop a possible previous snapshot, deploy and start.
... <build> <plugins> ... <plugin> <groupId>net.kwatee.agiledeployment</groupId> <artifactId>kwatee-maven-plugin</artifactId> <version>${kwatee.version}</version> <executions> <execution> <id>deploy</id> <goals> <goal>deploy</goal> </goals> <configuration> <serviceUrl>http://admin:password@kwatee.local:8080/kwatee</serviceUrl> <environment>intro</environment> <actions> <param>stop</param> <param>deploy</param> <param>start</param> </actions> </configuration> </execution> </executions> </plugin> </plugins> </build> ...