Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean mdo schemas #1365

Merged
merged 4 commits into from
Feb 7, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 13 additions & 40 deletions api/maven-api-model/src/main/mdo/maven.mdo
Original file line number Diff line number Diff line change
Expand Up @@ -3315,50 +3315,24 @@
/**
* @see java.lang.Object#equals(java.lang.Object)
*/
public boolean equals( Object o )
{
if ( this == o )
{
public boolean equals(Object o) {
if (this == o) {
return true;
}

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

Extension e = (Extension) o;

if ( !equal( e.getArtifactId(), getArtifactId() ) )
{
return false;
}
else if ( !equal( e.getGroupId(), getGroupId() ) )
{
} else if (!(o instanceof Extension)) {
return false;
} else {
Extension e = (Extension) o;
return java.util.Objects.equals(e.getArtifactId(), getArtifactId())
&& java.util.Objects.equals(e.getGroupId(), getGroupId())
&& java.util.Objects.equals(e.getVersion(), getVersion());
}
else if ( !equal( e.getVersion(), getVersion() ) )
{
return false;
}
return true;
}

private static <T> boolean equal( T obj1, T obj2 )
{
return ( obj1 != null ) ? obj1.equals( obj2 ) : obj2 == null;
}

/**
* @see java.lang.Object#hashCode()
*/
public int hashCode()
{
int result = 17;
result = 37 * result + ( getArtifactId() != null ? getArtifactId().hashCode() : 0 );
result = 37 * result + ( getGroupId() != null ? getGroupId().hashCode() : 0 );
result = 37 * result + ( getVersion() != null ? getVersion().hashCode() : 0 );
return result;
public int hashCode() {
return java.util.Objects.hash(getArtifactId(), getGroupId(), getVersion());
}
]]>
</code>
Expand All @@ -3367,7 +3341,7 @@
</class>
<class locationTracker="locations">
<name>InputLocation</name>
<version>4.0.0+</version>
<version>4.0.0/4.0.99</version>
<fields>
<!-- line, column and source fields are auto-generated by Modello -->
</fields>
Expand All @@ -3378,8 +3352,7 @@
<![CDATA[

@Override
public String toString()
{
public String toString() {
return getLineNumber() + " : " + getColumnNumber() + ", " + getSource();
}
]]>
Expand All @@ -3389,7 +3362,7 @@
</class>
<class sourceTracker="source">
<name>InputSource</name>
<version>4.0.0+</version>
<version>4.0.0/4.0.99</version>
<fields>
<field>
<name>modelId</name>
Expand Down
6 changes: 3 additions & 3 deletions api/maven-api-plugin/src/main/mdo/lifecycle.mdo
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,20 @@ under the License.
-->

<model xmlns="http://codehaus-plexus.github.io/MODELLO/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://codehaus-plexus.github.io/MODELLO/2.0.0 http://codehaus-plexus.github.io/modello/xsd/modello-2.0.0.xsd"
xsi:schemaLocation="http://codehaus-plexus.github.io/MODELLO/2.0.0 https://codehaus-plexus.github.io/modello/xsd/modello-2.0.0.xsd"
xml.namespace="http://maven.apache.org/LIFECYCLE/${version}"
xml.schemaLocation="http://maven.apache.org/xsd/lifecycle-${version}.xsd">
<id>lifecycle</id>
<name>Lifecycle</name>
<description><![CDATA[
Configuration of custom lifecycle mappings for the plugin, as generally stored in
<code>META-INF/maven/lifecycle.xml</code> in a plugin's jar artifact.
{@code META-INF/maven/lifecycle.xml} in a plugin's jar artifact.
]]></description>
<classes>
<class rootElement="true" xml.tagName="lifecycles" xsd.compositor="sequence">
<name>LifecycleConfiguration</name>
<version>1.0.0</version>
<description><![CDATA[Root element of the <code>lifecycle.xml</code> file.]]></description>
<description><![CDATA[Root element of the {@code lifecycle.xml} file.]]></description>
gnodet marked this conversation as resolved.
Show resolved Hide resolved
<fields>
<field>
<name>lifecycles</name>
Expand Down
1 change: 1 addition & 0 deletions api/maven-api-settings/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ under the License.
<params>
<param>packageModelV4=org.apache.maven.api.settings</param>
<param>locationTracking=true</param>
<param>generateLocationClasses=true</param>
</params>
</configuration>
</execution>
Expand Down
Loading