You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Bernd Eckenfels <ec...@zusammenkunft.net> on 2014/05/04 06:21:07 UTC

How is version:display-plugin-updates determine the super-pom version (wrongly?)

Hello,

when I create a minimal POM* and expand it with maven 3.2.1 then I see
an entry in the resulting effective pom:

      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.12.4</version>
        <executions>
          <execution>
            <id>default-test</id>
            <phase>test</phase>
            <goals>
              <goal>test</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

(and no plugin management enty). When I run the version:display-plugin-updates
on the same pom, it will print:

[DEBUG] [org.apache.maven.plugins:maven-surefire-plugin].version=null
[DEBUG] [org.apache.maven.plugins:maven-surefire-plugin].artifactVersion=2.4.2
[DEBUG] [org.apache.maven.plugins:maven-surefire-plugin].effectiveVersion=2.17
[DEBUG] [org.apache.maven.plugins:maven-surefire-plugin].specified=false
[DEBUG] [org.apache.maven.plugins:maven-surefire-plugin].superPom.version=2.12.4
[WARNING] The following plugins do not have their version specified:
...
[WARNING]   maven-surefire-plugin ...................... (from super-pom) 2.17

I have no idea why it tells me that the super-pom defines 2.17, is this the expected behavior? In the debug output the versions look better.

Greetings
Bernd

PS: I tested it with the following pom, settings file, empty local repo and commands:

pom.xml:
<project xmlns="http://maven.apache.org/POM/4.0.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
                      http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <groupId>test</groupId>
  <artifactId>pom-test</artifactId>
  <version>0.1-SNAPSHOT</version>

</project>

empty.xml:
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
                      http://maven.apache.org/xsd/settings-1.0.0.xsd">
	<localRepository>C:\Users\USER\.m2\default-repository</localRepository>
</settings>

$ mvn -s empty.xml versions:display-plugin-updates
$ mvn -s empty.xml help:effective-pom > pom-effective.xml

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