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" <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED] >
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 <[EMAIL PROTECTED]>
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 <[EMAIL PROTECTED] >
wrote:

What's the side effect?

-----Original Message-----
From: Arnaud HERITIER [mailto:[EMAIL PROTECTED]
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 <[EMAIL PROTECTED] >
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






--
Stephen Duncan Jr
www.stephenduncanjr.com


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to