dfa
dfa

Reputation: 116334

maven s3 wagon provider

How to deploy with wagon s3 provider?

I've found several plugins, most of them are incomplete, some of them are not maintaned. There is also a sandbox plugin from official maven SVN repository but I'm figuring how to use it.

Any hint?

Upvotes: 17

Views: 21343

Answers (5)

Markus T
Markus T

Reputation: 1594

I made one that supports AWS SSO (OIDC auth) that uses the second version of the SDK. Maybe it can be useful for you too.

https://github.com/embriq-nordic/aws-oidc-s3-maven-wagon

<extension>
    <groupId>io.github.embriq-nordic</groupId>
    <artifactId>aws-oidc-s3-maven-wagon</artifactId>
    <version>1.1.0</version>
</extension>

Since it uses the second version of the SDK it uses the credentials provider chain used by that one.

Upvotes: 1

Shannon
Shannon

Reputation: 1163

Another option, which is a fork of the jcaddel plugin, was last updated March 2016 but works for me:

<extension>
    <groupId>co.axiomzen.maven.wagons</groupId>
    <artifactId>maven-s3-wagon</artifactId>
    <version>1.2.6</version>
</extension>

Looks like the main weaknesses are: old AWS SDK version, doesn't use the Default AWS Credentials Chain, so lacks support for things like credentials from ECS. Also, characters like "@" and ":" in the URL don't get encoded properly, though I'm not sure if that's a problem with the wagon or with Maven.

Upvotes: 1

Jeff Caddel
Jeff Caddel

Reputation: 344

This wagon is what we are using to deploy to S3. It's similar to Spring's, but has multi-threaded upload support.

This lets the CI server push a lot of Maven content out to S3 very quickly. (22k files and 400mb's of content in ~50 seconds)

https://github.com/jcaddel/maven-s3-wagon

<build>
 <extensions>
   <extension>
    <groupId>org.kuali.maven.wagons</groupId>
    <artifactId>maven-s3-wagon</artifactId>
    <version>1.2.1</version>
   </extension>
 </extensions>
</build>

Upvotes: 13

elek
elek

Reputation: 4746

There is a newer s3 provider by spring which works:

<build>
    <extensions>
        <extension>
            <groupId>org.springframework.build.aws</groupId>
            <artifactId>org.springframework.build.aws.maven</artifactId>
            <version>3.0.0.RELEASE</version>
        </extension>
    </extensions>
</build>

If you would like to use it with maven 3, you need encrypt you passphrase in your settings.xml.

Step-by-step instructions are here.

Upvotes: 13

yegor256
yegor256

Reputation: 105063

Another alternative:

<build>
  <extensions>
    <extension>
      <groupId>org.cyclopsgroup</groupId>
      <artifactId>awss3-maven-wagon</artifactId>
      <version>0.1</version>
    </extension>
  </extensions>
  [...]
</build>

Then in settings.xml:

<servers>
  <server>
    <id>foo.s3</id>
    <username>AKIAJ.......OLVBA</username>
    <password>PsndORui..............KGZtDpeIYjsA/</password>
  </server>
</servers>

And then in your pom.xml:

<distributionManagement>
  <repository>
    <id>foo</id>
    <url>s3://foo.s3/</url>
  </repository>
</distributionManagement>

Should work.

Upvotes: 2

Related Questions