Michael Ritzert created MASSEMBLY-929:
-----------------------------------------

             Summary: assembly fails trying to include file with space in name 
from JAR
                 Key: MASSEMBLY-929
                 URL: https://issues.apache.org/jira/browse/MASSEMBLY-929
             Project: Maven Assembly Plugin
          Issue Type: Bug
            Reporter: Michael Ritzert
         Attachments: pom.xml

When I try to assemble a complete jar from the attached pom.xml (no other files 
needed), it ends with this error:

 
{noformat}

[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-assembly-plugin:2.2-beta-5:assembly 
(default-cli) on project camel-activemq: Failed to create assembly: Error 
creating assembly archive jar-with-dependencies: Problem creating jar: JAR 
entry META-INF/JAXB/episode_generate schema.xjb not found in 
/root/.m2/repository/org/apache/camel/camel-spring/3.0.1/camel-spring-3.0.1.jar 
-> [Help 1]                                                                     
                
...


Caused by: java.io.FileNotFoundException: JAR entry 
META-INF/JAXB/episode_generate schema.xjb not found in 
/root/.m2/repository/org/apache/camel/camel-spring/3.0.1/camel-spring-3.0.1.jar

    at sun.net.www.protocol.jar.JarURLConnection.connect 
(JarURLConnection.java:147)

    at sun.net.www.protocol.jar.JarURLConnection.getInputStream 
(JarURLConnection.java:155)

    at java.net.URL.openStream (URL.java:1163)

    at 
org.codehaus.plexus.components.io.resources.PlexusIoURLResource.getContents 
(PlexusIoURLResource.java:30)

{noformat}
 

To reproduce, put the pom.xml in a directory and run
{code:java}
docker run --network=host -it --rm --name my-maven-project -v 
"$(pwd)":/usr/src/mymaven -w /usr/src/mymaven maven:3.6.3-jdk-13 mvn -X -e 
clean package assembly:assembly

{code}
The file name in the jar file is URL-encoded, i.e.
{code:java}
       131  2020-01-11 06:18   META-INF/JAXB/episode_generate%20schema.xjb{code}
So the problem may as well be in the JAR file. Please tell me so, and I will 
report it against camel (or can this report be moved around within Jira?).



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to