jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Maven 2 & 3
  • MNG-3725

Cannot override plugin dependencies in maven 2.0.9

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Cannot Reproduce
  • Affects Version/s: 2.0.9
  • Fix Version/s: None
  • Component/s: Dependencies
  • Labels:
    None
  • Environment:
    Maven version: 2.0.9
    Java version: 1.5.0_13
    OS name: "mac os x" version: "10.5.4" arch: "ppc" Family: "unix"
  • Complexity:
    Intermediate

Description

When an attempt is made to override the version of torque-templates used by the maven-torque-plugin as below, maven still tries to use the original version of the torque-templates jar. The overridden jar is ignored.

According to http://jira.codehaus.org/browse/MNG-2972, this behaviour used to be broken in maven v2.0.8 and earlier, and was apparently fixed. This doesn't seem to be the case though.

The configuration looks like this:

<plugin>
  <groupId>org.apache.torque</groupId>
  <artifactId>torque-maven-plugin</artifactId>
  <version>3.3</version>
  <dependencies>
    <dependency>
      <groupId>org.apache.derby</groupId>
      <artifactId>derby</artifactId>
      <version>10.4.1.3</version>
    </dependency>
    <dependency>
      <groupId>org.apache.torque</groupId>
      <artifactId>torque-templates</artifactId>
      <version>3.3.1</version>
    </dependency>
  </dependencies>
</plugin>

The original torque-templates jar is v3.3. The overridden torque-templates jar is v3.3.1.

As the plugin gives no clues as to which version is being used, I deleted the original torque-templates v3.3 release from the local repository. What I expected to see was maven ignoring the v3.3 jar and using the v3.3.1 jar instead, but maven tries to re-download the v3.3 release and use it instead.

maven-torque-plugin depends on torque-gen, which in turn depends on torque-templates. It may be that direct plugin dependencies can be overridden, but transitive plugin dependencies cannot be overridden.

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. XML File
    pom.xml
    26/Mar/10 7:14 AM
    2 kB
    Benjamin Bentmann

Issue Links

is related to

Bug - A problem which impairs or prevents the functions of the product. MNG-2972 Ignores version of plugin dependency specified in my pom

  • Critical - Crashes, loss of data, severe memory leak.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.
relates to

Bug - A problem which impairs or prevents the functions of the product. MNG-2174 <pluginManagement><plugins><plugin><dependencies> do not propogate to child POM plugins (potentially scoped to only affecting child POM plugins that live within a <profile>)

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Graham Leggett added a comment - 23/Aug/08 8:23 AM

Further testing:

If an attempt is made to make a private release of torque-generator, which depends on the private release of torque-templates (which needs to be overridden), and if the maven-torque-plugin is told to override torque-generator, the override works.

From this, it looks like it is possible to override a direct plugin dependency, but it is not possible to override a transitive plugin dependency.

Show
Graham Leggett added a comment - 23/Aug/08 8:23 AM Further testing: If an attempt is made to make a private release of torque-generator, which depends on the private release of torque-templates (which needs to be overridden), and if the maven-torque-plugin is told to override torque-generator, the override works. From this, it looks like it is possible to override a direct plugin dependency, but it is not possible to override a transitive plugin dependency.
Hide
Permalink
Benjamin Bentmann added a comment - 26/Mar/10 7:14 AM

Using Maven 2.0.9 on the attached POM yields the following debug output:

[DEBUG] Plugin dependencies for:

org.apache.torque:torque-maven-plugin:3.3

are:

org.apache.torque:torque-templates:jar:3.3-RC3:compile
org.apache.maven:maven-plugin-api:jar:2.0:runtime
org.apache.maven:maven-artifact:jar:2.0:runtime
org.apache.maven:maven-settings:jar:2.0:runtime
org.apache.maven:maven-plugin-descriptor:jar:2.0:runtime
org.apache.maven:maven-core:jar:2.0:runtime
org.apache.torque:torque-generator:jar:3.3:runtime
org.apache.maven:maven-project:jar:2.0:runtime
org.codehaus.plexus:plexus-utils:jar:1.0.4:runtime
log4j:log4j:jar:1.2.14:runtime
commons-configuration:commons-configuration:jar:1.4:runtime

i.e. the overriden version of torque-templates is used.

More than likely, the issue is another occurrence of MNG-1323.

As a final note, the act of downloading something does not induce it is actually used.

Show
Benjamin Bentmann added a comment - 26/Mar/10 7:14 AM Using Maven 2.0.9 on the attached POM yields the following debug output:
[DEBUG] Plugin dependencies for:

org.apache.torque:torque-maven-plugin:3.3

are:

org.apache.torque:torque-templates:jar:3.3-RC3:compile
org.apache.maven:maven-plugin-api:jar:2.0:runtime
org.apache.maven:maven-artifact:jar:2.0:runtime
org.apache.maven:maven-settings:jar:2.0:runtime
org.apache.maven:maven-plugin-descriptor:jar:2.0:runtime
org.apache.maven:maven-core:jar:2.0:runtime
org.apache.torque:torque-generator:jar:3.3:runtime
org.apache.maven:maven-project:jar:2.0:runtime
org.codehaus.plexus:plexus-utils:jar:1.0.4:runtime
log4j:log4j:jar:1.2.14:runtime
commons-configuration:commons-configuration:jar:1.4:runtime
i.e. the overriden version of torque-templates is used. More than likely, the issue is another occurrence of MNG-1323. As a final note, the act of downloading something does not induce it is actually used.

People

  • Assignee:
    Benjamin Bentmann
    Reporter:
    Graham Leggett
Vote (0)
Watch (0)

Dates

  • Created:
    23/Aug/08 8:11 AM
    Updated:
    26/Mar/10 7:14 AM
    Resolved:
    26/Mar/10 7:14 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.