You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Youri Bonnaffé (JIRA)" <ji...@codehaus.org> on 2011/07/11 15:17:42 UTC

[jira] Created: (MASSEMBLY-563) JAR entry not found when including jar dependencies with "#" in classname

JAR entry not found when including jar dependencies with "#" in classname
-------------------------------------------------------------------------

                 Key: MASSEMBLY-563
                 URL: https://jira.codehaus.org/browse/MASSEMBLY-563
             Project: Maven 2.x Assembly Plugin
          Issue Type: Bug
    Affects Versions: 2.2.1
         Environment: Linux
java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02, mixed mode)

2.6.32-32-generic #62-Ubuntu SMP Wed Apr 20 21:52:38 UTC 2011 x86_64 GNU/Linux
            Reporter: Youri Bonnaffé


I'm building an assembly using a dependencySet. Every jar is included.
I get an error message Failed to create assembly: Error creating assembly archive jars-with-dependencies: Problem creating jar: JAR entry com/extjs/gxt/ui/client/widget/grid/GridTemplates not found in /home/ybonnaffemoity/mavenRepository/com/extjs/gxt/2.2.1-custo-1/gxt-2.2.1-custo-1.jar.

It turns out that the incriminated class has also HTML files in the same folder (GridTemplates#startGroup.html for instance). If I remove theses files, the assembly will be created. I suspect the "#" character to be responsible of this.

Assembly descriptor:
<?xml version="1.0" encoding="UTF-8"?>
<assembly>
    <id>jars-with-dependencies</id>
    <formats>
        <format>jar</format>
    </formats>
    <includeBaseDirectory>false</includeBaseDirectory>
    <fileSets>
        <fileSet>
            <directory>${project.build.outputDirectory}</directory>
            <outputDirectory>/</outputDirectory>
        </fileSet>
    </fileSets>
    <dependencySets>
        <dependencySet>
            <outputDirectory>/</outputDirectory>
            <unpack>true</unpack>
            <includes>
                <include>*:jar:*</include>
            </includes>
        </dependencySet>
    </dependencySets>
</assembly>


jar -tf gxt-2.2.1-custo-1.jar | grep "GridTemplates" >>>>
com/extjs/gxt/ui/client/widget/grid/GridTemplates#body.html
com/extjs/gxt/ui/client/widget/grid/GridTemplates#endGroup.html
com/extjs/gxt/ui/client/widget/grid/GridTemplates#master.html
com/extjs/gxt/ui/client/widget/grid/GridTemplates#startGroup.html
com/extjs/gxt/ui/client/widget/grid/GridTemplates.class
com/extjs/gxt/ui/client/widget/grid/GridTemplates.java



--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] (MASSEMBLY-563) JAR entry not found when including jar dependencies with "#" in classname

Posted by "Dennis Lundberg (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MASSEMBLY-563?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dennis Lundberg updated MASSEMBLY-563:
--------------------------------------

    Component/s: dependencySet
    Description: 
I'm building an assembly using a dependencySet. Every jar is included.
I get an error message Failed to create assembly: Error creating assembly archive jars-with-dependencies: Problem creating jar: JAR entry com/extjs/gxt/ui/client/widget/grid/GridTemplates not found in /home/ybonnaffemoity/mavenRepository/com/extjs/gxt/2.2.1-custo-1/gxt-2.2.1-custo-1.jar.

It turns out that the incriminated class has also HTML files in the same folder (GridTemplates#startGroup.html for instance). If I remove theses files, the assembly will be created. I suspect the "#" character to be responsible of this.

Assembly descriptor:
{code:xml}
<?xml version="1.0" encoding="UTF-8"?>
<assembly>
    <id>jars-with-dependencies</id>
    <formats>
        <format>jar</format>
    </formats>
    <includeBaseDirectory>false</includeBaseDirectory>
    <fileSets>
        <fileSet>
            <directory>${project.build.outputDirectory}</directory>
            <outputDirectory>/</outputDirectory>
        </fileSet>
    </fileSets>
    <dependencySets>
        <dependencySet>
            <outputDirectory>/</outputDirectory>
            <unpack>true</unpack>
            <includes>
                <include>*:jar:*</include>
            </includes>
        </dependencySet>
    </dependencySets>
</assembly>
{code}

{noformat}
jar -tf gxt-2.2.1-custo-1.jar | grep "GridTemplates" >>>>
com/extjs/gxt/ui/client/widget/grid/GridTemplates#body.html
com/extjs/gxt/ui/client/widget/grid/GridTemplates#endGroup.html
com/extjs/gxt/ui/client/widget/grid/GridTemplates#master.html
com/extjs/gxt/ui/client/widget/grid/GridTemplates#startGroup.html
com/extjs/gxt/ui/client/widget/grid/GridTemplates.class
com/extjs/gxt/ui/client/widget/grid/GridTemplates.java
{noformat}


  was:
I'm building an assembly using a dependencySet. Every jar is included.
I get an error message Failed to create assembly: Error creating assembly archive jars-with-dependencies: Problem creating jar: JAR entry com/extjs/gxt/ui/client/widget/grid/GridTemplates not found in /home/ybonnaffemoity/mavenRepository/com/extjs/gxt/2.2.1-custo-1/gxt-2.2.1-custo-1.jar.

It turns out that the incriminated class has also HTML files in the same folder (GridTemplates#startGroup.html for instance). If I remove theses files, the assembly will be created. I suspect the "#" character to be responsible of this.

Assembly descriptor:
<?xml version="1.0" encoding="UTF-8"?>
<assembly>
    <id>jars-with-dependencies</id>
    <formats>
        <format>jar</format>
    </formats>
    <includeBaseDirectory>false</includeBaseDirectory>
    <fileSets>
        <fileSet>
            <directory>${project.build.outputDirectory}</directory>
            <outputDirectory>/</outputDirectory>
        </fileSet>
    </fileSets>
    <dependencySets>
        <dependencySet>
            <outputDirectory>/</outputDirectory>
            <unpack>true</unpack>
            <includes>
                <include>*:jar:*</include>
            </includes>
        </dependencySet>
    </dependencySets>
</assembly>


jar -tf gxt-2.2.1-custo-1.jar | grep "GridTemplates" >>>>
com/extjs/gxt/ui/client/widget/grid/GridTemplates#body.html
com/extjs/gxt/ui/client/widget/grid/GridTemplates#endGroup.html
com/extjs/gxt/ui/client/widget/grid/GridTemplates#master.html
com/extjs/gxt/ui/client/widget/grid/GridTemplates#startGroup.html
com/extjs/gxt/ui/client/widget/grid/GridTemplates.class
com/extjs/gxt/ui/client/widget/grid/GridTemplates.java



    
> JAR entry not found when including jar dependencies with "#" in classname
> -------------------------------------------------------------------------
>
>                 Key: MASSEMBLY-563
>                 URL: https://jira.codehaus.org/browse/MASSEMBLY-563
>             Project: Maven 2.x Assembly Plugin
>          Issue Type: Bug
>          Components: dependencySet
>    Affects Versions: 2.2.1
>         Environment: Linux
> java version "1.6.0_24"
> Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
> Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02, mixed mode)
> 2.6.32-32-generic #62-Ubuntu SMP Wed Apr 20 21:52:38 UTC 2011 x86_64 GNU/Linux
>            Reporter: Youri Bonnaffé
>
> I'm building an assembly using a dependencySet. Every jar is included.
> I get an error message Failed to create assembly: Error creating assembly archive jars-with-dependencies: Problem creating jar: JAR entry com/extjs/gxt/ui/client/widget/grid/GridTemplates not found in /home/ybonnaffemoity/mavenRepository/com/extjs/gxt/2.2.1-custo-1/gxt-2.2.1-custo-1.jar.
> It turns out that the incriminated class has also HTML files in the same folder (GridTemplates#startGroup.html for instance). If I remove theses files, the assembly will be created. I suspect the "#" character to be responsible of this.
> Assembly descriptor:
> {code:xml}
> <?xml version="1.0" encoding="UTF-8"?>
> <assembly>
>     <id>jars-with-dependencies</id>
>     <formats>
>         <format>jar</format>
>     </formats>
>     <includeBaseDirectory>false</includeBaseDirectory>
>     <fileSets>
>         <fileSet>
>             <directory>${project.build.outputDirectory}</directory>
>             <outputDirectory>/</outputDirectory>
>         </fileSet>
>     </fileSets>
>     <dependencySets>
>         <dependencySet>
>             <outputDirectory>/</outputDirectory>
>             <unpack>true</unpack>
>             <includes>
>                 <include>*:jar:*</include>
>             </includes>
>         </dependencySet>
>     </dependencySets>
> </assembly>
> {code}
> {noformat}
> jar -tf gxt-2.2.1-custo-1.jar | grep "GridTemplates" >>>>
> com/extjs/gxt/ui/client/widget/grid/GridTemplates#body.html
> com/extjs/gxt/ui/client/widget/grid/GridTemplates#endGroup.html
> com/extjs/gxt/ui/client/widget/grid/GridTemplates#master.html
> com/extjs/gxt/ui/client/widget/grid/GridTemplates#startGroup.html
> com/extjs/gxt/ui/client/widget/grid/GridTemplates.class
> com/extjs/gxt/ui/client/widget/grid/GridTemplates.java
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] (MASSEMBLY-563) JAR entry not found when including jar dependencies with "#" in classname

Posted by "Axel Wienberg (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MASSEMBLY-563?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=314873#comment-314873 ] 

Axel Wienberg commented on MASSEMBLY-563:
-----------------------------------------

the same thing happens if your file name has %2E or %20 in it. (this happens e.g. when jar-ing a spidered web site).
it works when using a zip file.
Some debugging reveals that org.codehaus.plexus.components.io.resources.PlexusIoZipFileResourceCollection uses a jar: URL to address the file in the jar, but does not escape the entry part of the URL, resulting in an URL such as
{code}jar:/my/path/gxt-2.2.1-custo-1.jar!/com/extjs/gxt/ui/client/widget/grid/GridTemplates#body.html{code}
where the fragment part is not interpreted as part of the entry name (i.e. ignored) by the JDK's jar: URL protocol. Similarly, assuming a file name of Big%20Image.gif, the URL constructed is
{code}jar:/my/path/gxt-2.2.1-custo-1.jar!/Big%20Image.gif{code}
which is unescaped to /Big Image.gif by the JDK and subsequently "not found".
Everything works fine with zip files because in that case the org.codehaus.plexus.archiver.zip package handles the unpacking and does not use the jar: protocol.

Hope this helps...

                
> JAR entry not found when including jar dependencies with "#" in classname
> -------------------------------------------------------------------------
>
>                 Key: MASSEMBLY-563
>                 URL: https://jira.codehaus.org/browse/MASSEMBLY-563
>             Project: Maven 2.x Assembly Plugin
>          Issue Type: Bug
>          Components: dependencySet
>    Affects Versions: 2.2.1
>         Environment: Linux
> java version "1.6.0_24"
> Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
> Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02, mixed mode)
> 2.6.32-32-generic #62-Ubuntu SMP Wed Apr 20 21:52:38 UTC 2011 x86_64 GNU/Linux
>            Reporter: Youri Bonnaffé
>
> I'm building an assembly using a dependencySet. Every jar is included.
> I get an error message Failed to create assembly: Error creating assembly archive jars-with-dependencies: Problem creating jar: JAR entry com/extjs/gxt/ui/client/widget/grid/GridTemplates not found in /home/ybonnaffemoity/mavenRepository/com/extjs/gxt/2.2.1-custo-1/gxt-2.2.1-custo-1.jar.
> It turns out that the incriminated class has also HTML files in the same folder (GridTemplates#startGroup.html for instance). If I remove theses files, the assembly will be created. I suspect the "#" character to be responsible of this.
> Assembly descriptor:
> {code:xml}
> <?xml version="1.0" encoding="UTF-8"?>
> <assembly>
>     <id>jars-with-dependencies</id>
>     <formats>
>         <format>jar</format>
>     </formats>
>     <includeBaseDirectory>false</includeBaseDirectory>
>     <fileSets>
>         <fileSet>
>             <directory>${project.build.outputDirectory}</directory>
>             <outputDirectory>/</outputDirectory>
>         </fileSet>
>     </fileSets>
>     <dependencySets>
>         <dependencySet>
>             <outputDirectory>/</outputDirectory>
>             <unpack>true</unpack>
>             <includes>
>                 <include>*:jar:*</include>
>             </includes>
>         </dependencySet>
>     </dependencySets>
> </assembly>
> {code}
> {noformat}
> jar -tf gxt-2.2.1-custo-1.jar | grep "GridTemplates" >>>>
> com/extjs/gxt/ui/client/widget/grid/GridTemplates#body.html
> com/extjs/gxt/ui/client/widget/grid/GridTemplates#endGroup.html
> com/extjs/gxt/ui/client/widget/grid/GridTemplates#master.html
> com/extjs/gxt/ui/client/widget/grid/GridTemplates#startGroup.html
> com/extjs/gxt/ui/client/widget/grid/GridTemplates.class
> com/extjs/gxt/ui/client/widget/grid/GridTemplates.java
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira