org.apache.maven.plugins maven-war-plugin 2.6 false
This plugin uses the Java API for XML Binding (JAXB), version 2+, to generate Java classes from XML Schemas (and optionally binding files) and to create XML Schemas from annotated Java classes. The plugin delegates most of its work to either of the two JDK-supplied tools XJC and Schemagen, through its JAXB implementation dependencies.
Amazon S3 is a perfect place for keeping private Maven artifacts. I assume you keep public artifacts in Maven Central because you want them to be available to everybody. Private artifacts are those you don’t want visible to anyone except members of your team. Thus, you want to deploy your
.jarfiles there and make sure they are visible only by your team. Here is how we do this in all our Java projects.
Create an S3 Bucket
First, you create a new S3 bucket. I would recommend you name it using your project domain and a prefix. For example, with
repo is a prefix and
teamed.io is the domain.
There’s no need to configure any permissions for this bucket. Just create it through the Amazon S3 console.
Create an IAM User
Create a new IAM user. I recommend you name it like
teamed-maven if your project name is
Add a new “inline policy” to the user:
repo.teamed.io is the name of the S3 bucket you created a minute ago.
Make sure you have an “access key” for this new user. It must look similar to this:
The key is 20 characters (all caps), and the secret is 40 characters.
Add this configuration to your
Add this configuration to
Then, configure S3 Wagon, also in
You’re ready to go. You can deploy your artifacts just by running Maven from the command line:
Another recommendation is to configure rultor.com for deployment of your artifacts to S3 automatically.
First, encrypt your
settings.xml with this Rultor remote:
me/test, you should use the name of your GitHub project.
As a result, you will get a new file named
settings.xml.asc. Add it to the root directory of your project, then commit and push. The file contains your secret information, but only the Rultor server can decrypt it.
.rultor.yml file in the root directory of your project (The Rultor reference page explains this format in greater detail):
Now it’s time to see how it all works together. Create a new ticket in the GitHub issue tracker and post something like this into it (read more about Rultor commands):
You will get a response in a few seconds. The rest will be done by Rultor.
You may also find these related posts interesting: Object-Oriented Declarative Input/Output in Cactoos; My Favorite Websites; My Work Environment; Design Patterns and Anti-Patterns, Love and Hate; How to Deploy to CloudBees, in One Click;