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

Assembly fails on resource name with a percent character

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.4
    • 2.5
    • maven-archiver
    • None

    Description

      Given a classpath resource like path/to/10%.txt, the Maven Assembly plugin fails with the following exception.

      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.4:single (default) on project assembly-bug: Execution default of goal org.apache.maven.plugins:maven-assembly-plugin:2.4:single failed. IllegalArgumentException -> [Help 1]
      org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.4:single (default) on project assembly-bug: Execution default of goal org.apache.maven.plugins:maven-assembly-plugin:2.4:single failed.
              at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225)
              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:319)
              at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
              at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
              at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
              at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
              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:290)
              at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
              at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
              at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
      Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default of goal org.apache.maven.plugins:maven-assembly-plugin:2.4:single failed.
              at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:110)
              at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
              ... 19 more
      Caused by: java.lang.IllegalArgumentException
              at sun.net.www.ParseUtil.decode(ParseUtil.java:202)
              at java.net.JarURLConnection.parseSpecs(JarURLConnection.java:185)
              at java.net.JarURLConnection.<init>(JarURLConnection.java:162)
              at sun.net.www.protocol.jar.JarURLConnection.<init>(JarURLConnection.java:81)
              at sun.net.www.protocol.jar.Handler.openConnection(Handler.java:41)
              at java.net.URL.openConnection(URL.java:971)
              at java.net.URL.openStream(URL.java:1037)
              at org.codehaus.plexus.components.io.resources.PlexusIoURLResource.getContents(PlexusIoURLResource.java:34)
              at org.codehaus.plexus.archiver.ArchiveEntry.getInputStream(ArchiveEntry.java:106)
              at org.codehaus.plexus.archiver.zip.AbstractZipArchiver.zipFile(AbstractZipArchiver.java:590)
              at org.codehaus.plexus.archiver.zip.AbstractZipArchiver.addResources(AbstractZipArchiver.java:398)
              at org.codehaus.plexus.archiver.zip.AbstractZipArchiver.createArchiveMain(AbstractZipArchiver.java:323)
              at org.codehaus.plexus.archiver.zip.AbstractZipArchiver.execute(AbstractZipArchiver.java:222)
              at org.codehaus.plexus.archiver.AbstractArchiver.createArchive(AbstractArchiver.java:910)
              at org.apache.maven.plugin.assembly.archive.archiver.AssemblyProxyArchiver.createArchive(AssemblyProxyArchiver.java:512)
              at org.apache.maven.plugin.assembly.archive.DefaultAssemblyArchiver.createArchive(DefaultAssemblyArchiver.java:186)
              at org.apache.maven.plugin.assembly.mojos.AbstractAssemblyMojo.execute(AbstractAssemblyMojo.java:436)
              at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
              ... 20 more
      

      Attachments

        1. assembly-bug.zip
          4 kB
          Harald Wellmann

        Activity

          People

            krosenvold Kristian Rosenvold
            hwellmann Harald Wellmann
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: