Another try with maven-war-plugin-2.0.2 and a pom more similar to my real 
problem:

<project>
  <modelVersion>4.0.0</modelVersion>
  <groupId>foo</groupId>
  <artifactId>bar</artifactId>
  <version>1.0-SNAPSHOT</version>
  <packaging>war</packaging>
  <dependencies>
        <dependency>
            <groupId>avalon</groupId>
            <artifactId>avalon-framework</artifactId>
            <version>4.1.4</version>
        </dependency>
        <dependency>
        <groupId>fop</groupId>
        <artifactId>fop</artifactId>
        <version>0.20.5</version>
    </dependency>
  </dependencies>
  <build>
      <pluginManagement>
          <plugins>
              <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-war-plugin</artifactId>
                  <version>2.0.2</version>
              </plugin>
          </plugins>
      </pluginManagement>
  </build>
</project>

First question : why 2.0.2 HAVE TO be specified (if not, 2.0-beta-2 is used) ?

Second question: I have 2 avalon jar in my dependencies:
WEB-INF/lib/avalon-framework-4.0.jar
WEB-INF/lib/avalon-framework-4.1.4.jar

How can I do to have only avalon-framework-4.1.4.jar ? Changing dependencies 
order does nothing this time.
The only solution I found was to exclude avalon-framework dependency from fop, 
but I think Maven should do it by itself, right ?

Thanks

Julien

----- Message d'origine ----
De : Julien HENRY <[EMAIL PROTECTED]>
À : [email protected]
Envoyé le : Lundi, 29 Janvier 2007, 11h28mn 36s
Objet : War plugin dependencies resolution bug

Hi, 

I'm using maven-war-plugin-2.0-beta-2, and I don't understand the dependency 
resolution mechanism:

Here is the first example:
<project>
  <modelVersion>4.0.0</modelVersion>
  <groupId>foo</groupId>
  <artifactId>bar</artifactId>
  <version>1.0-SNAPSHOT</version>
  <packaging>war</packaging>
  <dependencies>
      <dependency>
          <groupId>log4j</groupId>
          <artifactId>log4j</artifactId>
          <version>1.2.12</version>
      </dependency>
      <dependency>
          <groupId>log4j</groupId>
          <artifactId>log4j</artifactId>
          <version>1.2.13</version>
      </dependency>
  </dependencies>
</project>

Running mvn clean package, I get target/bar-1.0-SNAPSHOT.war, with the 
following content:
WEB-INF/lib/log4j-1.2.12.jar
WEB-INF/lib/log4j-1.2.13.jar


Second example:
<project>

  <modelVersion>4.0.0</modelVersion>

  <groupId>foo</groupId>

  <artifactId>bar</artifactId>

  <version>1.0-SNAPSHOT</version>

  <packaging>war</packaging>

  <dependencies>

      <dependency>

          <groupId>log4j</groupId>

          <artifactId>log4j</artifactId>

          <version>1.2.13</version>

      </dependency>

      <dependency>

          <groupId>log4j</groupId>

          <artifactId>log4j</artifactId>

          <version>1.2.12</version>

      </dependency>

  </dependencies>

</project>


Running mvn clean package, I get target/bar-1.0-SNAPSHOT.war, with the 
following content:

WEB-INF/lib/log4j-1.2.13.jar


Perhaps the first case is a wanted feature, but for me it's a bug. If already 
reported on Jira, could you please give me the link.

Thanks

Julien







        

        
                
___________________________________________________________________________ 
Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! 
Profitez des connaissances, des opinions et des expériences des internautes sur 
Yahoo! Questions/Réponses 
http://fr.answers.yahoo.com

Reply via email to