Hi all,

I've been trying to assemble an existing zip/rar file using the
maven-assembly-plugin but without success.

Here is the use case:
Project A contains some files, which are packaged in a zip file and
installed. The zip file is available in the local repository.
Project B has a runtime dependency on Project A and assembles the zip file
in another zip file.

Here is the assembly descriptor I am using:
<assembly>
    <id>installer</id>
    <formats>
        <format>zip</format>
    </formats>
    <includeBaseDirectory>false</includeBaseDirectory>
    <dependencySets>
        <dependencySet>
            <useProjectArtifact>false</useProjectArtifact>
            <scope>runtime</scope>
            <includes>
                <include>*:zip</include>
            </includes>
            <unpack>false</unpack>
            <useTransitiveDependencies>false</useTransitiveDependencies>
            <outputDirectory>/lib
            </outputDirectory>
        </dependencySet>
    </dependencySets>
</assembly>

I've been reading the documentation in all directions, looked at the code,
but still have no clue about the root cause.
When looking into
http://svn.apache.org/viewvc/maven/plugins/tags/maven-assembly-plugin-2.2-beta-5/src/main/java/org/apache/maven/plugin/assembly/utils/FilterUtils.java?view=markup,
my best guess would be the project.getArtifact() does not return anything.
Unfortunately, there is no debug information at this point.

72 for ( Iterator it = projects.iterator(); it.hasNext(); )  73 {  74
MavenProject
project = (MavenProject) it.next();  75 Artifact artifact =
project.getArtifact();  76
 77 if ( !filter.include( artifact ) )  78 {  79 it.remove();  80 }  81 }
Any help or hints would be greatly appreciated.
Thanks,
David

Reply via email to