Skip to content
jcaddel edited this page May 25, 2012 · 54 revisions

Configuring Maven to use the wagon is very simple.

You will need 3 things from Amazon:

  1. S3 bucket name - For example, the Kuali S3 bucket is called - maven.kuali.org
  2. AWS Access Key ID - For example - JKCAIZQRXJVCMWNYAZ2Q - displayed for reference only, not a real id!
  3. AWS Secret Access Key - For example - aIKJN9sL9cu3GsHoti0mqcbH4NNLDCthsn0lms1x - displayed for reference only, definitely not a real secret key. Always guard your secret key very carefully.

Once you have that information follow these 3 steps to configure Maven to use the wagon.

Add this to the build section of a pom:

<build>
 <extensions>
  <extension>
    <groupId>org.kuali.maven.wagons</groupId>
    <artifactId>maven-s3-wagon</artifactId>
    <version>[S3 Wagon Version]</version>
  </extension>
 </extensions>
</build>

Add this to the distribution management section:

<distributionManagement>
 <site>
  <id>s3.site</id>
  <url>s3://[S3 Bucket Name]/site</url>
 </site>
 <repository>
  <id>s3.release</id>
  <url>s3://[S3 Bucket Name]/release</url>
 </repository>
 <snapshotRepository>
  <id>s3.snapshot</id>
  <url>s3://[S3 Bucket Name]/snapshot</url>
 </snapshotRepository>
</distributionManagement>

Add this to ~/.m2/settings.xml

<servers>
 <server>
  <id>s3.site</id>
  <username>[AWS Access Key ID]</username>
  <password>[AWS Secret Access Key]</password>
 </server>
 <server>
  <id>s3.release</id>
  <username>[AWS Access Key ID]</username>
  <password>[AWS Secret Access Key]</password>
 </server>
 <server>
  <id>s3.snapshot</id>
  <username>[AWS Access Key ID]</username>
  <password>[AWS Secret Access Key]</password>
 </server>
</server>
Clone this wiki locally