You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by John Casey <jd...@commonjava.org> on 2009/02/06 19:43:59 UTC
Re: svn commit: r741511 - in /maven/components/branches/maven-2.0.x:
./ apache-maven/ apache-maven/src/test/ maven-integration-tests/ maven-model/src/main/mdo/
maven-model/src/test/ maven-project/src/main/java/org/apache/maven/project/
maven-project/src/te...
Can we implement modello's identity/identifier element in maven.mdo
rather than hand-coding the identity methods?
-john
brett@apache.org wrote:
> Modified: maven/components/branches/maven-2.0.x/maven-model/src/main/mdo/maven.mdo
> URL: http://svn.apache.org/viewvc/maven/components/branches/maven-2.0.x/maven-model/src/main/mdo/maven.mdo?rev=741511&r1=741510&r2=741511&view=diff
> ==============================================================================
> --- maven/components/branches/maven-2.0.x/maven-model/src/main/mdo/maven.mdo (original)
> +++ maven/components/branches/maven-2.0.x/maven-model/src/main/mdo/maven.mdo Fri Feb 6 10:27:17 2009
> @@ -3213,6 +3213,37 @@
> {
> return inheritanceApplied;
> }
> +
> + /**
> + * @see java.lang.Object#equals(java.lang.Object)
> + */
> + public boolean equals( Object other )
> + {
> + if ( other instanceof ReportPlugin )
> + {
> + ReportPlugin otherPlugin = (ReportPlugin) other;
> +
> + return getKey().equals( otherPlugin.getKey() );
> + }
> +
> + return false;
> + }
> +
> + /**
> + * @see java.lang.Object#hashCode()
> + */
> + public int hashCode()
> + {
> + return getKey().hashCode();
> + }
> +
> + /**
> + * @see java.lang.Object#toString()
> + */
> + public String toString()
> + {
> + return "ReportPlugin [" + getKey() + "]";
> + }
> ]]>
> </code>
> </codeSegment>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: svn commit: r741511 - in /maven/components/branches/maven-2.0.x: ./ apache-maven/ apache-maven/src/test/ maven-integration-tests/ maven-model/src/main/mdo/ maven-model/src/test/ maven-project/src/main/java/org/apache/maven/project/ maven-project/src/te...
Posted by Brett Porter <br...@apache.org>.
On 07/02/2009, at 2:43 AM, John Casey wrote:
> Can we implement modello's identity/identifier element in maven.mdo
> rather than hand-coding the identity methods?
getKey() here is a method, since the identifier is a composite
(groupId + ":" + artifactId). I added a test to make sure the current
behaviour is preserved in case modello supports it in the future and
we want to try.
- Brett
--
Brett Porter
brett@apache.org
http://blogs.exist.com/bporter/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org