You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Dennis Lundberg (JIRA)" <ji...@codehaus.org> on 2008/06/09 19:39:12 UTC

[jira] Created: (MNG-3619) Dependency.equals(Object):boolean is missing for version 4.0.0 POMs

Dependency.equals(Object):boolean is missing for version 4.0.0 POMs
-------------------------------------------------------------------

                 Key: MNG-3619
                 URL: http://jira.codehaus.org/browse/MNG-3619
             Project: Maven 2
          Issue Type: Bug
          Components: POM
    Affects Versions: 2.0.x
            Reporter: Dennis Lundberg


The modello file for the 2.0.x branch does not have a <codeSegment> for 4.0.0 POMs that implements equals(Object):boolean. Modello doesn't generate one automatically either. Perhaps upgrading to a newer version of the modello plugin will solve this.

http://svn.apache.org/viewvc/maven/components/branches/maven-2.0.x/maven-model/src/main/mdo/maven.mdo?revision=659677&view=markup

There is a <codeSegment> for 3.0.0 POMs only:
{code}
    /**
     * @see java.lang.Object#equals(java.lang.Object)
     */
    public boolean equals( Object o )
    {
        if ( this == o )
        {
            return true;
        }

        if ( !( o instanceof Dependency ) )
        {
            return false;
        }

        Dependency d  = (Dependency) o;
        return getId().equals( d.getId() );
    }
{code}

-- 
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
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MNG-3619) Dependency.equals(Object):boolean is missing for version 4.0.0 POMs

Posted by "Herve Boutemy (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3619?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=204839#action_204839 ] 

Herve Boutemy commented on MNG-3619:
------------------------------------

yes, equals() and hashCode() methods were here in 3.0.0 POMs but not in 4.0.0

In 3.0.0, these methods were written by hand with id field.

In 4.0.0, this id field is not here any more. And these methods can be generated by Modello: just specify which fields are part of the identifier (set <identifier>true</identifier> in the field definitions).

Now the question is: what are the fields to mark as identifier? groupId+artifactId+type+classifier or less fields?

> Dependency.equals(Object):boolean is missing for version 4.0.0 POMs
> -------------------------------------------------------------------
>
>                 Key: MNG-3619
>                 URL: http://jira.codehaus.org/browse/MNG-3619
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: POM
>    Affects Versions: 2.2.x
>            Reporter: Dennis Lundberg
>             Fix For: 3.x
>
>
> The modello file for the 2.0.x branch does not have a <codeSegment> for 4.0.0 POMs that implements equals(Object):boolean. Modello doesn't generate one automatically either. Perhaps upgrading to a newer version of the modello plugin will solve this.
> http://svn.apache.org/viewvc/maven/components/branches/maven-2.0.x/maven-model/src/main/mdo/maven.mdo?revision=659677&view=markup
> There is a <codeSegment> for 3.0.0 POMs only:
> {code}
>     /**
>      * @see java.lang.Object#equals(java.lang.Object)
>      */
>     public boolean equals( Object o )
>     {
>         if ( this == o )
>         {
>             return true;
>         }
>         if ( !( o instanceof Dependency ) )
>         {
>             return false;
>         }
>         Dependency d  = (Dependency) o;
>         return getId().equals( d.getId() );
>     }
> {code}

-- 
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
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (MNG-3619) Dependency.equals(Object):boolean is missing for version 4.0.0 POMs

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-3619?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brett Porter updated MNG-3619:
------------------------------

    Fix Version/s: 2.1

> Dependency.equals(Object):boolean is missing for version 4.0.0 POMs
> -------------------------------------------------------------------
>
>                 Key: MNG-3619
>                 URL: http://jira.codehaus.org/browse/MNG-3619
>             Project: Maven 2
>          Issue Type: Bug
>          Components: POM
>    Affects Versions: 2.0.x
>            Reporter: Dennis Lundberg
>             Fix For: 2.1
>
>
> The modello file for the 2.0.x branch does not have a <codeSegment> for 4.0.0 POMs that implements equals(Object):boolean. Modello doesn't generate one automatically either. Perhaps upgrading to a newer version of the modello plugin will solve this.
> http://svn.apache.org/viewvc/maven/components/branches/maven-2.0.x/maven-model/src/main/mdo/maven.mdo?revision=659677&view=markup
> There is a <codeSegment> for 3.0.0 POMs only:
> {code}
>     /**
>      * @see java.lang.Object#equals(java.lang.Object)
>      */
>     public boolean equals( Object o )
>     {
>         if ( this == o )
>         {
>             return true;
>         }
>         if ( !( o instanceof Dependency ) )
>         {
>             return false;
>         }
>         Dependency d  = (Dependency) o;
>         return getId().equals( d.getId() );
>     }
> {code}

-- 
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
-
For more information on JIRA, see: http://www.atlassian.com/software/jira