Andrea Aime ha scritto:
Hi,
I'm trying to convert a project from ant to maven 2 and I'm finding
difficulties in the last part of the build, that is, preparing
distributable jars.

I can build the application jar, set the main class, have the dependent
jars included in the manifest, but, how in the world I can make maven
build either:
* a single jar with all the dependencies included inside (aka single
  double clickable jar)
* make maven at least copy the dependency jars in the same folder as
  the application jar?

Ok, sorry, I managed to get it working with the assembly plugin.
Just one thing. My pom.xml contains the following:

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-assembly-plugin</artifactId>
    <configuration>
      <descriptorId>jar-with-dependencies</descriptorId>
      <finalName>sequence</finalName>
      <outputDirectory>target/dist</outputDirectory>
      <workDirectory>target/assembly/work</workDirectory>
      <archive>
        <manifest>
          <mainClass>com.zanthan.sequence.Main</mainClass>
        </manifest>
      </archive>
    </configuration>
</plugin>

And this generates a jar with two problems:
1) it contains .RSA and .SF files. I see this has been fixed in Maven 2.1...
   hum... is there any workaround since 2.1 is not yet released?
2) the jar name is sequence-jar-with-dependencies.jar... any way to get
   a better name?

Cheers
Andrea Aime


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to