You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Harro Lissenberg (JIRA)" <ji...@codehaus.org> on 2007/02/22 08:22:27 UTC
[jira] Commented: (MASSEMBLY-162) In a multiproject environment,
assembly takes wrong dependencies
[ http://jira.codehaus.org/browse/MASSEMBLY-162?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_88217 ]
Harro Lissenberg commented on MASSEMBLY-162:
--------------------------------------------
Having the same problem as the original poster I tried 2.2-SNAPSHOT but it only makes thing worse. Now creating a fat client with <unpack>true</unpack> in the assembly descriptor creates a .jar with all external dependencies unpacked in a seperate directory.
e.g:
myfatjar.jar
--log4j-1.2.13
--spring-2.0.2
...
each directory then contains the unpacked jar it references to.
> In a multiproject environment, assembly takes wrong dependencies
> ----------------------------------------------------------------
>
> Key: MASSEMBLY-162
> URL: http://jira.codehaus.org/browse/MASSEMBLY-162
> Project: Maven 2.x Assembly Plugin
> Issue Type: Bug
> Affects Versions: 2.1
> Reporter: M. van Leeuwen
> Priority: Critical
> Fix For: 2.2
>
>
> With a projectstructure like 'Project/{ejb,war,ear,client}' packaging the client as a fat jar-with-dependencies, it works fine using the following configuration.
> === etc/fatjar.xml ====
> <id>fat</id>
> <formats><format>jar</format></formats>
> <includeBaseDirectory>false</includeBaseDirectory>
> <fileSets><fileSet>
> <directory>target/classes</directory>
> <outputDirectory>/</outputDirectory>
> </fileSet></fileSets>
> <dependencySets>
> <dependencySet>
> <outputDirectory>/</outputDirectory>
> <unpack>true</unpack>
> <scope>runtime</scope>
> </dependencySet>
> </dependencySets>
> </assembly>
> === pom.xml ===
> <?xml version="1.0"?><project>
> <version>0.3-SNAPSHOT</version>
> <modelVersion>4.0.0</modelVersion>
> <groupId>mygroup</groupId>
> <artifactId>myapp-client</artifactId>
> <name>My Application</name>
> <dependencies>
> <!-- stripped -->
> </dependencies>
> <build>
> <plugins>
> <plugin>
> <artifactId>maven-assembly-plugin</artifactId>
> <version>2.1</version>
> <configuration>
> <descriptors><descriptor>etc/fatjar.xml</descriptor></descriptors>
> <archive>
> <manifest><mainClass>path.to.MainClass</mainClass><manifest>
> </archive>
> </configuration>
> <executions><execution>
> <phase>package</phase>
> <goals><goal>assembly</goal></goals>
> </execution></executions>
> </plugin>
> </plugins>
> </build>
> </project>
> But when I'm on the level above (packaging all) it just assembles all underlying dependencies into my clientjar, and not the dependencies of the childproject.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira