Maven可以从私有s3存储桶中引用父POM吗? [英] Can Maven ref a parent POM from a private s3 bucket?
问题描述
当使用私有 AWS S3存储桶作为Maven存储库时,有很多工作的s3旅行车提供程序可以很好地使用s3://[bucket]/folder协议部署和提取依赖项
When using a private AWS S3 bucket as a Maven repo, there's plenty of working s3 wagon providers that work just fine for deploying and pulling dependencies using the s3://[bucket]/folder protocol.
但是,当您尝试使用父POM引用来执行此操作时,即
However, when you try to do this with a parent POM reference, i.e.
<parent>
<groupId>com.my.company</groupId>
<artifactId>my-parent-pom</artifactId>
<version>1.0.0</version>
</parent>
仅存在于私有 S3 Maven存储库中,似乎Maven仅检查基于HTTP的已定义存储库,而不会尝试查看S3存储库.
Which exists only in a private S3 Maven repo, it seems that Maven only checks the HTTP based defined repositories, and doesn't attempt to look in the S3 repo.
此项目中的S3旅行车定义为
The S3 wagon in this project is defined as
<build>
<extensions>
<extension>
<groupId>org.springframework.build</groupId>
<artifactId>aws-maven</artifactId>
<version>5.0.0.RELEASE</version>
</extension>
</extensions>
</build>
对于正常的依赖关系,这又可以很好地工作,只是对于父POM引用而言不是这样
Which, again, works fine for normal dependencies, just not for a parent POM reference
寻找在S3 Maven存储库中可以正确解决的方法来使父POM得以解决
Looking for some way to have a parent POM be properly resolved inside an S3 Maven repo
推荐答案
Per my comment on the other post in this thread: If you're using Maven 3.2.5 or later, you can specify the plugin as a JAR on the command line.
如果您使用的是Maven 3.3.1或更高版本,请在您的项目中创建一个定义S3旅行车的.mvn/extensions.xml
文件,以便在解析父POM时将其预先加载.
If you're using Maven 3.3.1 or later, create a .mvn/extensions.xml
file in your project that defines the S3 wagon so that it's pre-loaded by the time the parent POM is being resolved.
有关详细信息,请参见Maven的3.3.1发行说明: https://maven.apache.org/docs/3.3.1/release-notes.html
See Maven's 3.3.1 release notes for details: https://maven.apache.org/docs/3.3.1/release-notes.html
这篇关于Maven可以从私有s3存储桶中引用父POM吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!