You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Sebastien Arbogast <se...@gmail.com> on 2006/06/02 07:33:51 UTC

[M2] Ghost dependencies

I have trouble understanding the new dependency mechanism. I added a
dependency like this in my root pom dependencyManagament section:

<dependency>
                <groupId>jakarta-regexp</groupId>
                <artifactId>jakarta-regexp</artifactId>
                <version>1.4</version>
                <scope>runtime</scope>
            </dependency>

It's not the only one, I've added several ones like that and they all
appear in the resulting webapp WEB-INF/lib directory, except for this
one. There is no exclude on jakarta-regexp in other dependencies, and
I can't find what's wrong. Any idea?

-- 
Sébastien Arbogast

The Epseelon Project : http://www.epseelon.net
Blog : http://sebastien-arbogast.epseelon.net
TagSpot : http://www.tagspot.org

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


Re: [M2] Ghost dependencies

Posted by Sebastien Arbogast <se...@gmail.com>.
> 2.1-SNAPSHOT of the war plugin only includes dependencies with a runtime
> scope
> for exploded,inplace and war goals. I think by default an artifact has a
> compile scope
> unless you modify the default scope then it shouldn't be included in the
> war.

I don't know which version of the war plugin I'm using but what
disturbs me is that, for all the other dependencies in my root pom, a
runtime scope is enough to have them included in the WAR, sometimes I
don't even mention them in the dependencies section of my web module
pom. But you're right: I just added it to my web module pom and it
works great.

Thank you very much!

-- 
Sébastien Arbogast

The Epseelon Project : http://www.epseelon.net
Blog : http://sebastien-arbogast.epseelon.net
TagSpot : http://www.tagspot.org

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


Re: [M2] Ghost dependencies

Posted by Pete Marvin King <la...@gmail.com>.
Hello,

2.1-SNAPSHOT of the war plugin only includes dependencies with a runtime
scope
for exploded,inplace and war goals. I think by default an artifact has a
compile scope
unless you modify the default scope then it shouldn't be included in the
war.

pete marvin



Markus Reinhardt wrote:
> Hi Sebastien,
>
> I don't know how the war packaging plugin handles <scope>runtime</scope>
> dependencies. I use no <scope> at all for required JARs and
> <scope>provided</scope> for those, which should not be packaged inside
> the WAR file i.e. are available on your Container.
>
> How do you build you WAR?
>
> Markus
>  
> Am Freitag, den 02.06.2006, 07:33 +0200 schrieb Sebastien Arbogast:
>
>   
>> I have trouble understanding the new dependency mechanism. I added a
>> dependency like this in my root pom dependencyManagament section:
>>
>> <dependency>
>>                 <groupId>jakarta-regexp</groupId>
>>                 <artifactId>jakarta-regexp</artifactId>
>>                 <version>1.4</version>
>>                 <scope>runtime</scope>
>>             </dependency>
>>
>> It's not the only one, I've added several ones like that and they all
>> appear in the resulting webapp WEB-INF/lib directory, except for this
>> one. There is no exclude on jakarta-regexp in other dependencies, and
>> I can't find what's wrong. Any idea?
>>
>>     
>
>   


Re: [M2] Ghost dependencies

Posted by Markus Reinhardt <mr...@hygiene.uni-wuerzburg.de>.
Hi Sebastien,

I don't know how the war packaging plugin handles <scope>runtime</scope>
dependencies. I use no <scope> at all for required JARs and
<scope>provided</scope> for those, which should not be packaged inside
the WAR file i.e. are available on your Container.

How do you build you WAR?

Markus
 
Am Freitag, den 02.06.2006, 07:33 +0200 schrieb Sebastien Arbogast:

> I have trouble understanding the new dependency mechanism. I added a
> dependency like this in my root pom dependencyManagament section:
> 
> <dependency>
>                 <groupId>jakarta-regexp</groupId>
>                 <artifactId>jakarta-regexp</artifactId>
>                 <version>1.4</version>
>                 <scope>runtime</scope>
>             </dependency>
> 
> It's not the only one, I've added several ones like that and they all
> appear in the resulting webapp WEB-INF/lib directory, except for this
> one. There is no exclude on jakarta-regexp in other dependencies, and
> I can't find what's wrong. Any idea?
> 

Re: [M2] Ghost dependencies

Posted by Tim Kettler <ti...@udo.edu>.
Hi,

dependencies in the <dependencyManagement/> section just define default attributes (like 
giving a default version) for when you specify the dependency in some child pom.

Can it be that you forgot to include the dependency in your actual project pom?

Hope this helps
-Tim

Sebastien Arbogast schrieb:
> I have trouble understanding the new dependency mechanism. I added a
> dependency like this in my root pom dependencyManagament section:
> 
> <dependency>
>                <groupId>jakarta-regexp</groupId>
>                <artifactId>jakarta-regexp</artifactId>
>                <version>1.4</version>
>                <scope>runtime</scope>
>            </dependency>
> 
> It's not the only one, I've added several ones like that and they all
> appear in the resulting webapp WEB-INF/lib directory, except for this
> one. There is no exclude on jakarta-regexp in other dependencies, and
> I can't find what's wrong. Any idea?
> 


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