You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by ji...@codehaus.org on 2003/10/06 13:53:22 UTC

[jira] Commented: (MAVEN-194) Two dependiencise having the same id but diffrent type should not be assumed as duplicats

The following comment has been added to this issue:

     Author: Martin Lambert
    Created: Mon, 6 Oct 2003 6:52 AM
       Body:
Hi,

I would like to know what the current plan for dealing with this problem is. I'm using 1.0 RC1 which still has this problem. 

I have 2 dependencies with the same groupId and artifactId. One is a POM and the other is a jar.

Below is my current workaround (Added to the Dependency class):

public boolean equals( Object o )
{
  if(super.equals(o))
  {
    if(getType() != null )
    {
      return getType().equals( ( (Dependency) o).getType() );
    }
    else
    {
      return ( (Dependency) o).getType() == null;
    }
  }
  else
  {
    return false;
  }
}
 

Thanks,

Martin.
---------------------------------------------------------------------
View the issue:

  http://jira.codehaus.org/secure/ViewIssue.jspa?key=MAVEN-194


Here is an overview of the issue:
---------------------------------------------------------------------
        Key: MAVEN-194
    Summary: Two dependiencise having the same id but diffrent type should not be assumed as duplicats
       Type: Bug

     Status: Reopened
   Priority: Major

 Time Spent: Unknown
  Remaining: Unknown

    Project: maven
   Fix Fors:
             1.0-final
   Versions:
             1.0-beta-8

   Assignee: Jason van Zyl
   Reporter: Michal Maczka

    Created: Sun, 12 Jan 2003 10:22 AM
    Updated: Mon, 4 Aug 2003 12:56 PM

Description:
Currently in case of following dependincies in POM:

<dependencies>
    <dependency>
      <id>mydep</id>
      <version>1.0.1</version>
      <type>war</type>
    </dependency>
  </dependencies>


  <dependencies>
    <dependency>
      <id>mydep</id>
      <version>1.0.1</version>
       <type>jar</type>
    </dependency>
  </dependencies>

only the first dependency will be availabe in dependency list.

Solution:

Both "id" and "type" should be used in org.apache.maven.project.BaseObject and two dependincies should
be assumed as equal only if
dep1.id == dep2.id
   &&
dep1.type == dep2.type





---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org