On Fri, Jul 09, 2010 at 07:11:14PM +0100, Wayne Fay wrote:
> >> > is it possible to include system-scoped dependencies in a shaded jar?
> 
> Do not use system-scope in your builds, period.
> 
> > jar's manifest. Obviously, that works only as long as the absolute paths to
> > the jars are the same on all machines the app is used on. However, that's no
> > longer the case, so now I'm trying to get the jar to include the stuff it
> > depends on. If anyone has a suggestion for solving this in a more elegant
> > way, I'd be interested.
> 
> Do not use system-scope. Install or deploy the jars into local Maven
> repos. Anything else is a hack.

Ok, it's a hack (in admitting that it's not elegant I had already sort
of agreed to that), but sometimes a hack that works is just what's needed
-- so I'm still interested in how to commit this hack.

As for installing the jars, yes, that's an option I sometimes use. It's
resulting in a growing collection of jars, along with a script that
runs ``mvn install:install-file ... -Dfile=<jarfile>'' on all these.
I think of that collection and script as a hack as well -- creating
copies of jars in a repository goes against my desire for normalisation
and non-redundancy.

The root of the trouble really is the lack of an indirection mechanism
that would allow building a host dependent component into Class-Path
entries in a jar manifest. The duplication of stuff (whether by installing
into repos or by building shaded jars) could be avoided if something
like

    Class-Path: ${JBOSS_HOME}/common/lib/jnpserver.jar

was supported. So it seems to me that since the root of the problem is
not a maven issue, all attempts of using maven to address is are bound
to end up being hacks.

Best regards, Jan
-- 
 +- Jan T. Kim -------------------------------------------------------+
 |             email: j....@uea.ac.uk                                 |
 |             WWW:   http://www.cmp.uea.ac.uk/people/jtk             |
 *-----=<  hierarchical systems are for files, not for humans  >=-----*

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

Reply via email to