java maven s3 旅行车供应商
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/850570/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
maven s3 wagon provider
提问by dfa
How to deploy with wagon s3 provider?
如何使用 wagon s3 提供商进行部署?
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.
我发现了几个插件,其中大部分是不完整的,其中一些没有维护。还有一个来自官方 maven SVN 存储库的沙箱插件,但我正在考虑如何使用它。
Any hint?
任何提示?
回答by elek
There is a newer s3 provider by spring which works:
spring 有一个较新的 s3 提供程序,它可以工作:
<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.
如果你想在 maven 3 中使用它,你需要在你的 settings.xml 中加密你的密码。
Step-by-step instructions are here.
分步说明在这里。
回答by Jeff Caddel
This wagonis what we are using to deploy to S3. It's similar to Spring's, but has multi-threaded upload support.
这辆旅行车是我们用来部署到 S3 的。它类似于 Spring 的,但具有多线程上传支持。
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)
这让 CI 服务器可以非常快速地将大量 Maven 内容推送到 S3。(约 50 秒内 22k 文件和 400mb 的内容)
https://github.com/jcaddel/maven-s3-wagon
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>
回答by yegor256
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:
然后在settings.xml:
<servers>
<server>
<id>foo.s3</id>
<username>AKIAJ.......OLVBA</username>
<password>PsndORui..............KGZtDpeIYjsA/</password>
</server>
</servers>
And then in your pom.xml:
然后在你的pom.xml:
<distributionManagement>
<repository>
<id>foo</id>
<url>s3://foo.s3/</url>
</repository>
</distributionManagement>
Should work.
应该管用。
回答by Shannon
Another option, which is a fork of the jcaddel plugin, was last updated March 2016 but works for me:
另一个选项是 jcaddel 插件的一个分支,最后更新于 2016 年 3 月,但对我有用:
<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.
看起来主要的弱点是:旧的 AWS SDK 版本,不使用默认的 AWS 凭证链,因此缺乏对 ECS 凭证等内容的支持。此外,URL 中的“@”和“:”等字符未正确编码,但我不确定这是否是 wagon 或 Maven 的问题。

