Uploaded image for project: 'Thorntail'
  1. Thorntail
  2. THORN-671

mvn wildfly-swarm:package fails with "File must be specified"

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 2016.9
    • Fix Version/s: 2016.11.0
    • Component/s: plugins
    • Labels:
      None

      Description

      Though we expect most users to initiate our plugin via `mvn install` or `mvn package` there might be those that desire to call `mvn wildfly-swarm:package` directly.

      If its called directly we get the following error:

      [ERROR] Failed to execute goal org.wildfly.swarm:wildfly-swarm-plugin:2016.9:package (default-cli) on project demo: Unable to create -swarm.jar: Failed to write asset to output: /_bootstrap/demo.war: File must be specified -> [Help 1]
      org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.wildfly.swarm:wildfly-swarm-plugin:2016.9:package (default-cli) on project demo: Unable to create -swarm.jar
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
      	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:116)
      	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
      	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
      	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
      	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
      	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
      	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
      	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
      	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
      	at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	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.MojoFailureException: Unable to create -swarm.jar
      	at org.wildfly.swarm.plugin.maven.PackageMojo.execute(PackageMojo.java:153)
      	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
      	... 20 more
      Caused by: org.jboss.shrinkwrap.api.exporter.ArchiveExportException: Failed to write asset to output: /_bootstrap/demo.war
      	at org.jboss.shrinkwrap.impl.base.exporter.AbstractOnDemandInputStream.read(AbstractOnDemandInputStream.java:133)
      	at java.io.InputStream.read(InputStream.java:179)
      	at java.io.InputStream.read(InputStream.java:101)
      	at org.jboss.shrinkwrap.impl.base.io.IOUtil.copy(IOUtil.java:138)
      	at org.jboss.shrinkwrap.impl.base.exporter.AbstractStreamExporterImpl.exportTo(AbstractStreamExporterImpl.java:120)
      	at org.wildfly.swarm.tools.BuildTool.createJar(BuildTool.java:414)
      	at org.wildfly.swarm.tools.BuildTool.build(BuildTool.java:193)
      	at org.wildfly.swarm.plugin.maven.PackageMojo.execute(PackageMojo.java:133)
      	... 22 more
      Caused by: java.lang.IllegalArgumentException: File must be specified
      	at org.jboss.shrinkwrap.api.ArchiveFactory.createFromZipFile(ArchiveFactory.java:176)
      	at org.jboss.shrinkwrap.api.ShrinkWrap.createFromZipFile(ShrinkWrap.java:185)
      	at org.wildfly.swarm.tools.ArtifactAsset.getArchive(ArtifactAsset.java:61)
      	at org.wildfly.swarm.tools.WebInfLibFilteringArchiveAsset.openStream(WebInfLibFilteringArchiveAsset.java:34)
      	at org.jboss.shrinkwrap.impl.base.exporter.AbstractOnDemandInputStream.read(AbstractOnDemandInputStream.java:130)
      	... 29 more
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                bob.mcwhirter Bob McWhirter
                Reporter:
                kenfinni Ken Finnigan
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: