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

Nullpointer in assembly:single when upgrading to 3.7.0

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.7.0
    • 3.7.1
    • None
    • None

    Description

      I just upgraded to 3.7.0 (from 3.6.0) and end up with something very similar to MASSEMBLY-659.

      The assembly file is https://github.com/xwiki/xwiki-rendering/blob/master/xwiki-rendering-standalone/src/assemble/zip-with-dependencies.xml and when building I get:

      21:59:56,428 [INFO] [jenkins-event-spy] Generated /root/workspace/XWiki_xwiki-rendering_master@tmp/withMaven50b764e5/maven-spy-20240313-215448-41518180198517015559409.log
      
      21:59:56,429 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:3.7.0:single (default) on project xwiki-rendering-standalone: Execution default of goal org.apache.maven.plugins:maven-assembly-plugin:3.7.0:single failed: Cannot invoke "java.io.File.isFile()" because "this.inputFile" is null -> [Help 1]
      
      org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:3.7.0:single (default) on project xwiki-rendering-standalone: Execution default of goal org.apache.maven.plugins:maven-assembly-plugin:3.7.0:single failed: Cannot invoke "java.io.File.isFile()" because "this.inputFile" is null
          at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:333)
          at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
          at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
          at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
          at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73)
          at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53)
          at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118)
          at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
          at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
          at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
          at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906)
          at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
          at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
          at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
          at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
          at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke (Method.java:568)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:283)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:226)
          at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:407)
          at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:348)
      
      Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default of goal org.apache.maven.plugins:maven-assembly-plugin:3.7.0:single failed: Cannot invoke "java.io.File.isFile()" because "this.inputFile" is null
          at com.gradle.maven.scan.extension.internal.d.a.executeMojo (SourceFile:121)
          at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328)
          at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
          at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
          at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
          at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73)
          at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53)
          at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118)
          at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
          at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
          at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
          at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906)
          at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
          at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
          at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
          at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
          at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke (Method.java:568)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:283)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:226)
          at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:407)
          at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:348)
      
      Caused by: java.lang.NullPointerException: Cannot invoke "java.io.File.isFile()" because "this.inputFile" is null
          at org.apache.maven.plugins.assembly.archive.archiver.AssemblyProxyArchiver$DefaultFileInfo.isFile (AssemblyProxyArchiver.java:843)
          at org.apache.maven.plugins.assembly.filter.ComponentsXmlArchiverFileFilter.isSelected (ComponentsXmlArchiverFileFilter.java:146)
          at org.apache.maven.plugins.assembly.archive.archiver.AssemblyProxyArchiver.acceptFile (AssemblyProxyArchiver.java:653)
          at org.apache.maven.plugins.assembly.archive.archiver.AssemblyProxyArchiver.addFile (AssemblyProxyArchiver.java:364)
          at org.apache.maven.plugins.assembly.archive.task.AddArtifactTask.asFile (AddArtifactTask.java:157)
          at org.apache.maven.plugins.assembly.archive.task.AddArtifactTask.execute (AddArtifactTask.java:122)
          at org.apache.maven.plugins.assembly.archive.task.AddDependencySetsTask.addNormalArtifact (AddDependencySetsTask.java:244)
          at org.apache.maven.plugins.assembly.archive.task.AddDependencySetsTask.addDependencySet (AddDependencySetsTask.java:162)
          at org.apache.maven.plugins.assembly.archive.task.AddDependencySetsTask.execute (AddDependencySetsTask.java:115)
          at org.apache.maven.plugins.assembly.archive.phase.DependencySetAssemblyPhase.execute (DependencySetAssemblyPhase.java:84)
          at org.apache.maven.plugins.assembly.archive.DefaultAssemblyArchiver.createArchive (DefaultAssemblyArchiver.java:172)
          at org.apache.maven.plugins.assembly.mojos.AbstractAssemblyMojo.execute (AbstractAssemblyMojo.java:493)
          at org.apache.maven.plugins.assembly.mojos.SingleAssemblyMojo.execute (SingleAssemblyMojo.java:54)
          at com.gradle.maven.cache.extension.d.c.a (SourceFile:27)
          at com.gradle.maven.cache.extension.d.n.a (SourceFile:23)
          at com.gradle.maven.cache.extension.d.h.a (SourceFile:28)
          at com.gradle.maven.cache.extension.d.m.a (SourceFile:27)
          at com.gradle.maven.cache.extension.d.a.c (SourceFile:115)
          at com.gradle.maven.cache.extension.d.a.a (SourceFile:61)
          at com.gradle.maven.cache.extension.d.e.a (SourceFile:27)
          at com.gradle.maven.cache.extension.d.l.a (SourceFile:17)
          at com.gradle.maven.cache.extension.d.d.a (SourceFile:42)
          at com.gradle.maven.cache.extension.d.b.a (SourceFile:26)
          at com.gradle.maven.cache.extension.d.f$1.run (SourceFile:35)
          at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute (SourceFile:29)
          at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute (SourceFile:26)
          at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute (SourceFile:66)
          at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute (SourceFile:59)
          at org.gradle.internal.operations.DefaultBuildOperationRunner.execute (SourceFile:157)
          at org.gradle.internal.operations.DefaultBuildOperationRunner.execute (SourceFile:59)
          at org.gradle.internal.operations.DefaultBuildOperationRunner.run (SourceFile:47)
          at com.gradle.maven.cache.extension.d.f.a (SourceFile:31)
          at com.gradle.maven.cache.extension.d.k.a (SourceFile:76)
          at com.gradle.maven.cache.extension.h.b.lambda$createProxy$0 (SourceFile:79)
          at jdk.proxy109.$Proxy440.execute (Unknown Source)
          at com.gradle.maven.scan.extension.internal.d.a.executeMojo (SourceFile:114)
          at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328)
          at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
          at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
          at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
          at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73)
          at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53)
          at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118)
          at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
          at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
          at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
          at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906)
          at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
          at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
          at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
          at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
          at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke (Method.java:568)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:283)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:226)
          at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:407)
          at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:348)
      

      The enforcer plugin version is 3.4.1 but assembly plugin 3.6.0 does not have any problem with it, so I guess some bulletproofing was removed in 3.7.0.

      Attachments

        Issue Links

          Activity

            People

              sjaranowski Slawomir Jaranowski
              tmortagne Thomas Mortagne
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: