Hi,

I think my suggestion regarding the use of the dependency-maven-plugin could have been a little bit confusing/misleading. Did you configure it to copy the dependencies somewhere under your target/classes folder? I wanted to mention the OneJar project (http://one-jar.sourceforge.net/) for this usecase but somewhow forgot.

If you use the assembly-plugin to build your distribution you probably won't need the dependency-plugin at all. Do you use it? If not: Can you post your pom so that we can have a look at it to figure out what is going wrong?

-Tim

Midtskogen, Erik schrieb:
Hi Tim and Jean-Laurant,

Thanks so much for your suggestions.  I'm very close now, but I'm still
confused about a couple of things.

After following your suggestions, the jar:jar now adds the correct
manifest.mf settings and pulls the correct dependencies out of the
repository.  Bravo!!  But the problem is that it is jarring up the
dependency jars into the executable jar file itself instead of adding
them to a subdirectory in the file system.  When I run the
assembly:assembly goal, it does add the jar files to the zip file in the
correct location, so my app does work when you unzip it and run it.  No
complaints there.  But I'd rather not duplicate the jar entries into the
executable jar file, because it almost doubles the size of my
distributable.

Why would one want dependency jar files jarred into the executable jar
anyway?  I'm confused.  It doesn't seem that Java is able to place such
a jarred dependency onto the classpath without special coding in the app
itself to do this.  You're supposed to run your executable in one jar
file, and keep your library dependencies as separate jar files, no?  Am
I wrong about this?  Is there any way of suppressing the addition of the
dependencies from being added to the executable jar during the package
lifecycle (jar:jar), while still adding the dependency classpath entries
into the manifest.mf?

Thanks!
--Erik


[...]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to