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 Eclipse Plugin
  • MECLIPSE-150

[with PATCH] Plugin generates invalid Eclipse project files when multiproject contains two references to the same artifact

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 2.2
  • Fix Version/s: 2.6
  • Component/s: Core : Dependencies resolution and build path (.classpath), Core : Multi-projects
  • Labels:
    None

Description

HI

in same circumstances the eclipse-plugin will generate a Eclipse project file which contains two references to the same artifact/project which will cause Eclipse to fail loading the project. The attached patch is very small and solves this problem by managing the references within a java.util.Set and using equals() within the IdeDependency.java class.

Thanks

Kristian

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

Attachments

  1. Text File
    dependency-patch.txt
    22/Aug/06 1:08 AM
    3 kB
    Kristian Köhler

Activity

  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Barrie Treloar added a comment - 17/Sep/08 12:19 AM

IdeDependency is comparable and equals delegates to compare, hashCode() also defined.

AbstractIdeSupportMojo.doDependencyResolution() maintains a list of dependencies and code already guards against duplicates:

// no duplicate entries allowed. System paths can cause this problem.
if ( !dependencies.contains( dep ) )
{
  dependencies.add( dep );
}

This should resolve your problem.

Show
Barrie Treloar added a comment - 17/Sep/08 12:19 AM IdeDependency is comparable and equals delegates to compare, hashCode() also defined. AbstractIdeSupportMojo.doDependencyResolution() maintains a list of dependencies and code already guards against duplicates:
// no duplicate entries allowed. System paths can cause this problem.
if ( !dependencies.contains( dep ) )
{
  dependencies.add( dep );
}
This should resolve your problem.

People

  • Assignee:
    Unassigned
    Reporter:
    Kristian Köhler
Vote (2)
Watch (1)

Dates

  • Created:
    22/Aug/06 1:08 AM
    Updated:
    17/Sep/08 12:19 AM
    Resolved:
    17/Sep/08 12:19 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.