You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Midtskogen, Erik" <Er...@anntaylor.com> on 2006/05/31 16:24:50 UTC

Standalone deployment

Hi,

I hope my question isn't too stupid to merit posting here, but how do
you build a standalone app in Maven?

What I specifically want is an executable jar file with a subdirectory
containing all the jar file dependencies the app needs to execute.  I
need the jar file to have all the necessary settings in its manifest.mf
file, and I'd like the dependency jars to be automatically managed by
maven.

So far, I've tried using the jar plugin to set the Main-Class and
Class-Path entries in the target artifact's manifest.mf file.  That
works fine, but then I have to manually copy in the necessary jar files
every time I run mvn clean.  So I tried using the assembly plugin.  That
copies in the necessary dependencies just fine, but I see no way of
telling it how to configure the manifest.mf of the main artifact jar.
Unfortunately, the assembly plugin runs after the jar plugin, and so it
ends up overwriting the main artifact jar with a jar of its own that
doesn't contain the entries I need in the manifest.mf file.  Is there a
way of suppressing the jar file creation that assembly:assembly does?

Or, is there some other way that I'm supposed to be building a
standalone app with associated dependencies?

Thanks,
--Erik

***********************************************************************************
The information in this email (including any attachments) is confidential and may be legally privileged.  Access to this e-mail by anyone other than the intended addressee is unauthorized.  If you are not the intended recipient of this message, any review, disclosure, copying, distribution, retention, or any action taken or omitted to be taken in reliance on it (including any attachments) is prohibited and may be unlawful.  If you are not the intended recipient, please reply to or forward a copy of this message to the sender and delete the message, all attachments, and any copies thereof from your system and destroy any printout thereof.

______________________________________________________________________
The information in this email (including any attachments) is confidential and may be legally privileged. Access to this e-mail by anyone other than the intended addressee is unauthorized. If you are not the intended recipient of this message, any review, disclosure, copying, distribution, retention, or any action taken or omitted to be taken in reliance on it (including any attachments) is prohibited and may be unlawful. If you are not the intended recipient, please reply to or forward a copy of this message to the sender and delete the message, all attachments, and any copies thereof from your system and destroy any printout thereof.