简体   繁体   English

Maven发布插件错误

[英]Maven release plugin errors

I am using the Jenkins M2 release plugin which calls the maven-release-plugin 2.3.2 internally. 我正在使用Jenkins M2发行插件 ,该插件在内部调用maven-release-plugin 2.3.2 And I am getting this error: 我收到此错误:

 Waiting for Jenkins to finish collecting data
    mavenExecutionResult exceptions not empty
    message : Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.3.2:prepare (default-cli) on project pms: Execution default-cli of goal org.apache.maven.plugins:maven-release-plugin:2.3.2:prepare failed: A required class was missing while executing org.apache.maven.plugins:maven-release-plugin:2.3.2:prepare: org.sonatype.plexus.components.cipher.PlexusCipher
    realm =    plugin>org.apache.maven.plugins:maven-release-plugin:2.3.2
    strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
...


    cause : Execution default-cli of goal org.apache.maven.plugins:maven-release-plugin:2.3.2:prepare failed: A required class was missing while executing org.apache.maven.plugins:maven-release-plugin:2.3.2:prepare: org.sonatype.plexus.components.cipher.PlexusCipher
    -----------------------------------------------------
    realm =    plugin>org.apache.maven.plugins:maven-release-plugin:2.3.2
    strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
    urls[0] = file:/opt/.../repository/org/apache/maven/plugins/maven-release-plugin/2.3.2/maven-release-plugin-2.3.2.jar
    urls[1] = file:/opt/.../repository/org/apache/maven/release/maven-release-manager/2.3.2/maven-release-manager-2.3.2.jar
...


    Number of foreign imports: 1
    import: Entry[import  from realm ClassRealm[maven.api, parent: null]]

    -----------------------------------------------------

        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:127)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
        ... 27 more
    Caused by: org.apache.maven.plugin.PluginContainerException: A required class was missing while executing org.apache.maven.plugins:maven-release-plugin:2.3.2:prepare: org.sonatype.plexus.components.cipher.PlexusCipher
    -----------------------------------------------------
    realm =    plugin>org.apache.maven.plugins:maven-release-plugin:2.3.2
...

    Caused by: java.lang.ClassNotFoundException: org.sonatype.plexus.components.cipher.PlexusCipher
        at java.lang.ClassNotFoundException.<init>(ClassNotFoundException.java:76)
        at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:38)
        at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:244)
        at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:230)
        ... 169 more
    channel stopped
    Finished: FAILURE

what am I missing ? 我想念什么?

Ideally you should not get such java dependency exceptions in a stable Maven version released to the world. 理想情况下,您不应在向世界发布的稳定Maven版本中获得此类Java依赖项异常。 If you still do, chances are 如果您仍然这样做,则很有可能

  1. Either this is a bug which is well documented and should be easy to find using search engines. 要么这是一个有据可查的错误,应该可以使用搜索引擎轻松找到。
  2. If you can not arrive at such a place then its worthwhile to at least once do this : purge everything and start on a clean slate before you ask this on a QA site. 如果您无法到达这样的地方,那么至少值得一次这样做:清除所有内容,然后从干净的石板开始,然后再在质量检查网站上询问。

In the above case, what helped me was option 2. 在上述情况下,帮助我的是选项2。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM