Ant*_*nne 9 maven-plugin maven-3 maven aether
Maven的3.1.0版本依赖于Eclipse Aether(org.eclipse.aether)而不是Sonatype Aether(org.sonatype.aether).这似乎打破了依赖于Sonatype aether的插件的兼容性:尝试运行这样的插件,你会遇到:
java.lang.NoClassDefFoundError: org/sonatype/aether/*
Caused by: java.lang.ClassNotFoundException: org.sonatype.aether.*
Run Code Online (Sandbox Code Playgroud)
如https://cwiki.apache.org/confluence/display/MAVEN/AetherClassNotFound中所述
现在,是否有可能依赖于以太类(例如org.sonatype.aether.RepositorySystemSession)与Maven 3.0.x和Maven 3.1.x一起运行?
或者我是否必须发布同一插件的两个版本,一个用于3.0.x,另一个用于3.1.x?像这样执行强制执行规则:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>1.3</version>
<executions>
<execution>
<id>enforce-maven</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireMavenVersion>
<version>[3.0,3.1)</version>
</requireMavenVersion>
</rules>
</configuration>
</execution>
</executions>
</plugin>
Run Code Online (Sandbox Code Playgroud)
我已经在Maven开发者邮件列表上发布了这个问题,但到目前为止还没有答案......
这些插件大多数都依赖于Maven 依赖关系树,无论 Maven 版本如何,它都能够收集正确的依赖关系集。2.1 版本的发布是为了支持 Sonatype Aether 旁边的 Eclipse Aether 如果您的插件可以使用此组件,那么您应该可以省钱。
| 归档时间: |
|
| 查看次数: |
2709 次 |
| 最近记录: |