使用maven-release-plugin构建的Jenkins失败

时间:2015-07-15 14:39:46

标签: java maven jenkins

在使用maven-release-plugin进行jenkins构建(Java 8,IBM sdk)期间,是否有人遇到以下异常:

[INFO] An exception has occurred in the compiler (1.8.0-internal). Please file a bug at the Java Developer Connection (http://java.sun.com/webapps/bugreport)  after checking the Bug Parade for duplicates. Include your program and the following diagnostic in your report.  Thank you.
[INFO] java.lang.NullPointerException
[INFO]  at javax.lang.model.util.ElementScanner6.scan(ElementScanner6.java:142)
[INFO]  at javax.lang.model.util.ElementScanner6.visitType(ElementScanner6.java:189)
[INFO]  at com.sun.tools.javac.processing.JavacProcessingEnvironment$ComputeAnnotationSet.visitType(JavacProcessingEnvironment.java:777)
[INFO]  at com.sun.tools.javac.processing.JavacProcessingEnvironment$ComputeAnnotationSet.visitType(JavacProcessingEnvironment.java:758)
[INFO]  at com.sun.tools.javac.code.Symbol$ClassSymbol.accept(Symbol.java:1162)
[INFO]  at javax.lang.model.util.ElementScanner6.scan(ElementScanner6.java:157)
[INFO]  at com.sun.tools.javac.processing.JavacProcessingEnvironment$ComputeAnnotationSet.scan(JavacProcessingEnvironment.java:798)
[INFO]  at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.findAnnotationsPresent(JavacProcessingEnvironment.java:993)
[INFO]  at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.<init>(JavacProcessingEnvironment.java:891)
[INFO]  at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1182)
[INFO]  at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1182)

进一步的例外情况:

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.5.1:prepare (default-cli) on project [myProject]: Maven execution failed, exit code: '1'
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)

没有maven-release-plugin,构建成功。插件配置如下:

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-release-plugin</artifactId>
    <version>2.5.1</version>
    <configuration>
        <tagBase>[myTagUrl]</tagBase>
        <tagNameFormat>@{project.version}</tagNameFormat>
        <branchBase>[myBranchUrl]</branchBase>
        <checkModificationExcludes>
            <checkModificationExclude>src/main/java/META-INF/sun-jaxb.episode</checkModificationExclude>
        </checkModificationExcludes>
    </configuration>
</plugin>

Java版本信息: java version "1.8.0" Java(TM) SE Runtime Environment (build pap6480sr1-20150417_01(SR1)) IBM J9 VM (build 2.8, JRE 1.8.0 AIX ppc64-64 Compressed References 20150410_243669 (JIT enabled, AOT enabled) J9VM - R28_Java8_SR1_20150410_1531_B243669 JIT - tr.r14.java_20150402_88976.03 GC - R28_Java8_SR1_20150410_1531_B243669_CMPRSS J9CL - 20150410_243669) JCL - 20150413_01 based on Oracle jdk8u45-b13

解决方案: 显然,maven-release-plugin和apt-maven-plugin存在资源访问问题(可能是由于release-plugin创建的线程)。 因此,在apt-maven-plugin被调用之前等待几秒就解决了这个问题。

0 个答案:

没有答案