简体   繁体   English

Maven的间歇性问题,缺少必需的类

[英]Intermittent issue with Maven with required class missing

When building ActiveJDBC (I'm the author of the project), it first builds a Maven plugin: https://github.com/javalite/activejdbc/tree/master/activejdbc-instrumentation After the plugin is installed, it is used on a different project module (this is a multi-module project). 在构建ActiveJDBC(我是项目的作者)时,它首先构建一个Maven插件: https : //github.com/javalite/activejdbc/tree/master/activejdbc-instrumentation安装该插件后,将其用于一个不同的项目模块(这是一个多模块项目)。 Sometimes the build succeeds and sometimes it breaks with this error message: 有时构建成功,有时会因以下错误消息而中断:

[INFO] JavaLite - Common .................................. SUCCESS [  4.241 s]
[INFO] JavaLite - Instrumentation Plugin and JavaAgent .... SUCCESS [  2.590 s]
[INFO] JavaLite - ActiveJDBC ORM Framework ................ FAILURE [  5.526 s]
[INFO] JavaLite - DB-Migrator Maven Plugin ................ SKIPPED
[INFO] JavaLite - DB-Migrator Integration Test ............ SKIPPED
[INFO] JavaLite - Git Info Maven plugin ................... SKIPPED
[INFO] JavaLite - ActiveJDBC Root ......................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 12.572 s
[INFO] Finished at: 2014-10-27T23:01:22-05:00
[INFO] Final Memory: 26M/271M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.javalite:activejdbc-instrumentation:1.4.10-SNAPSHOT:instrument (default) on project activejdbc: Execution default of goal org.javalite:activejdbc-instrumentation:1.4.10-SNAPSHOT:instrument failed: A required class was missing while executing org.javalite:activejdbc-instrumentation:1.4.10-SNAPSHOT:instrument: javassist/ClassPath
[ERROR] -----------------------------------------------------
[ERROR] realm =    plugin>org.javalite:activejdbc-instrumentation:1.4.10-SNAPSHOT
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/home/igor/projects/javalite/activejdbc/activejdbc-instrumentation/target/activejdbc-instrumentation-1.4.10-SNAPSHOT.jar
[ERROR] urls[1] = file:/home/igor/.m2/repository/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar
[ERROR] urls[2] = file:/home/igor/projects/javalite/activejdbc/activejdbc/target/classes/
[ERROR] urls[3] = file:/home/igor/.m2/repository/org/slf4j/slf4j-api/1.7.5/slf4j-api-1.7.5.jar
[ERROR] urls[4] = file:/home/igor/projects/javalite/activejdbc/javalite-common/target/javalite-common-1.4.10-SNAPSHOT.jar
[ERROR] urls[5] = file:/home/igor/projects/javalite/activejdbc/activejdbc/target/test-classes/
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent: null]]
[ERROR] 
[ERROR] -----------------------------------------------------: javassist.ClassPath
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[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
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :activejdbc

As far as I can see, the issue is: A required class was missing while executing org.javalite:activejdbc-instrumentation:1.4.10-SNAPSHOT:instrument: javassist/ClassPath 据我所知,问题是: A required class was missing while executing org.javalite:activejdbc-instrumentation:1.4.10-SNAPSHOT:instrument: javassist/ClassPath

However this class is packaged directly into the jar file of the plugin, please see here: https://oss.sonatype.org/content/repositories/snapshots/org/javalite/activejdbc/1.4.10-SNAPSHOT/ 但是,此类直接打包到插件的jar文件中,请参见此处: https : //oss.sonatype.org/content/repositories/snapshots/org/javalite/activejdbc/1.4.10-SNAPSHOT/

So, the build sometimes works, but sometimes breaks.. without any changes in code or configuration - on the same terminal window. 因此,构建有时会起作用,但有时会中断..在相同的终端窗口上,无需更改代码或配置即可。 Basically, I need to build a few times, before I get success. 基本上,在获得成功之前,我需要进行几次构建。 Please, help identify and fix the issue, 请帮助确定并解决问题,

I tried Maven 3.0.4 and 3.2.3. 我尝试了Maven 3.0.4和3.2.3。

thanks 谢谢

Do you have a dependency on javassist in the pom.. 您对pom中的javassist有依赖性吗?

<dependency> 
  <groupId>javassist</groupId>
  <artifactId>javassist</artifactId>
  <version>3.18.2.GA</version>
</dependency>

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

相关问题 Maven 阴影 IllegalStateException - 缺少必需的 class 信息 - Maven shade IllegalStateException - Required class information is missing Maven with Kotlin 1.2:所需的课程缺少kotlin / reflect / KDeclarationContainer - Maven with Kotlin 1.2 : A required class was missing kotlin/reflect/KDeclarationContainer maven jboss-as:start缺少必需的类…org / sonaty…/ ArtifactResolutionException - maven jboss-as:start A required class was missing … org/sonaty…/ArtifactResolutionException Maven Jaxb插件错误-缺少必需的类 - Maven Jaxb plugin error-Required class missing 执行 org.apache.maven.plugins:maven-war-plugin:2.1.1:war 时缺少必需的类 - A required class was missing while executing org.apache.maven.plugins:maven-war-plugin:2.1.1:war A required class was missing while executing org.apache.maven.plugins:maven-jar-plugin:3.2.0:jar - A required class was missing while executing org.apache.maven.plugins:maven-jar-plugin:3.2.0:jar 执行com.google.appengine时,缺少必需的类:appengine-maven-plugin:1.9.4 - A required class was missing while executing com.google.appengine:appengine-maven-plugin:1.9.4 Maven错误消息“缺少1个必需的工件” - maven error message “1 required artifact is missing” 执行时缺少必需的类 - A required class was missing while executing Maven安装后缺少类 - Missing Class after Maven Install
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM