Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-2972

Ignores version of plugin dependency specified in my pom

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 2.0.6
    • 2.0.9
    • Dependencies
    • None
    • maven 2.0.6, java version "1.5.0_07"

    Description

      xmlbeans-maven-plugin declares a dependency on xmlbeans-2.0.0

      I want to use xmlbeans-2.2.0

      So in my pom I put:

      <plugin>
      <groupId>org.codehaus.mojo</groupId>
      <artifactId>xmlbeans-maven-plugin</artifactId>
      <executions>
      <execution>
      <goals>
      <goal>xmlbeans</goal>
      </goals>
      </execution>
      </executions>
      <configuration>
      ...
      </configuration>
      <dependencies>
      <dependency>
      <groupId>xmlbeans</groupId>
      <artifactId>xbean</artifactId>
      <version>2.2.0</version>
      </dependency>
      </dependencies>
      </plugin

      But it still downloads 2.0.0. (as well as 2.2.0). Haven't got a clue which it is using as it doesn't seem to output stuff like that. Couldn't see a verbose or debug switch mentioned in the docs. Anyway I think it is still using 2.0.0.

      Seems like I'm not the first to experience this:
      http://www.nabble.com/Override-plugin-dependency-version-tf2357806s177.html#a6568092

      Apparently this should be possible: http://maven.apache.org/pom.html#plugins

      "dependencies: Dependencies are seen a lot within the POM, and are an element under all plugins element blocks. The dependencies have the same structure and function as under that base build. The major difference in this case is that instead of applying as dependencies of the project, they now apply as dependencies of the plugin that they are under. The power of this is to alter the dependency list of a plugin, perhaps by removing an unused runtime dependency via exclusions, or by altering the version of a required dpendency. See above under Dependencies for more information."

      Attachments

        Issue Links

          Activity

            People

              brianf Brian E Fox
              derek Derek Alexander
              Votes:
              5 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: