Jeff Caddel edited this page Nov 6, 2015 · 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 - eg - JKCAIZQRXJVCMWNYAZ2Q - for reference only, not a real id.
  3. AWS Secret Access Key - eg - aIKJN9sL9cu3GsHoti0mqcbH4NNLDCthsn0lms1x - for reference only, not a real secret key.

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 or use one of the other 3 authentication techniques

<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>
</servers>

If things are setup correctly, $ mvn deploy will produce output similar to this:

[INFO] --- maven-deploy-plugin:2.7:deploy (default-deploy) @ kuali-example ---
[INFO] Logged in - maven.kuali.org
Uploading: s3://maven.kuali.org/release/org/kuali/common/kuali-example/1.0.0/kuali-example-1.0.0.jar
[INFO] Logged off - maven.kuali.org
[INFO] Transfers: 1 Time: 2.921s Amount: 7.6M Throughput: 2.6 MB/s
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.