Hi,
I want to build an unsual JAR with the maven-assembly-plugin und after
hours of trying I cannot figure out how to do it.
I have a Maven project "myproject" which is dependent on a library
"mylibrary". I want to build a JAR file containing both the class
files of the project and the class files of the library. What I get
with the following configuration is a JAR containing two directories
"myproject" and "mylibrary", each of which contains the unpacked class
files. All I want is to get rid of the directory layer, because class
files in a JAR only make sense, if they reside in the root directory.
Who knows how to achieve this?
Thanks for any hints, Ben
pom.xml:
...
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2-beta-1</version>
<configuration>
<descriptors>
<descriptor>src/main/build-resources/assembly.xml</descriptor>
</descriptors>
<finalName>myproject</finalName>
<outputDirectory>target/assemblies</outputDirectory>
<workDirectory>target/assemblies/work</workDirectory>
</configuration>
</plugin>
...
assembly.xml:
<assembly>
<id>myjar</id>
<formats>
<format>jar</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<moduleSets>
<moduleSet>
<includes>
<include>myproject</include>
</includes>
<binaries>
<includeDependencies>true</includeDependencies>
<dependencySets>
<dependencySet>
<unpack>true</unpack>
<scope>compile</scope>
</dependencySet>
</dependencySets>
<unpack>true</unpack>
</binaries>
</moduleSet>
</moduleSets>
</assembly>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]