You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Duane Homick <dh...@SANDVINE.com> on 2005/11/23 00:15:39 UTC

Application packaging in Maven 2

Im having trouble understanding how to package an application we have and am looking for some guidance on how to do this.

The application is essentially a JMS test client that has some third party dependencies.  These dependencies are defined in the pom.xml and available in the local repository.  I am able to get this client to build a .jar artifact, but this artifact does not contain any of the dependencies in it (I dont think it should).  I want to be able to run this application from another machine, but if I were to copy this jar to that machine and try to run it, it would fail for the obvious reasons that its dependencies do not exist on that machine.  So, is there a way to assemble a package containing my jar file and all the dependency jars (preferably in a /lib directory) so that I can run my application on the other machine without needing to configure classpaths, etc...?

Thanks
Duane Homick
Sandvine Inc.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Application packaging in Maven 2

Posted by dan tran <da...@gmail.com>.
1 you can use maven-asssembly-plugin to unpack all your dependency jars and
repackage them into one big jar files.

2. your can cookup a plugin which depends on those jars  which you are going
to place on a internal remote repository
   this way you can run your app any where you like.  Just need a  pom file
which has your remote repo info .

-Dan



On 11/22/05, Duane Homick <dh...@sandvine.com> wrote:
>
> Im having trouble understanding how to package an application we have and
> am looking for some guidance on how to do this.
>
> The application is essentially a JMS test client that has some third party
> dependencies.  These dependencies are defined in the pom.xml and available
> in the local repository.  I am able to get this client to build a .jar
> artifact, but this artifact does not contain any of the dependencies in it
> (I dont think it should).  I want to be able to run this application from
> another machine, but if I were to copy this jar to that machine and try to
> run it, it would fail for the obvious reasons that its dependencies do not
> exist on that machine.  So, is there a way to assemble a package containing
> my jar file and all the dependency jars (preferably in a /lib directory) so
> that I can run my application on the other machine without needing to
> configure classpaths, etc...?
>
> Thanks
> Duane Homick
> Sandvine Inc.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>