Page tree

 

Shows how to deploy apps to a Confluence server.

Prerequisites

We assume in this tutorial that the POM project is configured as described in Use in POM Project. This implies that the apps are configured as artifacts and there are configurations to select sets of apps and choose from configured deployment environments (Confluence servers).

Deployment Basics

For deploying apps you need to select

  1. a profile specifying the Confluence server to deploy to (e.g. -PLOCAL, per convention, deployment targets are spelled in capital letters)
  2. a profile specifying the version numbers for the apps (e.g. -Psnapshots or -Preleases)

Note that artifacts are fetched from a local source folder. That folder is populated with artifacts defined by the artifacts parameter from the artifact server. If that folder is not empty, the build will fail unless -DfailOnNonEmptySourceFolder is set to false. This will prevent to accidentally fill the folder with different runs using different configurations.

To check what will be run on the server, use -DdryRun to actually not execute the commands, but print them to the console.

> mvn apptools:deploy -PLOCAL,snapshots -DdryRun

You may specify default includes and excludes or impose a processing order with order.

> mvn apptools:deploy -PLOCAL,snapshots -Dincludes=extension,core,model 
    -Dexcludes=web-api,bookmarklets -Dorder=extension,doctype -DdryRun

Deploy Latest

You may select to deploy the latest versions of the apps speciofied in your Maven POM with the parameter useLatest. This parameter accepts two values RELEASE and SNAPSHOT.

RELEASE
Deploy the latest release version for each app found on the artifact server.
SNAPSHOT
Deploy the latest snapshot version for each app found on the artifact server.
> mvn apptools:deploy -PTEST -DuseLatest

 

Please note that on some configurations the Confluence server seems to run in an HTTP 500 if too many apps are deployed in one go.

This issue is tracked with APPMP-8 - Getting issue details... STATUS .

Deploy App Project

You may configure your app projects so that the artifact is deployed with

> mvn apptools:deploy -PTEST

To instruct Maven where to look for the artifact and where to deploy, you need to add a plugin configuration as described in Use in App Project.