Is this a problem that an installer solves in a much more flexible way?
Clearly assembly and shade can do a lot but sometimes it appears that
linking to an existing installer with a Maven plug-in (izpack for
example) might do it in a more simple and flexible way and allow a lot
more pieces to be pulled in.
Ron
On 10/06/2013 1:05 PM, Wayne Fay wrote:
Anyway, I'm running into issues at deployment time (just starting with the EJB
jar as a
standalone deployment) because the EJB jar depends on a 3rd party jar that is
not
available on the server.
If you **really** need to make the EJB jar work in standalone
deployment (which is not especially common IME), you could make this
work with the shade plugin (or other similar plugins) by packaging the
contents of your dependencies in alongside your own project files in
an "uberjar" or "onejar."
I'd like to avoid that this time, so I'm thinking, much like WAR and EAR files
have
META-INF/lib directories, a jar file might have something similar. Does this
fall outside
the definition of a jar? Is there no way to package a 3rd party jar upon which
one's code
depends with one's jar, so that at runtime the dependencies can be resolved by
the
classloader?
The Java Jar file specification does not allow Jar files to contain
other Jar files so this is not possible (unless you are using a
special classloader which does not conform to the spec like
Classworlds).
Instead, you should be using dependencies in your WAR and EAR pom
files to declare "this project depends on these libraries" and Maven
will automatically pull those Jar files in and include them in the WAR
or EAR packages when they are constructed.
Are you sure that you need this EJB jar to work in standalone
deployment? Or is this just something you're trying for something to
do, and you will generally deploy the EJB in a WAR/EAR? If the latter,
I would ignore this "problem" for now and continue working to make the
WAR/EAR function as you require.
Wayne
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
--
Ron Wheeler
President
Artifact Software Inc
email: [email protected]
skype: ronaldmwheeler
phone: 866-970-2435, ext 102
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]