Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/avojak/aws-p2-maven-plugin
Maven plugin for deploying a p2 update site to an AWS S3 bucket
https://github.com/avojak/aws-p2-maven-plugin
aws-s3 eclipse java maven-plugin p2
Last synced: 14 days ago
JSON representation
Maven plugin for deploying a p2 update site to an AWS S3 bucket
- Host: GitHub
- URL: https://github.com/avojak/aws-p2-maven-plugin
- Owner: avojak
- License: apache-2.0
- Created: 2017-09-30T22:21:42.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2022-11-16T01:52:40.000Z (almost 2 years ago)
- Last Synced: 2023-08-05T20:51:12.853Z (over 1 year ago)
- Topics: aws-s3, eclipse, java, maven-plugin, p2
- Language: Java
- Size: 128 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# AWS p2 Maven Plugin (aws-p2-maven-plugin)
[![Build Status](https://travis-ci.com/avojak/aws-p2-maven-plugin.svg?branch=master)](https://travis-ci.org/avojak/aws-p2-maven-plugin)
[![Coverage Status](https://coveralls.io/repos/github/avojak/aws-p2-maven-plugin/badge.svg?branch=master)](https://coveralls.io/github/avojak/aws-p2-maven-plugin?branch=master)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/223a3bc2eac54dca90a3f96c8b853cf4)](https://www.codacy.com/app/avojak/aws-p2-maven-plugin?utm_source=github.com&utm_medium=referral&utm_content=avojak/aws-p2-maven-plugin&utm_campaign=Badge_Grade)
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![Maven Central](https://img.shields.io/maven-central/v/com.avojak.mojo/aws-p2-maven-plugin.svg)](http://mvnrepository.com/artifact/com.avojak.mojo/aws-p2-maven-plugin)A Maven plugin for deploying a [p2](https://www.eclipse.org/equinox/p2/) update site to an [AWS S3](https://aws.amazon.com/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.
### Prerequisites
Java 1.7+
Maven 3.1.0+
### Installation
To build the plugin locally, simply run the following:
```
$ mvn clean install
```## Usage
The aws-p2-maven-plugin is available from [Maven Central](http://mvnrepository.com/artifact/com.avojak.mojo/aws-p2-maven-plugin).
Add the plugin to the `build` section of the `pom.xml`:
```xml
com.avojak.mojo
aws-p2-maven-plugin
1.0
p2.example.com
deploy
```
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:
```xmlcom.avojak.mojo
```
For example, `$ mvn aws-p2:deploy -Daws-p2.bucket=p2.example.com`.
### Goals
The following goals are available:
| Goal | Description |
|:---|:---|
| deploy | Deploys the p2 update site |
| help | Display help information on the aws-p2-maven-plugin |### Configuration
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: [p2.avojak.com](http://p2.avojak.com/snapshot/example-eclipse-plugin.site/1.0.0-SNAPSHOT/)
**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:** `${project.name}`
**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.name}/${project.version}`
**User property is:** `aws-p2.targetSiteDirectory` |### Authentication
The AWS p2 Maven Plugin uses the Default Credential Provider Chain for authentication. See
[Working with AWS Credentials](http://docs.aws.amazon.com/sdk-for-java/v1/developer-guide/credentials.html) 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 enabledIt 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
* [Maven](https://maven.apache.org/) - Dependency Management
* [AWS SDK for Java](https://aws.amazon.com/sdk-for-java/) - Used to interact with AWS S3 buckets
* [Travis CI](https://travis-ci.org) - Continuous Integration and Deployment
* [JaCoCo](http://www.eclemma.org/jacoco/) - Code Coverage## Versioning
We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/avojak/aws-p2-maven-plugin/tags).
## More Information
For more information on the development, check out [my blog post](https://blog.avojak.com/2018/08/10/aws-p2-maven-plugin/).
## License
This project is licensed under the Apache License, Version 2.0 - see the [LICENSE](LICENSE) file for details