[M2] Ghost dependencies

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[M2] Ghost dependencies

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?

--
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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [M2] Ghost dependencies

Tim Kettler
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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [M2] Ghost dependencies

Markus Reinhardt-2
In reply to this post by Sebastien ARBOGAST
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?


signature.asc (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [M2] Ghost dependencies

Pete Marvin King

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?
>>
>>    
>
>  

Reply | Threaded
Open this post in threaded view
|

Re: [M2] Ghost dependencies

Sebastien ARBOGAST
> 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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: [M2] Ghost dependencies

Bravo, Kris
In reply to this post by Sebastien ARBOGAST

Move this to the <dependencies> tag instead of <dependencyManagement> and try again.

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


kris bravo · Clarify Development · office: 678.893.1288 · mobile: 678.296.8723


-----Original Message-----
From: Sebastien Arbogast [mailto:[hidden email]]
Sent: Friday, June 02, 2006 1:34 AM
To: Maven users list
Subject: [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: [hidden email]
For additional commands, e-mail: [hidden email]


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]