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

regression : <dependency> in plugin configuration doesn't override plugin classpath

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 2.0.8
    • 2.0.9
    • Plugin API
    • None

    Description

      Many maven plugins are wrapper around other tools. The plugin is designed for a version of the tool, and in many case user will want to use a specific version without having to patch the plugin. The <dependency> element on plugin configuration is a common way to do this, by overriding the plugin POM dependency with another version.

      <plugin>
      <artifactId>castor-maven-plugin</artifactId>
      <dependencies>
      <dependency>
      <groupId>org.codehaus.castor</groupId>
      <artifactId>castor</artifactId>
      <version>VERSION OF CASTOR I WANT TO USE FOR CODE GENERATION</version>
      </dependency>
      </dependencies>
      </plugin>

      This used to work with maven < 2.0.8

      In maven 2.0.8, this doesn't work anymore as the <dependency> set in plugin configuration is added to plugin classpath, as a duplicate for the one declared by the plugin but LATER in the classpath (but I may be wrong on this analysis).

      Attachments

        Issue Links

          Activity

            People

              jdcasey John Dennis Casey
              ndeloof nicolas de loof
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: