maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jo Vandermeeren" <>
Subject Re: Executable jar : lib inclusion
Date Wed, 01 Aug 2007 10:47:01 GMT
Hi Jean-Philippe,

Of course the dependencies are not packaged with your jar.
What do you expect? An executable jar is simply a jar with a Main-Class
property in its manifest.
In fact, a jar can not include other jars, unless you supply a custom jar
classloader to actually load the resources inside those jars.

If you want to include jar files in a jar file, there is a workaround
though.. Classworlds provides a custom classloader (which is used in
maven1's uberjar).

If you just want all classes of your dependencies, along with your own code
in a single jar, without providing a custom classloader.. You have to unpack
all dependencies and create a new jar file that wraps them all up.
The maven-assembly-plugin can do this for you, cf.


> Hi,
> I try to write a small swing client to test our EJB. The Ejb is deployed
> on a Weblogic 8.1 server.
> I made an executable jar file (thanks to
> <
> r.html>) so when I run java -jar myJar.jar, it works fine. But the
> generated jar file is very lightweight and doesn't include needed jar
> (commons-lang, weblogic-8.1.jar). How can I do that ?
> The generated manifest file tells that the classpath is easy (as if all
> jar files were in the current directory, witch is not true : all jar are
> in the repository)
> --
> Jean-Philippe CARUANA
> site
> blog
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message