Thank you.
I thought, pluginManagement is for plugin configurations and all other
stuff but versions, and dependencyManagement
for artifact/plugin versions managing. I was wrong.
Grzegorz Slowikowski
LAMY Olivier napisał(a):
Hi,
In your root pom, use build/pluginManagement/plugins with this :
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>2.0</version>
</plugin>
And maybe use user ML for this question.
--
Olivier
-----Message d'origine-----
De : Grzegorz Słowikowski [mailto:[EMAIL PROTECTED]
Envoyé : vendredi 20 avril 2007 10:34
À : [email protected]
Objet : Controlling plugin versions using dependency management
Hi developers
I want to control plugin versions used in a multimodule build with
dependencyManagement. I thing, Maven behaves weird.
Here is a test project, where I try to control maven-jar-plugin version.
parent pom:
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>mycompany</groupId>
<artifactId>parent</artifactId>
<packaging>pom</packaging>
<version>1.0.0-SNAPSHOT</version>
<modules>
<module>child</module>
</modules>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.0</version>
</dependency>
</dependencies>
</dependencyManagement>
</project>
child pom (in "child" subdirectory):
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>mycompany</groupId>
<artifactId>parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<artifactId>child</artifactId>
<version>1.0.0-SNAPSHOT</version>
<!--
<dependencies>
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
</dependency>
</dependencies>
-->
</project>
When building child, maven-jar-plugin 2.1 (latest) is selected.
If I uncomment "dependencies" section, maven-jar-plugin 2.0 (specified in
"dependencyManagement" section) is selected.
Why I have to specify dependency to make "dependencyManagement"
work for a plugin?
Is this an error or am I doing something wrong?
Greetings
Grzegorz Slowikowski
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail:
[EMAIL PROTECTED]
This e-mail, any attachments and the information contained therein ("this
message") are confidential and intended solely for the use of the addressee(s). If
you have received this message in error please send it back to the sender and delete it.
Unauthorized publication, use, dissemination or disclosure of this message, either in
whole or in part is strictly prohibited.
--------------------------------------------------------------------------------------------------------------
Ce message électronique et tous les fichiers joints ainsi que les informations contenues
dans ce message ( ci après "le message" ), sont confidentiels et destinés
exclusivement à l'usage de la personne à laquelle ils sont adressés. Si vous avez reçu
ce message par erreur, merci de le renvoyer à son émetteur et de le détruire. Toutes
diffusion, publication, totale ou partielle ou divulgation sous quelque forme que se soit
non expressément autorisées de ce message, sont interdites.
-------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]