You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Nathaniel Stoddard <na...@gmail.com> on 2005/06/21 16:56:22 UTC
Dependency scope
I'm not sure if there's a way to do this ... I'm hoping there is.
I'd like to be able to have a dependency be for the compilation only,
without being included in the installation. I'm worried about my WARs
specifically. They have a dependency on an EJB project, which of
course has a dependency on a J2EE JAR from a local repository.
However, since the J2EE classes are going to be supplied by JBoss, I
don't really want them to be included in the WAR when they get built
and installed.
Any ideas? It looks like a scope of "compile" still includes it in
the WAR, while a scope of "runtime" won't allow the ejb project to be
built at all. As always, thanks for the help!
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Dependency scope
Posted by Scott Lamb <sl...@slamb.org>.
On 21 Jun 2005, at 16:55, Brett Porter wrote:
> Yes, it will work in this situation, but this is specifically for
> provided jars though. It is not intended as a general mechanism for
> optional dependencies.
Well, there's a need for such a mechanism. There's also a need for
compile-only dependencies (parser generators, etc.). If there's no
scope intended for these things, "provided" will be used for them.
--
Scott Lamb <http://www.slamb.org/>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Dependency scope
Posted by Brett Porter <br...@gmail.com>.
Yes, it will work in this situation, but this is specifically for
provided jars though. It is not intended as a general mechanism for
optional dependencies.
- Brett
On 6/22/05, Scott Lamb <sl...@slamb.org> wrote:
> On Jun 21, 2005, at 8:01 AM, Brett Porter wrote:
>
> > scope = provided, available from alpha-3 (currently aiming for a
> > Wednesday release)
>
> Will this new scope also be suitable for an optional dependency of a
> library?
>
> Specifically, I have a library project which used to be just one jar.
> I recently moved some common code out to a more generic library, so
> now I have two. Each has a couple of classes for use in a servlet
> context. I could split these off into separate jars - thus having
> four total - but I'd rather not. It seems like too much additional
> complexity for too little gain. These classes will either be used in
> a servlet context (in which case, it will indeed be provided) or not
> at all.
>
> Scott
>
> --
> Scott Lamb <http://www.slamb.org/>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Dependency scope
Posted by Scott Lamb <sl...@slamb.org>.
On Jun 21, 2005, at 8:01 AM, Brett Porter wrote:
> scope = provided, available from alpha-3 (currently aiming for a
> Wednesday release)
Will this new scope also be suitable for an optional dependency of a
library?
Specifically, I have a library project which used to be just one jar.
I recently moved some common code out to a more generic library, so
now I have two. Each has a couple of classes for use in a servlet
context. I could split these off into separate jars - thus having
four total - but I'd rather not. It seems like too much additional
complexity for too little gain. These classes will either be used in
a servlet context (in which case, it will indeed be provided) or not
at all.
Scott
--
Scott Lamb <http://www.slamb.org/>
Re: Dependency scope
Posted by Brett Porter <br...@gmail.com>.
scope = provided, available from alpha-3 (currently aiming for a
Wednesday release)
On 6/22/05, Nathaniel Stoddard <na...@gmail.com> wrote:
> I'm not sure if there's a way to do this ... I'm hoping there is.
>
> I'd like to be able to have a dependency be for the compilation only,
> without being included in the installation. I'm worried about my WARs
> specifically. They have a dependency on an EJB project, which of
> course has a dependency on a J2EE JAR from a local repository.
> However, since the J2EE classes are going to be supplied by JBoss, I
> don't really want them to be included in the WAR when they get built
> and installed.
>
> Any ideas? It looks like a scope of "compile" still includes it in
> the WAR, while a scope of "runtime" won't allow the ejb project to be
> built at all. As always, thanks for the help!
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org