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.x Enforcer Plugin
  • MENFORCER-118

DependencyConvergence gets better if it doesn't fail on snapshots of same baseVersion

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.0.1
  • Fix Version/s: 1.1
  • Component/s: Standard Rules
  • Labels:
    None

Description

The DependencyVersionMap used by DependencyConvergense uses node.getArtifact().getVersion() when comparing versions. This makes the rule fail more often than needed because the version compare doens't ignore the fact that some snapshots may have been resolved to timestamp. If the code was node.getArtifact().getBaseVersion() instead then DependencyConvergense would only fail on real version mismatches.

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

Attachments

  1. Text File
    menforcer-118.patch
    09/Apr/12 10:29 PM
    2 kB
    Raman Gupta

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Erik Godding Boye added a comment - 19/Sep/11 4:26 AM

I think this should be reported as a bug, and not an improvement. Maven 3 enforces timestamped versions, which makes the dependency converge rule almost useless with Maven 3 - because of this bug. The priority could also be lifted....

Show
Erik Godding Boye added a comment - 19/Sep/11 4:26 AM I think this should be reported as a bug, and not an improvement. Maven 3 enforces timestamped versions, which makes the dependency converge rule almost useless with Maven 3 - because of this bug. The priority could also be lifted....
Hide
Permalink
Raman Gupta added a comment - 29/Dec/11 12:12 PM

Agree with Erik, this is a show-stopper for timestamped snapshot use. See my StackOverflow question here for a repeatable test scenario: http://stackoverflow.com/questions/8662129/maven-unique-snapshots-and-dependency-convergence

Show
Raman Gupta added a comment - 29/Dec/11 12:12 PM Agree with Erik, this is a show-stopper for timestamped snapshot use. See my StackOverflow question here for a repeatable test scenario: http://stackoverflow.com/questions/8662129/maven-unique-snapshots-and-dependency-convergence
Hide
Permalink
Stephan Schroevers added a comment - 19/Jan/12 11:33 AM

And another +1. Indeed, this is a show-stopper when using Maven 3.

Show
Stephan Schroevers added a comment - 19/Jan/12 11:33 AM And another +1. Indeed, this is a show-stopper when using Maven 3.
Hide
Permalink
Raman Gupta added a comment - 20/Mar/12 1:25 AM

Is there a particular reason this change isn't being made?

Show
Raman Gupta added a comment - 20/Mar/12 1:25 AM Is there a particular reason this change isn't being made?
Hide
Permalink
Marek Kasztelnik added a comment - 06/Apr/12 2:18 AM

+1

Show
Marek Kasztelnik added a comment - 06/Apr/12 2:18 AM +1
Hide
Permalink
Raman Gupta added a comment - 09/Apr/12 10:00 PM

Of course, the other question is: why does Maven resolve some snapshot dependencies to a timestamped version, and others not? It seems to resolve direct dependencies on "-SNAPSHOT" to a unique timestamped version, but transitive dependencies to a non-unique version. Perhaps that is the real bug that needs to be fixed?

Show
Raman Gupta added a comment - 09/Apr/12 10:00 PM Of course, the other question is: why does Maven resolve some snapshot dependencies to a timestamped version, and others not? It seems to resolve direct dependencies on "-SNAPSHOT" to a unique timestamped version, but transitive dependencies to a non-unique version. Perhaps that is the real bug that needs to be fixed?
Hide
Permalink
Raman Gupta added a comment - 09/Apr/12 10:28 PM

In the meantime, until this is fixed I have forked the Maven enforcer plugin trunk, and applied the change suggested by the OP. The source is available here:

https://github.com/vivosys/maven-enforcer-plugin/tree/menforcer-118

Show
Raman Gupta added a comment - 09/Apr/12 10:28 PM In the meantime, until this is fixed I have forked the Maven enforcer plugin trunk, and applied the change suggested by the OP. The source is available here: https://github.com/vivosys/maven-enforcer-plugin/tree/menforcer-118
Hide
Permalink
Raman Gupta added a comment - 09/Apr/12 10:29 PM

Patch as suggested by OP.

Show
Raman Gupta added a comment - 09/Apr/12 10:29 PM Patch as suggested by OP.
Hide
Permalink
Paul Gier added a comment - 08/May/12 4:12 PM

Fixed in r1335761

Show
Paul Gier added a comment - 08/May/12 4:12 PM Fixed in r1335761

People

  • Assignee:
    Robert Scholte
    Reporter:
    Poul Bildsøe
Vote (8)
Watch (10)

Dates

  • Created:
    05/Jul/11 5:30 AM
    Updated:
    08/May/12 4:12 PM
    Resolved:
    08/May/12 4:12 PM
  • 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.