You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Arnaud HERITIER <ah...@gmail.com> on 2008/06/04 15:28:45 UTC

Re: Tip about Skinny Wars - is an enforcer plugin's bug side effect :-(

I made additional tests and I found that it is another side effect of the
usage of the enforcer plugin (build from trunk rev 651824).

:-(

I will have a look at its code to see if this bug of the enforcer plugin can
become a feature in the war plugin ;-)

Arnaud

On Tue, Jun 3, 2008 at 7:31 PM, Arnaud HERITIER <ah...@gmail.com> wrote:

> Hi all,
>
>   I would like to share with you a workaround I found for the problem of
> transitive dependencies in skinny wars.
>   In the documentation it is said that :
>  "Now the painful part.  Your EAR's <<<pom.xml>>> needs to list every
> dependency that the WAR has.
>  This is because Maven assumes fat WARs and does not include transitive
> dependencies
>  of WARs within the EAR."
>
>   A workaround of this is to define for each war 2 dependencies. One for
> the war itself and another for the war's pom to retrieve transitive
> dependencies.
>   With that you'll have something like that in your ear dependencies :
>
>     <dependencies>
>         <dependency>
>             <groupId>com.acme</groupId>
>             <artifactId>war1</artifactId>
>             <version>1.0.0</version>
>             <type>war</type>
>         </dependency>
>         <dependency>
>             <groupId>com.acme</groupId>
>             <artifactId>war1</artifactId>
>             <version>1.0.0</version>
>             <type>pom</type>
>         </dependency>
>     </dependencies>
>
> I'm using maven 2.0.9.
>
> I'll do more tests tomorrow and I'll update the doc :
> http://maven.apache.org/plugins/maven-war-plugin/examples/skinny-wars.html
>
> Cheers
>
> arnaud
>
>
>

Re: Tip about Skinny Wars - is an enforcer plugin's bug side effect :-(

Posted by Syvalta <sy...@yahoo.com>.

Arnaud HERITIER wrote:
> 
> I will have a look at its code to see if this bug of the enforcer plugin
> can
> become a feature in the war plugin ;-)
> 

Or, even, a feature in maven? :) In practice this would mean extending the
import scope of dependencyManagement to dependencies too. This would be very
useful in general, not only in war or ear plugin.
-- 
View this message in context: http://www.nabble.com/Re%3A-Tip-about-Skinny-Wars---is-an-enforcer-plugin%27s-bug-side-effect-%3A-%28-tp17646762p17735093.html
Sent from the Maven Developers mailing list archive at Nabble.com.


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


Re: Tip about Skinny Wars - is an enforcer plugin's bug side effect :-(

Posted by Stephen Duncan Jr <st...@gmail.com>.
The ear plugin is the only plugin I have configured in my ear project.  I
don't have any parent POMs involved.  The only issue I hit (yes, I jumped on
this tip somewhat hastily), was that the release plugin only updated the
first dependency (the pom), for each pom+war pair I had.

-Stephen

On Wed, Jun 4, 2008 at 11:33 AM, Arnaud HERITIER <ah...@gmail.com>
wrote:

> Are you sure ?
> I tested it all the day and it doesn't work for me without the enforcer :-(
> Another plugin in your build lifecycle ?
>
> Arnaud
>
>
> On Wed, Jun 4, 2008 at 5:30 PM, Stephen Duncan Jr <
> stephen.duncan@gmail.com>
> wrote:
>
> > I'm not using the enforcer plugin, and using the pom dependency works for
> > me
> > with maven-2.0.9.
> >
> > -Stephen
> >
> > On Wed, Jun 4, 2008 at 11:16 AM, Arnaud HERITIER <ah...@gmail.com>
> > wrote:
> >
> > > I can certainly create a simple testcase if you want.
> > > Let's imagine we have an ear which depends on an war which depends on a
> > > library.
> > > I want to put my war dependencies in my ear to use the skinny war
> > feature.
> > > I setup my ear plugin with :
> > >
> > > <defaultJavaBundleDir>lib/</defaultJavaBundleDir>
> > >
> > > As it is described in the skinny war documentation, I have to put my
> war
> > > dependencies in my ear to have them copied in the ear :-(
> > > I horrible and not very usable in a real project.
> > > I tried something else by duplicating my war dependency using a pom
> type
> > :
> > >
> > >    <dependency>
> > >      <groupId>${project.groupId}</groupId>
> > >      <artifactId>war1</artifactId>
> > >       <type>war</type>
> > >    </dependency>
> > >    <dependency>
> > >       <groupId>${project.groupId}</groupId>
> > >      <artifactId>war1</artifactId>
> > >      <type>pom</type>
> > >    </dependency>
> > >
> > > And it works if I'm using the enforcer plugin.
> > > The ear plugin retreives my war dependency from the pom dependency
> > > If I remove the enforcer plugin, it doesn't work any more :-(
> > >
> > > Should we reopen an enforcer issue ? Which one ? MENFORCER-11 ?
> > >
> > > Arnaud
> > >
> > > On Wed, Jun 4, 2008 at 4:43 PM, Brian E. Fox <brianf@reply.infinity.nu
> >
> > > wrote:
> > >
> > > > What's the side effect?
> > > >
> > > > -----Original Message-----
> > > > From: Arnaud HERITIER [mailto:aheritier@gmail.com]
> > > > Sent: Wednesday, June 04, 2008 9:29 AM
> > > > To: Maven Users List
> > > > Cc: Maven Developers List
> > > > Subject: Re: Tip about Skinny Wars - is an enforcer plugin's bug side
> > > > effect :-(
> > > >
> > > > I made additional tests and I found that it is another side effect of
> > > > the
> > > > usage of the enforcer plugin (build from trunk rev 651824).
> > > >
> > > > :-(
> > > >
> > > > I will have a look at its code to see if this bug of the enforcer
> > plugin
> > > > can
> > > > become a feature in the war plugin ;-)
> > > >
> > > > Arnaud
> > > >
> > > > On Tue, Jun 3, 2008 at 7:31 PM, Arnaud HERITIER <aheritier@gmail.com
> >
> > > > wrote:
> > > >
> > > > > Hi all,
> > > > >
> > > > >   I would like to share with you a workaround I found for the
> problem
> > > > of
> > > > > transitive dependencies in skinny wars.
> > > > >   In the documentation it is said that :
> > > > >  "Now the painful part.  Your EAR's <<<pom.xml>>> needs to list
> every
> > > > > dependency that the WAR has.
> > > > >  This is because Maven assumes fat WARs and does not include
> > > > transitive
> > > > > dependencies
> > > > >  of WARs within the EAR."
> > > > >
> > > > >   A workaround of this is to define for each war 2 dependencies.
> One
> > > > for
> > > > > the war itself and another for the war's pom to retrieve transitive
> > > > > dependencies.
> > > > >   With that you'll have something like that in your ear
> dependencies
> > :
> > > > >
> > > > >     <dependencies>
> > > > >         <dependency>
> > > > >             <groupId>com.acme</groupId>
> > > > >             <artifactId>war1</artifactId>
> > > > >             <version>1.0.0</version>
> > > > >             <type>war</type>
> > > > >         </dependency>
> > > > >         <dependency>
> > > > >             <groupId>com.acme</groupId>
> > > > >             <artifactId>war1</artifactId>
> > > > >             <version>1.0.0</version>
> > > > >             <type>pom</type>
> > > > >         </dependency>
> > > > >     </dependencies>
> > > > >
> > > > > I'm using maven 2.0.9.
> > > > >
> > > > > I'll do more tests tomorrow and I'll update the doc :
> > > > >
> > > >
> > http://maven.apache.org/plugins/maven-war-plugin/examples/skinny-wars.ht
> > > > ml<
> > >
> >
> http://maven.apache.org/plugins/maven-war-plugin/examples/skinny-wars.html
> > > >
> > > > >
> > > > > Cheers
> > > > >
> > > > > arnaud
> > > > >
> > > > >
> > > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > > > For additional commands, e-mail: dev-help@maven.apache.org
> > > >
> > > >
> > >
> >
> >
> >
> > --
> > Stephen Duncan Jr
> > www.stephenduncanjr.com
> >
>



-- 
Stephen Duncan Jr
www.stephenduncanjr.com

Re: Tip about Skinny Wars - is an enforcer plugin's bug side effect :-(

Posted by Arnaud HERITIER <ah...@gmail.com>.
I don't think there's another plugin that it is used (excepted those used by
default in the lifecycle).
I'll check and I'll try to create a little test case to reproduce it.

Thx

Arnaud

On Wed, Jun 4, 2008 at 8:44 PM, Brian Fox <br...@reply.infinity.nu> wrote:

> My guess is that one of your plugins isn't resolving the correct scope of
> dependencies and having the enforcer masks this.
>
> Sent from my iPhone
>
>
> On Jun 4, 2008, at 11:33 AM, "Arnaud HERITIER" <ah...@gmail.com>
> wrote:
>
>  Are you sure ?
>> I tested it all the day and it doesn't work for me without the enforcer
>> :-(
>> Another plugin in your build lifecycle ?
>>
>> Arnaud
>>
>>
>> On Wed, Jun 4, 2008 at 5:30 PM, Stephen Duncan Jr <
>> stephen.duncan@gmail.com>
>> wrote:
>>
>>  I'm not using the enforcer plugin, and using the pom dependency works for
>>> me
>>> with maven-2.0.9.
>>>
>>> -Stephen
>>>
>>> On Wed, Jun 4, 2008 at 11:16 AM, Arnaud HERITIER <ah...@gmail.com>
>>> wrote:
>>>
>>>  I can certainly create a simple testcase if you want.
>>>> Let's imagine we have an ear which depends on an war which depends on a
>>>> library.
>>>> I want to put my war dependencies in my ear to use the skinny war
>>>>
>>> feature.
>>>
>>>> I setup my ear plugin with :
>>>>
>>>> <defaultJavaBundleDir>lib/</defaultJavaBundleDir>
>>>>
>>>> As it is described in the skinny war documentation, I have to put my war
>>>> dependencies in my ear to have them copied in the ear :-(
>>>> I horrible and not very usable in a real project.
>>>> I tried something else by duplicating my war dependency using a pom type
>>>>
>>> :
>>>
>>>>
>>>>  <dependency>
>>>>    <groupId>${project.groupId}</groupId>
>>>>    <artifactId>war1</artifactId>
>>>>     <type>war</type>
>>>>  </dependency>
>>>>  <dependency>
>>>>     <groupId>${project.groupId}</groupId>
>>>>    <artifactId>war1</artifactId>
>>>>    <type>pom</type>
>>>>  </dependency>
>>>>
>>>> And it works if I'm using the enforcer plugin.
>>>> The ear plugin retreives my war dependency from the pom dependency
>>>> If I remove the enforcer plugin, it doesn't work any more :-(
>>>>
>>>> Should we reopen an enforcer issue ? Which one ? MENFORCER-11 ?
>>>>
>>>> Arnaud
>>>>
>>>> On Wed, Jun 4, 2008 at 4:43 PM, Brian E. Fox <br...@reply.infinity.nu>
>>>> wrote:
>>>>
>>>>  What's the side effect?
>>>>>
>>>>> -----Original Message-----
>>>>> From: Arnaud HERITIER [mailto:aheritier@gmail.com]
>>>>> Sent: Wednesday, June 04, 2008 9:29 AM
>>>>> To: Maven Users List
>>>>> Cc: Maven Developers List
>>>>> Subject: Re: Tip about Skinny Wars - is an enforcer plugin's bug side
>>>>> effect :-(
>>>>>
>>>>> I made additional tests and I found that it is another side effect of
>>>>> the
>>>>> usage of the enforcer plugin (build from trunk rev 651824).
>>>>>
>>>>> :-(
>>>>>
>>>>> I will have a look at its code to see if this bug of the enforcer
>>>>>
>>>> plugin
>>>
>>>> can
>>>>> become a feature in the war plugin ;-)
>>>>>
>>>>> Arnaud
>>>>>
>>>>> On Tue, Jun 3, 2008 at 7:31 PM, Arnaud HERITIER <ah...@gmail.com>
>>>>> wrote:
>>>>>
>>>>>  Hi all,
>>>>>>
>>>>>>  I would like to share with you a workaround I found for the problem
>>>>>>
>>>>> of
>>>>>
>>>>>> transitive dependencies in skinny wars.
>>>>>>  In the documentation it is said that :
>>>>>> "Now the painful part.  Your EAR's <<<pom.xml>>> needs to list every
>>>>>> dependency that the WAR has.
>>>>>> This is because Maven assumes fat WARs and does not include
>>>>>>
>>>>> transitive
>>>>>
>>>>>> dependencies
>>>>>> of WARs within the EAR."
>>>>>>
>>>>>>  A workaround of this is to define for each war 2 dependencies. One
>>>>>>
>>>>> for
>>>>>
>>>>>> the war itself and another for the war's pom to retrieve transitive
>>>>>> dependencies.
>>>>>>  With that you'll have something like that in your ear dependencies
>>>>>>
>>>>> :
>>>
>>>>
>>>>>>   <dependencies>
>>>>>>       <dependency>
>>>>>>           <groupId>com.acme</groupId>
>>>>>>           <artifactId>war1</artifactId>
>>>>>>           <version>1.0.0</version>
>>>>>>           <type>war</type>
>>>>>>       </dependency>
>>>>>>       <dependency>
>>>>>>           <groupId>com.acme</groupId>
>>>>>>           <artifactId>war1</artifactId>
>>>>>>           <version>1.0.0</version>
>>>>>>           <type>pom</type>
>>>>>>       </dependency>
>>>>>>   </dependencies>
>>>>>>
>>>>>> I'm using maven 2.0.9.
>>>>>>
>>>>>> I'll do more tests tomorrow and I'll update the doc :
>>>>>>
>>>>>>
>>>>>
>>> http://maven.apache.org/plugins/maven-war-plugin/examples/skinny-wars.ht
>>>
>>>> ml<
>>>>>
>>>>
>>>>
>>> http://maven.apache.org/plugins/maven-war-plugin/examples/skinny-wars.html
>>>
>>>>
>>>>>
>>>>>> Cheers
>>>>>>
>>>>>> arnaud
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>>>>> For additional commands, e-mail: dev-help@maven.apache.org
>>>>>
>>>>>
>>>>>
>>>>
>>>
>>>
>>> --
>>> Stephen Duncan Jr
>>> www.stephenduncanjr.com
>>>
>>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

Re: Tip about Skinny Wars - is an enforcer plugin's bug side effect :-(

Posted by Brian Fox <br...@reply.infinity.nu>.
My guess is that one of your plugins isn't resolving the correct scope  
of dependencies and having the enforcer masks this.

Sent from my iPhone

On Jun 4, 2008, at 11:33 AM, "Arnaud HERITIER" <ah...@gmail.com>  
wrote:

> Are you sure ?
> I tested it all the day and it doesn't work for me without the  
> enforcer :-(
> Another plugin in your build lifecycle ?
>
> Arnaud
>
>
> On Wed, Jun 4, 2008 at 5:30 PM, Stephen Duncan Jr <stephen.duncan@gmail.com 
> >
> wrote:
>
>> I'm not using the enforcer plugin, and using the pom dependency  
>> works for
>> me
>> with maven-2.0.9.
>>
>> -Stephen
>>
>> On Wed, Jun 4, 2008 at 11:16 AM, Arnaud HERITIER  
>> <ah...@gmail.com>
>> wrote:
>>
>>> I can certainly create a simple testcase if you want.
>>> Let's imagine we have an ear which depends on an war which depends  
>>> on a
>>> library.
>>> I want to put my war dependencies in my ear to use the skinny war
>> feature.
>>> I setup my ear plugin with :
>>>
>>> <defaultJavaBundleDir>lib/</defaultJavaBundleDir>
>>>
>>> As it is described in the skinny war documentation, I have to put  
>>> my war
>>> dependencies in my ear to have them copied in the ear :-(
>>> I horrible and not very usable in a real project.
>>> I tried something else by duplicating my war dependency using a  
>>> pom type
>> :
>>>
>>>   <dependency>
>>>     <groupId>${project.groupId}</groupId>
>>>     <artifactId>war1</artifactId>
>>>      <type>war</type>
>>>   </dependency>
>>>   <dependency>
>>>      <groupId>${project.groupId}</groupId>
>>>     <artifactId>war1</artifactId>
>>>     <type>pom</type>
>>>   </dependency>
>>>
>>> And it works if I'm using the enforcer plugin.
>>> The ear plugin retreives my war dependency from the pom dependency
>>> If I remove the enforcer plugin, it doesn't work any more :-(
>>>
>>> Should we reopen an enforcer issue ? Which one ? MENFORCER-11 ?
>>>
>>> Arnaud
>>>
>>> On Wed, Jun 4, 2008 at 4:43 PM, Brian E. Fox <brianf@reply.infinity.nu 
>>> >
>>> wrote:
>>>
>>>> What's the side effect?
>>>>
>>>> -----Original Message-----
>>>> From: Arnaud HERITIER [mailto:aheritier@gmail.com]
>>>> Sent: Wednesday, June 04, 2008 9:29 AM
>>>> To: Maven Users List
>>>> Cc: Maven Developers List
>>>> Subject: Re: Tip about Skinny Wars - is an enforcer plugin's bug  
>>>> side
>>>> effect :-(
>>>>
>>>> I made additional tests and I found that it is another side  
>>>> effect of
>>>> the
>>>> usage of the enforcer plugin (build from trunk rev 651824).
>>>>
>>>> :-(
>>>>
>>>> I will have a look at its code to see if this bug of the enforcer
>> plugin
>>>> can
>>>> become a feature in the war plugin ;-)
>>>>
>>>> Arnaud
>>>>
>>>> On Tue, Jun 3, 2008 at 7:31 PM, Arnaud HERITIER <aheritier@gmail.com 
>>>> >
>>>> wrote:
>>>>
>>>>> Hi all,
>>>>>
>>>>>  I would like to share with you a workaround I found for the  
>>>>> problem
>>>> of
>>>>> transitive dependencies in skinny wars.
>>>>>  In the documentation it is said that :
>>>>> "Now the painful part.  Your EAR's <<<pom.xml>>> needs to list  
>>>>> every
>>>>> dependency that the WAR has.
>>>>> This is because Maven assumes fat WARs and does not include
>>>> transitive
>>>>> dependencies
>>>>> of WARs within the EAR."
>>>>>
>>>>>  A workaround of this is to define for each war 2 dependencies.  
>>>>> One
>>>> for
>>>>> the war itself and another for the war's pom to retrieve  
>>>>> transitive
>>>>> dependencies.
>>>>>  With that you'll have something like that in your ear  
>>>>> dependencies
>> :
>>>>>
>>>>>    <dependencies>
>>>>>        <dependency>
>>>>>            <groupId>com.acme</groupId>
>>>>>            <artifactId>war1</artifactId>
>>>>>            <version>1.0.0</version>
>>>>>            <type>war</type>
>>>>>        </dependency>
>>>>>        <dependency>
>>>>>            <groupId>com.acme</groupId>
>>>>>            <artifactId>war1</artifactId>
>>>>>            <version>1.0.0</version>
>>>>>            <type>pom</type>
>>>>>        </dependency>
>>>>>    </dependencies>
>>>>>
>>>>> I'm using maven 2.0.9.
>>>>>
>>>>> I'll do more tests tomorrow and I'll update the doc :
>>>>>
>>>>
>> http://maven.apache.org/plugins/maven-war-plugin/examples/skinny-wars.ht
>>>> ml<
>>>
>> http://maven.apache.org/plugins/maven-war-plugin/examples/skinny-wars.html
>>>>
>>>>>
>>>>> Cheers
>>>>>
>>>>> arnaud
>>>>>
>>>>>
>>>>>
>>>>
>>>> --- 
>>>> ------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>>>> For additional commands, e-mail: dev-help@maven.apache.org
>>>>
>>>>
>>>
>>
>>
>>
>> --
>> Stephen Duncan Jr
>> www.stephenduncanjr.com
>>

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


Re: Tip about Skinny Wars - is an enforcer plugin's bug side effect :-(

Posted by Arnaud HERITIER <ah...@gmail.com>.
Are you sure ?
I tested it all the day and it doesn't work for me without the enforcer :-(
Another plugin in your build lifecycle ?

Arnaud


On Wed, Jun 4, 2008 at 5:30 PM, Stephen Duncan Jr <st...@gmail.com>
wrote:

> I'm not using the enforcer plugin, and using the pom dependency works for
> me
> with maven-2.0.9.
>
> -Stephen
>
> On Wed, Jun 4, 2008 at 11:16 AM, Arnaud HERITIER <ah...@gmail.com>
> wrote:
>
> > I can certainly create a simple testcase if you want.
> > Let's imagine we have an ear which depends on an war which depends on a
> > library.
> > I want to put my war dependencies in my ear to use the skinny war
> feature.
> > I setup my ear plugin with :
> >
> > <defaultJavaBundleDir>lib/</defaultJavaBundleDir>
> >
> > As it is described in the skinny war documentation, I have to put my war
> > dependencies in my ear to have them copied in the ear :-(
> > I horrible and not very usable in a real project.
> > I tried something else by duplicating my war dependency using a pom type
> :
> >
> >    <dependency>
> >      <groupId>${project.groupId}</groupId>
> >      <artifactId>war1</artifactId>
> >       <type>war</type>
> >    </dependency>
> >    <dependency>
> >       <groupId>${project.groupId}</groupId>
> >      <artifactId>war1</artifactId>
> >      <type>pom</type>
> >    </dependency>
> >
> > And it works if I'm using the enforcer plugin.
> > The ear plugin retreives my war dependency from the pom dependency
> > If I remove the enforcer plugin, it doesn't work any more :-(
> >
> > Should we reopen an enforcer issue ? Which one ? MENFORCER-11 ?
> >
> > Arnaud
> >
> > On Wed, Jun 4, 2008 at 4:43 PM, Brian E. Fox <br...@reply.infinity.nu>
> > wrote:
> >
> > > What's the side effect?
> > >
> > > -----Original Message-----
> > > From: Arnaud HERITIER [mailto:aheritier@gmail.com]
> > > Sent: Wednesday, June 04, 2008 9:29 AM
> > > To: Maven Users List
> > > Cc: Maven Developers List
> > > Subject: Re: Tip about Skinny Wars - is an enforcer plugin's bug side
> > > effect :-(
> > >
> > > I made additional tests and I found that it is another side effect of
> > > the
> > > usage of the enforcer plugin (build from trunk rev 651824).
> > >
> > > :-(
> > >
> > > I will have a look at its code to see if this bug of the enforcer
> plugin
> > > can
> > > become a feature in the war plugin ;-)
> > >
> > > Arnaud
> > >
> > > On Tue, Jun 3, 2008 at 7:31 PM, Arnaud HERITIER <ah...@gmail.com>
> > > wrote:
> > >
> > > > Hi all,
> > > >
> > > >   I would like to share with you a workaround I found for the problem
> > > of
> > > > transitive dependencies in skinny wars.
> > > >   In the documentation it is said that :
> > > >  "Now the painful part.  Your EAR's <<<pom.xml>>> needs to list every
> > > > dependency that the WAR has.
> > > >  This is because Maven assumes fat WARs and does not include
> > > transitive
> > > > dependencies
> > > >  of WARs within the EAR."
> > > >
> > > >   A workaround of this is to define for each war 2 dependencies. One
> > > for
> > > > the war itself and another for the war's pom to retrieve transitive
> > > > dependencies.
> > > >   With that you'll have something like that in your ear dependencies
> :
> > > >
> > > >     <dependencies>
> > > >         <dependency>
> > > >             <groupId>com.acme</groupId>
> > > >             <artifactId>war1</artifactId>
> > > >             <version>1.0.0</version>
> > > >             <type>war</type>
> > > >         </dependency>
> > > >         <dependency>
> > > >             <groupId>com.acme</groupId>
> > > >             <artifactId>war1</artifactId>
> > > >             <version>1.0.0</version>
> > > >             <type>pom</type>
> > > >         </dependency>
> > > >     </dependencies>
> > > >
> > > > I'm using maven 2.0.9.
> > > >
> > > > I'll do more tests tomorrow and I'll update the doc :
> > > >
> > >
> http://maven.apache.org/plugins/maven-war-plugin/examples/skinny-wars.ht
> > > ml<
> >
> http://maven.apache.org/plugins/maven-war-plugin/examples/skinny-wars.html
> > >
> > > >
> > > > Cheers
> > > >
> > > > arnaud
> > > >
> > > >
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: dev-help@maven.apache.org
> > >
> > >
> >
>
>
>
> --
> Stephen Duncan Jr
> www.stephenduncanjr.com
>

Re: Tip about Skinny Wars - is an enforcer plugin's bug side effect :-(

Posted by Stephen Duncan Jr <st...@gmail.com>.
I'm not using the enforcer plugin, and using the pom dependency works for me
with maven-2.0.9.

-Stephen

On Wed, Jun 4, 2008 at 11:16 AM, Arnaud HERITIER <ah...@gmail.com>
wrote:

> I can certainly create a simple testcase if you want.
> Let's imagine we have an ear which depends on an war which depends on a
> library.
> I want to put my war dependencies in my ear to use the skinny war feature.
> I setup my ear plugin with :
>
> <defaultJavaBundleDir>lib/</defaultJavaBundleDir>
>
> As it is described in the skinny war documentation, I have to put my war
> dependencies in my ear to have them copied in the ear :-(
> I horrible and not very usable in a real project.
> I tried something else by duplicating my war dependency using a pom type :
>
>    <dependency>
>      <groupId>${project.groupId}</groupId>
>      <artifactId>war1</artifactId>
>       <type>war</type>
>    </dependency>
>    <dependency>
>       <groupId>${project.groupId}</groupId>
>      <artifactId>war1</artifactId>
>      <type>pom</type>
>    </dependency>
>
> And it works if I'm using the enforcer plugin.
> The ear plugin retreives my war dependency from the pom dependency
> If I remove the enforcer plugin, it doesn't work any more :-(
>
> Should we reopen an enforcer issue ? Which one ? MENFORCER-11 ?
>
> Arnaud
>
> On Wed, Jun 4, 2008 at 4:43 PM, Brian E. Fox <br...@reply.infinity.nu>
> wrote:
>
> > What's the side effect?
> >
> > -----Original Message-----
> > From: Arnaud HERITIER [mailto:aheritier@gmail.com]
> > Sent: Wednesday, June 04, 2008 9:29 AM
> > To: Maven Users List
> > Cc: Maven Developers List
> > Subject: Re: Tip about Skinny Wars - is an enforcer plugin's bug side
> > effect :-(
> >
> > I made additional tests and I found that it is another side effect of
> > the
> > usage of the enforcer plugin (build from trunk rev 651824).
> >
> > :-(
> >
> > I will have a look at its code to see if this bug of the enforcer plugin
> > can
> > become a feature in the war plugin ;-)
> >
> > Arnaud
> >
> > On Tue, Jun 3, 2008 at 7:31 PM, Arnaud HERITIER <ah...@gmail.com>
> > wrote:
> >
> > > Hi all,
> > >
> > >   I would like to share with you a workaround I found for the problem
> > of
> > > transitive dependencies in skinny wars.
> > >   In the documentation it is said that :
> > >  "Now the painful part.  Your EAR's <<<pom.xml>>> needs to list every
> > > dependency that the WAR has.
> > >  This is because Maven assumes fat WARs and does not include
> > transitive
> > > dependencies
> > >  of WARs within the EAR."
> > >
> > >   A workaround of this is to define for each war 2 dependencies. One
> > for
> > > the war itself and another for the war's pom to retrieve transitive
> > > dependencies.
> > >   With that you'll have something like that in your ear dependencies :
> > >
> > >     <dependencies>
> > >         <dependency>
> > >             <groupId>com.acme</groupId>
> > >             <artifactId>war1</artifactId>
> > >             <version>1.0.0</version>
> > >             <type>war</type>
> > >         </dependency>
> > >         <dependency>
> > >             <groupId>com.acme</groupId>
> > >             <artifactId>war1</artifactId>
> > >             <version>1.0.0</version>
> > >             <type>pom</type>
> > >         </dependency>
> > >     </dependencies>
> > >
> > > I'm using maven 2.0.9.
> > >
> > > I'll do more tests tomorrow and I'll update the doc :
> > >
> > http://maven.apache.org/plugins/maven-war-plugin/examples/skinny-wars.ht
> > ml<
> http://maven.apache.org/plugins/maven-war-plugin/examples/skinny-wars.html
> >
> > >
> > > Cheers
> > >
> > > arnaud
> > >
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > For additional commands, e-mail: dev-help@maven.apache.org
> >
> >
>



-- 
Stephen Duncan Jr
www.stephenduncanjr.com

Re: Tip about Skinny Wars - is an enforcer plugin's bug side effect :-(

Posted by Arnaud HERITIER <ah...@gmail.com>.
I can certainly create a simple testcase if you want.
Let's imagine we have an ear which depends on an war which depends on a
library.
I want to put my war dependencies in my ear to use the skinny war feature.
I setup my ear plugin with :

<defaultJavaBundleDir>lib/</defaultJavaBundleDir>

As it is described in the skinny war documentation, I have to put my war
dependencies in my ear to have them copied in the ear :-(
I horrible and not very usable in a real project.
I tried something else by duplicating my war dependency using a pom type :

    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>war1</artifactId>
      <type>war</type>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>war1</artifactId>
      <type>pom</type>
    </dependency>

And it works if I'm using the enforcer plugin.
The ear plugin retreives my war dependency from the pom dependency
If I remove the enforcer plugin, it doesn't work any more :-(

Should we reopen an enforcer issue ? Which one ? MENFORCER-11 ?

Arnaud

On Wed, Jun 4, 2008 at 4:43 PM, Brian E. Fox <br...@reply.infinity.nu>
wrote:

> What's the side effect?
>
> -----Original Message-----
> From: Arnaud HERITIER [mailto:aheritier@gmail.com]
> Sent: Wednesday, June 04, 2008 9:29 AM
> To: Maven Users List
> Cc: Maven Developers List
> Subject: Re: Tip about Skinny Wars - is an enforcer plugin's bug side
> effect :-(
>
> I made additional tests and I found that it is another side effect of
> the
> usage of the enforcer plugin (build from trunk rev 651824).
>
> :-(
>
> I will have a look at its code to see if this bug of the enforcer plugin
> can
> become a feature in the war plugin ;-)
>
> Arnaud
>
> On Tue, Jun 3, 2008 at 7:31 PM, Arnaud HERITIER <ah...@gmail.com>
> wrote:
>
> > Hi all,
> >
> >   I would like to share with you a workaround I found for the problem
> of
> > transitive dependencies in skinny wars.
> >   In the documentation it is said that :
> >  "Now the painful part.  Your EAR's <<<pom.xml>>> needs to list every
> > dependency that the WAR has.
> >  This is because Maven assumes fat WARs and does not include
> transitive
> > dependencies
> >  of WARs within the EAR."
> >
> >   A workaround of this is to define for each war 2 dependencies. One
> for
> > the war itself and another for the war's pom to retrieve transitive
> > dependencies.
> >   With that you'll have something like that in your ear dependencies :
> >
> >     <dependencies>
> >         <dependency>
> >             <groupId>com.acme</groupId>
> >             <artifactId>war1</artifactId>
> >             <version>1.0.0</version>
> >             <type>war</type>
> >         </dependency>
> >         <dependency>
> >             <groupId>com.acme</groupId>
> >             <artifactId>war1</artifactId>
> >             <version>1.0.0</version>
> >             <type>pom</type>
> >         </dependency>
> >     </dependencies>
> >
> > I'm using maven 2.0.9.
> >
> > I'll do more tests tomorrow and I'll update the doc :
> >
> http://maven.apache.org/plugins/maven-war-plugin/examples/skinny-wars.ht
> ml<http://maven.apache.org/plugins/maven-war-plugin/examples/skinny-wars.html>
> >
> > Cheers
> >
> > arnaud
> >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

RE: Tip about Skinny Wars - is an enforcer plugin's bug side effect :-(

Posted by "Brian E. Fox" <br...@reply.infinity.nu>.
What's the side effect?

-----Original Message-----
From: Arnaud HERITIER [mailto:aheritier@gmail.com] 
Sent: Wednesday, June 04, 2008 9:29 AM
To: Maven Users List
Cc: Maven Developers List
Subject: Re: Tip about Skinny Wars - is an enforcer plugin's bug side
effect :-(

I made additional tests and I found that it is another side effect of
the
usage of the enforcer plugin (build from trunk rev 651824).

:-(

I will have a look at its code to see if this bug of the enforcer plugin
can
become a feature in the war plugin ;-)

Arnaud

On Tue, Jun 3, 2008 at 7:31 PM, Arnaud HERITIER <ah...@gmail.com>
wrote:

> Hi all,
>
>   I would like to share with you a workaround I found for the problem
of
> transitive dependencies in skinny wars.
>   In the documentation it is said that :
>  "Now the painful part.  Your EAR's <<<pom.xml>>> needs to list every
> dependency that the WAR has.
>  This is because Maven assumes fat WARs and does not include
transitive
> dependencies
>  of WARs within the EAR."
>
>   A workaround of this is to define for each war 2 dependencies. One
for
> the war itself and another for the war's pom to retrieve transitive
> dependencies.
>   With that you'll have something like that in your ear dependencies :
>
>     <dependencies>
>         <dependency>
>             <groupId>com.acme</groupId>
>             <artifactId>war1</artifactId>
>             <version>1.0.0</version>
>             <type>war</type>
>         </dependency>
>         <dependency>
>             <groupId>com.acme</groupId>
>             <artifactId>war1</artifactId>
>             <version>1.0.0</version>
>             <type>pom</type>
>         </dependency>
>     </dependencies>
>
> I'm using maven 2.0.9.
>
> I'll do more tests tomorrow and I'll update the doc :
>
http://maven.apache.org/plugins/maven-war-plugin/examples/skinny-wars.ht
ml
>
> Cheers
>
> arnaud
>
>
>

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


Re: Tip about Skinny Wars - is an enforcer plugin's bug side effect :-(

Posted by Lee Meador <le...@leemeador.com>.
Maybe I'm missing something but I thought the purpose of a "skinny war" was
to consolidate shared dependencies between several wars and some ejb jars.

If the new feature will build a jar in the same project as the war and that
jar contains dependencies there has to be some other feature that takes
several of those spare jars, generated a union on the contents and puts that
into the ear somewhere.

So do both of these new features exist in some yet-to-be-released plugin
version or just the one that collects up the dependency jars?

Thanks.

--- Lee

On Wed, Jun 4, 2008 at 11:23 AM, Arnaud HERITIER <ah...@gmail.com>
wrote:

> ok I didn't think about that.
> It can be a usable workaround.
>
> Thx
>
> Arnaud
>
> On Wed, Jun 4, 2008 at 6:08 PM, Jörg Schaible <
> Joerg.Schaible@elsag-solutions.com> wrote:
>
> > Hi Arnaud,
> >
> > Arnaud HERITIER wrote:
> > > I think it is not the same problem.
> > > MWAR-131 is about to reuse classes defined in a war.
> > > attachClasses will generate a secondary artifact that we'll be able
> > > to reuse as dependency in another project.
> >
> > Yes, this "other project" might be the ear ...
> >
> > > The problem for skinny WARs is that EARs didn't package WARs
> > > transitive dependencies.
> > > It's not about classes bundled in the war (which are always in the
> > > war).
> >
> > ... and the attached jar will transport the transitive deps.
> >
> > - Jörg
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>



-- 
-- Lee Meador
Sent from gmail. My real email address is lee AT leemeador.com

Re: Tip about Skinny Wars - is an enforcer plugin's bug side effect :-(

Posted by Arnaud HERITIER <ah...@gmail.com>.
ok I didn't think about that.
It can be a usable workaround.

Thx

Arnaud

On Wed, Jun 4, 2008 at 6:08 PM, Jörg Schaible <
Joerg.Schaible@elsag-solutions.com> wrote:

> Hi Arnaud,
>
> Arnaud HERITIER wrote:
> > I think it is not the same problem.
> > MWAR-131 is about to reuse classes defined in a war.
> > attachClasses will generate a secondary artifact that we'll be able
> > to reuse as dependency in another project.
>
> Yes, this "other project" might be the ear ...
>
> > The problem for skinny WARs is that EARs didn't package WARs
> > transitive dependencies.
> > It's not about classes bundled in the war (which are always in the
> > war).
>
> ... and the attached jar will transport the transitive deps.
>
> - Jörg
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

RE: Tip about Skinny Wars - is an enforcer plugin's bug side effect :-(

Posted by Jörg Schaible <Jo...@Elsag-Solutions.com>.
Hi Arnaud,

Arnaud HERITIER wrote:
> I think it is not the same problem.
> MWAR-131 is about to reuse classes defined in a war.
> attachClasses will generate a secondary artifact that we'll be able
> to reuse as dependency in another project.

Yes, this "other project" might be the ear ...

> The problem for skinny WARs is that EARs didn't package WARs
> transitive dependencies.
> It's not about classes bundled in the war (which are always in the
> war). 

... and the attached jar will transport the transitive deps.

- Jörg

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


Re: Tip about Skinny Wars - is an enforcer plugin's bug side effect :-(

Posted by Arnaud HERITIER <ah...@gmail.com>.
I think it is not the same problem.
MWAR-131 is about to reuse classes defined in a war.
attachClasses will generate a secondary artifact that we'll be able to reuse
as dependency in another project.

The problem for skinny WARs is that EARs didn't package WARs transitive
dependencies.
It's not about classes bundled in the war (which are always in the war).

Arnaud

On Wed, Jun 4, 2008 at 4:20 PM, Mark Struberg <st...@yahoo.de> wrote:

> Hi Arnaud!
>
> The maven-war-plugin already has a similar mechanism with
> <attachClasses>true</attachClasses>, but this hasn't yet been released.
> As I wrote in my previous mail: see MWAR-131 (and partly obsolete MWAR-73)
> for further details.
>
> This workaround should also work in conjunction with the maven-ear-plugin.
>
> LieGrü,
> strub
>
> --- Arnaud HERITIER <ah...@gmail.com> schrieb am Mi, 4.6.2008:
>
> > Von: Arnaud HERITIER <ah...@gmail.com>
> > Betreff: Re: Tip about Skinny Wars - is an enforcer plugin's bug side
> effect :-(
> > An: "Maven Users List" <us...@maven.apache.org>
> > CC: "Maven Developers List" <de...@maven.apache.org>
> > Datum: Mittwoch, 4. Juni 2008, 15:28
> > I made additional tests and I found that it is another side
> > effect of the
> > usage of the enforcer plugin (build from trunk rev 651824).
> >
> > :-(
> >
> > I will have a look at its code to see if this bug of the
> > enforcer plugin can
> > become a feature in the war plugin ;-)
> >
> > Arnaud
> >
> > On Tue, Jun 3, 2008 at 7:31 PM, Arnaud HERITIER
> > <ah...@gmail.com> wrote:
> >
> > > Hi all,
> > >
> > >   I would like to share with you a workaround I found
> > for the problem of
> > > transitive dependencies in skinny wars.
> > >   In the documentation it is said that :
> > >  "Now the painful part.  Your EAR's
> > <<<pom.xml>>> needs to list every
> > > dependency that the WAR has.
> > >  This is because Maven assumes fat WARs and does not
> > include transitive
> > > dependencies
> > >  of WARs within the EAR."
> > >
> > >   A workaround of this is to define for each war 2
> > dependencies. One for
> > > the war itself and another for the war's pom to
> > retrieve transitive
> > > dependencies.
> > >   With that you'll have something like that in
> > your ear dependencies :
> > >
> > >     <dependencies>
> > >         <dependency>
> > >             <groupId>com.acme</groupId>
> > >             <artifactId>war1</artifactId>
> > >             <version>1.0.0</version>
> > >             <type>war</type>
> > >         </dependency>
> > >         <dependency>
> > >             <groupId>com.acme</groupId>
> > >             <artifactId>war1</artifactId>
> > >             <version>1.0.0</version>
> > >             <type>pom</type>
> > >         </dependency>
> > >     </dependencies>
> > >
> > > I'm using maven 2.0.9.
> > >
> > > I'll do more tests tomorrow and I'll update
> > the doc :
> > >
> >
> http://maven.apache.org/plugins/maven-war-plugin/examples/skinny-wars.html
> > >
> > > Cheers
> > >
> > > arnaud
> > >
> > >
> > >
>
>
>       __________________________________________________________
> Gesendet von Yahoo! Mail.
> Dem pfiffigeren Posteingang.
> http://de.overview.mail.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Tip about Skinny Wars - is an enforcer plugin's bug side effect :-(

Posted by Mark Struberg <st...@yahoo.de>.
Hi Arnaud!

The maven-war-plugin already has a similar mechanism with <attachClasses>true</attachClasses>, but this hasn't yet been released. 
As I wrote in my previous mail: see MWAR-131 (and partly obsolete MWAR-73) for further details.

This workaround should also work in conjunction with the maven-ear-plugin.

LieGrü,
strub

--- Arnaud HERITIER <ah...@gmail.com> schrieb am Mi, 4.6.2008:

> Von: Arnaud HERITIER <ah...@gmail.com>
> Betreff: Re: Tip about Skinny Wars - is an enforcer plugin's bug side effect :-(
> An: "Maven Users List" <us...@maven.apache.org>
> CC: "Maven Developers List" <de...@maven.apache.org>
> Datum: Mittwoch, 4. Juni 2008, 15:28
> I made additional tests and I found that it is another side
> effect of the
> usage of the enforcer plugin (build from trunk rev 651824).
> 
> :-(
> 
> I will have a look at its code to see if this bug of the
> enforcer plugin can
> become a feature in the war plugin ;-)
> 
> Arnaud
> 
> On Tue, Jun 3, 2008 at 7:31 PM, Arnaud HERITIER
> <ah...@gmail.com> wrote:
> 
> > Hi all,
> >
> >   I would like to share with you a workaround I found
> for the problem of
> > transitive dependencies in skinny wars.
> >   In the documentation it is said that :
> >  "Now the painful part.  Your EAR's
> <<<pom.xml>>> needs to list every
> > dependency that the WAR has.
> >  This is because Maven assumes fat WARs and does not
> include transitive
> > dependencies
> >  of WARs within the EAR."
> >
> >   A workaround of this is to define for each war 2
> dependencies. One for
> > the war itself and another for the war's pom to
> retrieve transitive
> > dependencies.
> >   With that you'll have something like that in
> your ear dependencies :
> >
> >     <dependencies>
> >         <dependency>
> >             <groupId>com.acme</groupId>
> >             <artifactId>war1</artifactId>
> >             <version>1.0.0</version>
> >             <type>war</type>
> >         </dependency>
> >         <dependency>
> >             <groupId>com.acme</groupId>
> >             <artifactId>war1</artifactId>
> >             <version>1.0.0</version>
> >             <type>pom</type>
> >         </dependency>
> >     </dependencies>
> >
> > I'm using maven 2.0.9.
> >
> > I'll do more tests tomorrow and I'll update
> the doc :
> >
> http://maven.apache.org/plugins/maven-war-plugin/examples/skinny-wars.html
> >
> > Cheers
> >
> > arnaud
> >
> >
> >


      __________________________________________________________
Gesendet von Yahoo! Mail.
Dem pfiffigeren Posteingang.
http://de.overview.mail.yahoo.com

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