添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.3:single (make-assembly) on project xyz: Execution make-assembly of goal org.apache.maven.plugins:maven-assembly-plugin:2.3:single failed. NullPointerException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.3:single (make-assembly) on project xyz: Execution make-assembly of goal org.apache.maven.plugins:maven-assembly-plugin:2.3:single failed.
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution make-assembly of goal org.apache.maven.plugins:maven-assembly-plugin:2.3:single failed.
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:110)
Caused by: java.lang.NullPointerException
    at org.codehaus.plexus.components.io.resources.PlexusIoURLResource.getContents(PlexusIoURLResource.java:38)
            
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.4:single (make-assembly) on project xyz: Failed to create assembly: Error creating assembly archive withdep: Problem creating jar: jar:file:/opt/bamboo-agent-home/xml-data/build-dir/PROJ-PLAN-JOB/target/xyz-1.0.0-SNAPSHOT.jar!/instrumentation.ser -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.4:single (make-assembly) on project xyz: Failed to create assembly: Error creating assembly archive withdep: Problem creating jar: jar:file:/opt/bamboo-agent-home/xml-data/build-dir/PROJ-PLAN-JOB/target/xyz-1.0.0-SNAPSHOT.jar!/instrumentation.ser
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to create assembly: Error creating assembly archive withdep: Problem creating jar: jar:file:/opt/bamboo-agent-home/xml-data/build-dir/PROJ-PLAN-JOB/target/xyz-1.0.0-SNAPSHOT.jar!/instrumentation.ser
    at org.apache.maven.plugin.assembly.mojos.AbstractAssemblyMojo.execute(AbstractAssemblyMojo.java:495)
Caused by: org.apache.maven.plugin.assembly.archive.ArchiveCreationException: Error creating assembly archive withdep: Problem creating jar: jar:file:/opt/bamboo-agent-home/xml-data/build-dir/PROJ-PLAN-JOB/target/xyz-1.0.0-SNAPSHOT.jar!/instrumentation.ser
    at org.apache.maven.plugin.assembly.archive.DefaultAssemblyArchiver.createArchive(DefaultAssemblyArchiver.java:190)
Caused by: org.codehaus.plexus.archiver.ArchiverException: Problem creating jar: jar:file:/opt/bamboo-agent-home/xml-data/build-dir/PROJ-PLAN-JOB/target/xyz-1.0.0-SNAPSHOT.jar!/instrumentation.ser
    at org.codehaus.plexus.archiver.AbstractArchiver.createArchive(AbstractArchiver.java:927)
Caused by: java.io.IOException: jar:file:/opt/bamboo-agent-home/xml-data/build-dir/PROJ-PLAN-JOB/target/xyz-1.0.0-SNAPSHOT.jar!/instrumentation.ser
    at org.codehaus.plexus.components.io.resources.PlexusIoURLResource.getContents(PlexusIoURLResource.java:38)

 

原因

A problem is related with BAM-13208 - Getting issue details... STATUS .

When automatic Clover integration is selected, all Maven tasks defined in a Job are enhanced by new set of goals/phases (like "clean clover:setup verify clover:aggregate clover:clover") which are being appended at the end of the original Maven command defined in the task(s). Due to a fact that:

  • Maven performs build module-by-module and not phase-by-phase (for example: if a project has module A and module B and you run 'mvn clean package' then Maven runs first 'clean package' for module A, and next 'clean package' for module B) and that
  • Clover's automatic integration in Bamboo calls the "verify" phase

it causes that the same build phases are called twice - once without Clover and once with Clover. In our example, goals "mvn clean package" are changed to "mvn clean package clean clover:setup verify clover:aggregate clover:clover".

 

In this case, a maven-assembly-plugin running in a build phase without Clover (i.e. before the clover:setup) is trying to access resources from dependent modules, which have been already instrumented by Clover (i.e. created in the phase after clover:setup). As a consequence, Maven Assembly Plugin fails accessing files like: