Maven插件容器异常

时间:2015-11-26 17:12:24

标签: java git maven jira

我正在尝试按照Atlassian的教程来创建自己的Jira插件,用于hello world或从他们的git repo导入现有的插件。

在克隆git repo之后,我尝试在项目上进行Maven clean安装,但是我得到了一个带有以下stacktrace的PluginContainerException。

Failed to execute goal com.atlassian.maven.plugins:maven-jira-plugin:4.2.0:copy-bundled-dependencies (default-copy-bundled-dependencies) on project new-listener-plugin: Execution default-copy-bundled-dependencies of goal com.atlassian.maven.plugins:maven-jira-plugin:4.2.0:copy-bundled-dependencies failed: 
An API incompatibility was encountered while executing com.atlassian.maven.plugins:maven-jira-plugin:4.2.0:copy-bundled-dependencies: java.lang.NoSuchMethodError: org.apache.maven.execution.MavenSession.getRepositorySession()Lorg/sonatype/aether/RepositorySystemSession;

[ERROR] -----------------------------------------------------
[ERROR] realm =    plugin>com.atlassian.maven.plugins:maven-jira-plugin:4.2.0
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/C:/Users/myname/.m2/repository/com/atlassian/maven/plugins/maven-jira-plugin/4.2.0/maven-jira-plugin-4.2.0.jar
[ERROR] urls[1] = file:/C:/Users/myname/.m2/repository/com/atlassian/maven/archetypes/jira-plugin-archetype/4.2.0/jira-plugin-archetype-4.2.0.jar
[ERROR] urls[2] = file:/C:/Users/myname/.m2/repository/com/atlassian/maven/plugins/maven-amps-plugin/4.2.0/maven-amps-plugin-4.2.0.jar
[ERROR] urls[3] = file:/C:/Users/myname/.m2/repository/com/atlassian/core/atlassian-core/4.0/atlassian-core-4.0.jar
[ERROR] urls[4] = file:/C:/Users/myname/.m2/repository/com/atlassian/profiling/atlassian-profiling/1.3/atlassian-profiling-1.3.jar
[ERROR] urls[5] = file:/C:/Users/myname/.m2/repository/javax/servlet/servlet-api/2.3/servlet-api-2.3.jar
[ERROR] urls[6] = file:/C:/Users/myname/.m2/repository/p6spy/p6spy/1.3/p6spy-1.3.jar
[ERROR] urls[7] = file:/C:/Users/myname/.m2/repository/commons-collections/commons-collections/3.1/commons-collections-3.1.jar
[ERROR] urls[8] = file:/C:/Users/myname/.m2/repository/commons-lang/commons-lang/2.4/commons-lang-2.4.jar
[ERROR] urls[9] = file:/C:/Users/myname/.m2/repository/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar
[ERROR] urls[10] = file:/C:/Users/myname/.m2/repository/osuser/osuser/1.0-dev-log4j-1.4jdk-7Dec05/osuser-1.0-dev-log4j-1.4jdk-7Dec05.jar
[ERROR] urls[11] = file:/C:/Users/myname/.m2/repository/opensymphony/propertyset/1.3-21Nov03/propertyset-1.3-21Nov03.jar
[ERROR] urls[12] = file:/C:/Users/myname/.m2/repository/opensymphony/sitemesh/2.3/sitemesh-2.3.jar
[ERROR] urls[13] = file:/C:/Users/myname/.m2/repository/dom4j/dom4j/1.4/dom4j-1.4.jar
[ERROR] urls[14] = file:/C:/Users/myname/.m2/repository/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar
[ERROR] urls[15] = file:/C:/Users/myname/.m2/repository/jaxen/jaxen/1.0-FCS/jaxen-1.0-FCS.jar
[ERROR] urls[16] = file:/C:/Users/myname/.m2/repository/saxpath/saxpath/1.0-FCS/saxpath-1.0-FCS.jar
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException

1 个答案:

答案 0 :(得分:1)

这是由不兼容的Maven和maven-amps-plugin版本引起的。此项目目前引用maven-amps-plugin版本4.2.0,仅适用于Maven2。由于您可能使用Maven 3,因此您需要:

  • 将你的pom中的maven-amps-plugin依赖项更改为更新的东西(如5.1.18)
  • 您可以选择下载较旧的Maven版本(Maven2),如果您不想触摸此项目,请使用该版本。