You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Emmanuel Hugonnet <eh...@gmail.com> on 2011/03/14 14:45:25 UTC

Problem with scopes in dependencies

Hi,
I am using Maven 3.0.x (2 or 3= and I have the following problem :
I use a parent POM with dependency management which is the good way to do this.
We are building for JBoss 4 and JBoss 6 and if for JBoss6 XercesImpl
is provided, for JBoss4 it is required with the Assembly Plugin.
So in my parent pom I have specified a "provided" scope and I override
it in the jboss4 specific pom with a "compile" scope.
One would expect that the xercesImpl.jar would be present in the
resulting war, as i take runtime jars but the xerces jar is not here.

If I put the scope "provided" in the Jboss 6 pom and "compile" in the
parent pom, I get the xerces.jar.

I have tried maven-dependency-plugin:tree:2.2 but all is I expected,
so it seems to be a mven 3 issue since maven-dependency-plugin still
uses maven2.

How can I display the genuine scope of my dependecy ?

Emmanuel

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: Problem with scopes in dependencies

Posted by Emmanuel Hugonnet <eh...@gmail.com>.
Using help:effective-pom it shows the 'correct', in term of Maven 3,
scope which is not the expected scope.
Whatever scope I set in my pom it is the scope defined (or not) in the
parent pom's dependency management that is used.
this is quite blocking as it means that you can't use the
dependecyManagement with dependencies that might be used in other
scopes.

On Mon, Mar 14, 2011 at 2:49 PM, Benjamin Bentmann
<be...@udo.edu> wrote:
> Emmanuel Hugonnet wrote:
>
>> How can I display the genuine scope of my dependecy ?
>
> mvn -X ...
>
> The debug log will print the project dependency tree before the project gets
> build.
>
>
> Benjamin
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: Problem with scopes in dependencies

Posted by Benjamin Bentmann <be...@udo.edu>.
Emmanuel Hugonnet wrote:

> How can I display the genuine scope of my dependecy ?

mvn -X ...

The debug log will print the project dependency tree before the project 
gets build.


Benjamin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org