Yak Shaving

just me

Maven Build

without comments

To make a stand alone jar app from a Maven build try the follow:

<build>

<plugins>

<plugin>

<artifactId>maven-assembly-plugin</artifactId>

<configuration>

<descriptorId>jar-with-dependencies</descriptorId>

</configuration>

<executions>

<execution>

<goals>

<goal>assembly</goal>

</goals>

<phase>package</phase>

</execution>

</executions>

</plugin>

<!– <plugin>

<artifactId>maven-assembly-plugin</artifactId>

<configuration>

<descriptors>

<descriptor>assembly-libs.xml</descriptor>

</descriptors>

</configuration>

<executions>

<execution>

<goals>

<goal>directory</goal>

</goals>

<phase>package</phase>

</execution>

</executions>

</plugin> –>

</plugins>

</build>

With this attached file:

<assembly>
<id>libs</id>

<formats>
<format>tar.gz</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>

<dependencySets>

<dependencySet>
<outputFileNameMapping>
${artifactId}-${version}.${extension}
</outputFileNameMapping>
<outputDirectory>lib</outputDirectory>
<unpack>false</unpack>
<scope>runtime</scope>
</dependencySet>
</dependencySets>
</assembly>

Written by channam

July 12th, 2008 at 10:32 pm

Posted in Uncategorized

Leave a Reply