You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Richard Chamberlain <ri...@caplin.com> on 2007/12/04 20:58:33 UTC
custom manifest file still using dependencies
Hi,
I'm packaging my app in a zip.
However if i want to use java -jar myapp.jar i have to include the dependencies in my manifest file.
I've done this using:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass>
myapp.MainClass
</mainClass>
<addClasspath>true</addClasspath>
</manifest>
</archive>
</configuration>
</plugin>
However there are > 20 dependencies and the manifest file requires them to be in the same directory.
I'd like to put all my dependencies in a "lib" folder and have my manifest file locate them. It's neat that the manifest file gets generated from the dependecies, so i dont want to maintain my own manifest file. Ialso like the way that the dependencies are external to the jar.
Can anyone help?
Thanks,
Rich
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: custom manifest file still using dependencies
Posted by Wayne Fay <wa...@gmail.com>.
You are welcome to post a bug in JIRA or offer up a documentation
patch if you feel this would be beneficial for other users.
Wayne
On 12/5/07, Richard Chamberlain <ri...@caplin.com> wrote:
> Aha! rooting around for a bit, there is <classpathprefix> which prepends the "lib" part to each dependency. I'd have hoped that would be on the plugin homepage :(
>
> Cheers,
>
> Rich
>
> ________________________________
>
> From: Richard Chamberlain [mailto:richard.chamberlain@caplin.com]
> Sent: Tue 04/12/2007 19:58
> To: users@maven.apache.org
> Subject: custom manifest file still using dependencies
>
>
>
> Hi,
>
> I'm packaging my app in a zip.
>
> However if i want to use java -jar myapp.jar i have to include the dependencies in my manifest file.
>
> I've done this using:
>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-jar-plugin</artifactId>
> <configuration>
> <archive>
> <manifest>
> <mainClass>
> myapp.MainClass
> </mainClass>
> <addClasspath>true</addClasspath>
> </manifest>
> </archive>
> </configuration>
> </plugin>
>
> However there are > 20 dependencies and the manifest file requires them to be in the same directory.
>
> I'd like to put all my dependencies in a "lib" folder and have my manifest file locate them. It's neat that the manifest file gets generated from the dependecies, so i dont want to maintain my own manifest file. Ialso like the way that the dependencies are external to the jar.
>
> Can anyone help?
>
> Thanks,
>
> Rich
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
RE: custom manifest file still using dependencies
Posted by Richard Chamberlain <ri...@caplin.com>.
Aha! rooting around for a bit, there is <classpathprefix> which prepends the "lib" part to each dependency. I'd have hoped that would be on the plugin homepage :(
Cheers,
Rich
________________________________
From: Richard Chamberlain [mailto:richard.chamberlain@caplin.com]
Sent: Tue 04/12/2007 19:58
To: users@maven.apache.org
Subject: custom manifest file still using dependencies
Hi,
I'm packaging my app in a zip.
However if i want to use java -jar myapp.jar i have to include the dependencies in my manifest file.
I've done this using:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass>
myapp.MainClass
</mainClass>
<addClasspath>true</addClasspath>
</manifest>
</archive>
</configuration>
</plugin>
However there are > 20 dependencies and the manifest file requires them to be in the same directory.
I'd like to put all my dependencies in a "lib" folder and have my manifest file locate them. It's neat that the manifest file gets generated from the dependecies, so i dont want to maintain my own manifest file. Ialso like the way that the dependencies are external to the jar.
Can anyone help?
Thanks,
Rich
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org