You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by nepso <aa...@ynet.sk> on 2006/09/02 20:18:31 UTC

m2 executable jar file

Hi,

is there any way how to add jar dependencies to generated .jar file with mvn install?
Or how can I add normal Class-Path to MANIFEST.MF file? 
becouse with <addClasspath>true</addClasspath> it adds only name of dependency f.e.: commons-net-1.4.1.jar but I need c:\...\commons-net-1.4.1.jar.

Thanks for help
Regards Martin

Re: m2 executable jar file

Posted by Sha Jiang <ji...@gmail.com>.
Hello,
This link
http://maven.apache.org/guides/mini/guide-manifest.html
may help you in MANIFEST.
I think you can write a MANIFEST firstly, the file includes all entries you
required.
Then add the MANIFEST to your jar.
<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-jar-plugin</artifactId>
  <configuration>
      <archive>
        <manifestFile>Your_MANIFEST</manifestFile>
      </archive>
   </configuration>
</plugin>

2006/9/3, nepso <aa...@ynet.sk>:
>
> Hi,
>
> is there any way how to add jar dependencies to generated .jar file with
> mvn install?
> Or how can I add normal Class-Path to MANIFEST.MF file?
> becouse with <addClasspath>true</addClasspath> it adds only name of
> dependency f.e.: commons-net-1.4.1.jar but I need c:\...\commons-
> net-1.4.1.jar.
>
> Thanks for help
> Regards Martin
>
>