Uploaded image for project: 'Maven Assembly Plugin'
  1. Maven Assembly Plugin
  2. MASSEMBLY-677

NPE using includeMetadata true for repository in a descriptor.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 2.4
    • None
    • maven-archiver
    • None

    Description

      I'm trying to create a repository via Maven assembly plugin and used the includeMetadata option. If i use false everything is ok (or just remove completely cause false is the default). If i change it to true i got the following failure:

      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.4:single (make-bundles) on project dist: Execution make-bundles of goal org.apache.maven.plugins:maven-assembly-plugin:2.4:single failed. NullPointerException -> [Help 1]
      org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.4:single (make-bundles) on project dist: Execution make-bundles of goal org.apache.maven.plugins:maven-assembly-plugin:2.4:single failed.
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:224)
      	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:317)
      	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
      	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
      	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
      	at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:601)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
      Caused by: org.apache.maven.plugin.PluginExecutionException: Execution make-bundles of goal org.apache.maven.plugins:maven-assembly-plugin:2.4:single failed.
      	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:115)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
      	... 19 more
      Caused by: java.lang.NullPointerException
      	at org.apache.maven.artifact.repository.metadata.AbstractRepositoryMetadata.getLocalFilename(AbstractRepositoryMetadata.java:60)
      	at org.apache.maven.artifact.repository.layout.DefaultRepositoryLayout.pathOfLocalRepositoryMetadata(DefaultRepositoryLayout.java:72)
      	at org.apache.maven.artifact.repository.DefaultArtifactRepository.pathOfLocalRepositoryMetadata(DefaultArtifactRepository.java:128)
      	at org.apache.maven.shared.repository.DefaultRepositoryAssembler.assembleRepositoryMetadata(DefaultRepositoryAssembler.java:487)
      	at org.apache.maven.shared.repository.DefaultRepositoryAssembler.buildRemoteRepository(DefaultRepositoryAssembler.java:231)
      	at org.apache.maven.plugin.assembly.archive.phase.RepositoryAssemblyPhase.execute(RepositoryAssemblyPhase.java:99)
      	at org.apache.maven.plugin.assembly.archive.DefaultAssemblyArchiver.createArchive(DefaultAssemblyArchiver.java:183)
      	at org.apache.maven.plugin.assembly.mojos.AbstractAssemblyMojo.execute(AbstractAssemblyMojo.java:436)
      	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
      	... 20 more
      [ERROR] 
      

      Created a github project to reproduce the problem and attached the project which produces the failure.
      The assembly-repository is exactly as the assembly-repository-failure except with the difference in the includeMetadata entry in the assembly descriptor.

      Attachments

        1. assemblies-repository-failure.zip
          48 kB
          Karl Heinz Marbaise

        Issue Links

          Activity

            People

              Unassigned Unassigned
              khmarbaise Karl Heinz Marbaise
              Votes:
              5 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated: