Maven Confluence Plug-in

This plug-in provides various integration tools with confluence.

For more information on the functionality provided by this plugin, please see the Goals document.

For more information on how to customise the functionality provided by this plugin, please see the properties document.

Uploading a single page to confluence

It is possible to upload the content of a page in confluence together with your build. Note that if the page has not changed meanwhile, confluence will not record a change history for the upload.

The plugin does not handle conflict management at all so your working copy should be up-to-date (any manual changes in confluence will be overwritten by the upload of the content in your working copy).

By default, the name of the page within the space that needs to be updated is the name of the file containing the wiki markup without the file extension. If it does not fit, one could override this behavior by setting the pageName property.

By default, the page must exist in Confluence. However, by setting the property of maven.confluence.create.page to true, the plugin will create the page if it does not exist.

To upload the src/confluence/Hello World From Soap.confluence page, one would write the following:

                maven confluence:upload-page
                         "-DconfluenceContentPath=src/confluence/Hello World From Soap.confluence"

            

If the content of the file needs to be set in a page called AnotherName, one would write the following

                maven confluence:upload-page
                         "-DconfluenceContentPath=src/confluence/Hello World From Soap.confluence"
                          -DpageName=AnotherName

            

Uploading an attachment to a confluence page

It is possible to upload an attachment to a confluence page. By default, the name of the attachment is the name of the file. If an attachment with the same name already exists for the specified page, a new version is created. Note also that Confluence does not compare the content of attachments so invoking this goal will always create a new version (contrary to page updates, see above).

To attach the target/generated-pdf/user-guide-pdf to the My Test Page page, one would write the following:

                maven confluence:upload-attachment
                         "-DconfluenceContentPath=target/generated-pdf/user-guide-pdf"
                         "-DpageName=My Test Page"
            

If the name of the attachment must be hercules-user-guide.pdf, one would write the following:

                maven confluence:upload-attachment
                         "-DconfluenceContentPath=target/generated-pdf/user-guide-pdf"
                         "-DpageName=My Test Page"
                         -DattachmentName=hercules-user-guide.pdf
            

The content type is mandatory. The plugin supports common files (doc, excel, text, html, xml, pdf). If you need to attach a file with another content type, you need to set the attachmentContentType property. For instance, to upload a bitmap image, located in src/resources/hercules-architecture.bmp, one would write the following:

                maven confluence:upload-attachment
                         "-DconfluenceContentPath=src/resources/hercules-architecture.bmp"
                         "-DpageName=My Test Page"
                         -DattachmentContentType=image/bmp