I was expecting the jars from my dependencies section to be there.
However I did manage to find an example of a descriptor file by
greping in the maven source -
it's under maven-assembly-plugin/
For anyone who's interested
I'm actually trying to see if there is enough in Maven to allow me to
cobble together an application,
including Class-path entries in manfest, and there is just about.
Here's what I did:
I added the following to my pom so that my manifest would be
generated correctly and that
the assembly plugin would find my descriptor:
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptor>app.xml</descriptor>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass>com.example.mbeans.Main</mainClass>
<addClasspath>true</addClasspath>
</manifest>
</archive>
</configuration>
</plugin>
</plugins>
then I created the following descriptor app.xml:
<assembly>
<id>bin</id>
<formats>
<format>tar.gz</format>
<format>tar.bz2</format>
<format>zip</format>
</formats>
<fileSets>
<fileSet>
<directory>target</directory>
<outputDirectory></outputDirectory>
<includes>
<include>*.jar</include>
</includes>
</fileSet>
</fileSets>
<dependencySets>
<dependencySet>
<outputDirectory>/</outputDirectory>
<scope>runtime</scope>
</dependencySet>
</dependencySets>
</assembly>
Which resulted in a compressed file(s) containing my jar file and its
dependencies.
I was then able to uncompress it and launch with the java -jar command.
Cheers
AW
On 20 Sep 2005, at 16:21, Daniel Schömer wrote:
Ashley Williams wrote:
On 20 Sep 2005, at 12:49, Daniel Schömer wrote:
Ashley Williams wrote:
Does anyone know how to use assembly:assembly, in particular
what the
descriptor is supposed to be? I did hardcode it as a path to my pom
from within my pom (that seems wrong) which made the plugin run
without errors, but I didn't see any output file.
I've successfully run assembly:assembly setting descriptorId to
one of
the id in the provided assemblies ("bin", "src" or
"jar-with-dependencies").
Thanks that worked although I didn't find what I was hoping for in
the resulting zip file.
Hm, I don't know what you expected in the resulting zip file, but
the results I've gotten were as I've expected.
The assemblies shipped with the assembly plugin are relatively
simple xml files specifying file-sets of what to include. Since
you know ant (as you wrote in
<[EMAIL PROTECTED]>), you can probably
adapt the assembly xml files to your needs.
Regards,
Daniel Schömer
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]