Skip to content
Maven plugin for deploying a p2 update site to an AWS S3 bucket
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

AWS p2 Maven Plugin (aws-p2-maven-plugin)

Build Status Coverage Status Codacy Badge Snyk Vulnerabilities for GitHub Repo License Maven Central

A Maven plugin for deploying a p2 update site to an AWS S3 bucket.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.


Java 1.7+

Maven 3.1.0+


To build the plugin locally, simply run the following:

$ mvn clean install


The aws-p2-maven-plugin is available from Maven Central.

Add the plugin to the build section of the pom.xml:


The plugin will run automatically during the deploy phase.

Additionally, you may add a pluginGroup entry to the Maven settings file (User: ${user.home}/.m2/settings.xml, Global: ${maven.home}/conf/settings.xml), which will allow the use of aws-p2:* command line goals interactively in all projects:


For example, $ mvn aws-p2:deploy


The following goals are available:

Goal Description
deploy Deploys the p2 update site
help Display help information on the aws-p2-maven-plugin


The following parameters can be set in the configuration:

Name Type Required Since Description
bucket String Yes 1.0 The name of the S3 bucket where the update site is hosted.
User property is: aws-p2.bucket
deploySnapshots boolean No 1.0 Whether or not to deploy snapshot versions.
Default value is: true
User property is: aws-p2.deploySnapshots
generateLandingPage boolean No 1.0 Whether or not to generate an HTML landing page. This page will be displayed if a user attempts to access the update site via a web browser. No external sources are used in this page, so CORS configuration is not necessary. An example landing page can be found here:
Default value is: false
User property is: aws-p2.generateLandingPage
projectName String No 2.0 The project name that will dictate the root directory of the repository.
Default value is: ${}
User property is: aws-p2.projectName
skip boolean No 1.0 Set to true to skip plugin execution.
Default value is: false
User property is: aws-p2.skip
targetSiteDirectory String No 1.0 The directory within the bucket to place the update site.
Default value is: ${}/${project.version}
User property is: aws-p2.targetSiteDirectory


The AWS p2 Maven Plugin uses the Default Credential Provider Chain for authentication. See Working with AWS Credentials for details on all supported methods of providing credentials.

S3 Bucket Configuration

In order to host a static p2 update site on an S3 bucket, you will need to ensure several bucket settings:

  1. In the bucket properties tab, "Static website hosting" must be enabled
  2. In the bucket permissions tab, "Public access" to list bucket contents must be enabled

It is up to the consumer to configure the AWS account used for deployments, although we recommend creating an account whose sole responsibility is deploying to this bucket. Only the minimum required permissions should be granted to this user.

If versioning is enabled on the bucket, not all versions are deleted during an overwrite. When a new site is uploaded, only current content is deleted, and delete markers are not touched.

Built With


We use SemVer for versioning. For the versions available, see the tags on this repository.

More Information

For more information on the development, check out my blog post.


This project is licensed under the Apache License, Version 2.0 - see the LICENSE file for details

You can’t perform that action at this time.