From 42fcc3b47a2dfed6b6c0b7dff64e0640d0838ed4 Mon Sep 17 00:00:00 2001 From: Guillaume Nodet Date: Tue, 9 Jan 2024 12:47:09 +0100 Subject: [PATCH 1/4] Clean mdo schemas * fix namespace location * remove unneeded CDATA * code formatting * use {@code xxx} * generate location tracking classes * add location tracking to toolchain model --- api/maven-api-model/src/main/mdo/maven.mdo | 53 +-- .../src/main/mdo/lifecycle.mdo | 6 +- api/maven-api-settings/pom.xml | 1 + .../src/main/mdo/settings.mdo | 320 ++++-------------- api/maven-api-toolchain/pom.xml | 2 + .../src/main/mdo/toolchains.mdo | 319 ++++++++--------- maven-settings/pom.xml | 1 + .../mdo/java}/InputLocation.java | 2 +- .../mdo/java}/InputLocationTracker.java | 2 +- .../mdo/java}/InputSource.java | 2 +- src/mdo/model.vm | 10 +- 11 files changed, 243 insertions(+), 475 deletions(-) rename {api/maven-api-settings/src/main/java/org/apache/maven/api/settings => src/mdo/java}/InputLocation.java (99%) rename {api/maven-api-settings/src/main/java/org/apache/maven/api/settings => src/mdo/java}/InputLocationTracker.java (95%) rename {api/maven-api-settings/src/main/java/org/apache/maven/api/settings => src/mdo/java}/InputSource.java (97%) diff --git a/api/maven-api-model/src/main/mdo/maven.mdo b/api/maven-api-model/src/main/mdo/maven.mdo index 3940c0b5e1a..acd7425f551 100644 --- a/api/maven-api-model/src/main/mdo/maven.mdo +++ b/api/maven-api-model/src/main/mdo/maven.mdo @@ -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 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()); } ]]> @@ -3367,7 +3341,7 @@ InputLocation - 4.0.0+ + 4.0.0/4.0.99 @@ -3378,8 +3352,7 @@ @@ -3389,7 +3362,7 @@ InputSource - 4.0.0+ + 4.0.0/4.0.99 modelId diff --git a/api/maven-api-plugin/src/main/mdo/lifecycle.mdo b/api/maven-api-plugin/src/main/mdo/lifecycle.mdo index db51be62cd5..b27ba4f1c5f 100644 --- a/api/maven-api-plugin/src/main/mdo/lifecycle.mdo +++ b/api/maven-api-plugin/src/main/mdo/lifecycle.mdo @@ -18,20 +18,20 @@ under the License. --> lifecycle Lifecycle META-INF/maven/lifecycle.xml in a plugin's jar artifact. + {@code META-INF/maven/lifecycle.xml} in a plugin's jar artifact. ]]> LifecycleConfiguration 1.0.0 - lifecycle.xml file.]]> + lifecycles diff --git a/api/maven-api-settings/pom.xml b/api/maven-api-settings/pom.xml index 714d76862ff..e9b76350e00 100644 --- a/api/maven-api-settings/pom.xml +++ b/api/maven-api-settings/pom.xml @@ -61,6 +61,7 @@ under the License. packageModelV4=org.apache.maven.api.settings locationTracking=true + generateLocationClasses=true diff --git a/api/maven-api-settings/src/main/mdo/settings.mdo b/api/maven-api-settings/src/main/mdo/settings.mdo index d3ad60eba2f..e29d2ddab23 100644 --- a/api/maven-api-settings/src/main/mdo/settings.mdo +++ b/api/maven-api-settings/src/main/mdo/settings.mdo @@ -19,8 +19,8 @@ under the License. --> - settings @@ -30,7 +30,7 @@

This is a reference for the user-specific configuration for Maven.

Includes things that should not be distributed with the pom.xml file, such as developer identity, along with local settings, like proxy information.

-

The default location for the settings file is ~/.m2/settings.xml

+

The default location for the settings file is {@code ~/.m2/settings.xml}.

]]> @@ -49,9 +49,8 @@ - 1.0.0+ + 1.0.0/1.3.0 - @@ -90,9 +81,8 @@ TrackableBase 1.0.0+ - Mirror, Profile, Proxy and Server. - ]]> + Base class for {@code Mirror}, {@code Profile}, {@code Proxy} and {@code Server}. + id @@ -117,7 +107,7 @@ true Default value is: ${user.home}/.m2/repository + The local repository.
Default value is: {@code ${user.home}/.m2/repository} ]]>
String @@ -126,9 +116,7 @@ interactiveMode 1.0.0+ - boolean true @@ -137,60 +125,30 @@ usePluginRegistry 1.0.0+ - boolean false
- - offline 1.0.0+ false - boolean false - - proxies 1.0.0+ - Proxy @@ -201,11 +159,9 @@ servers 1.0.0+ - Server @@ -227,9 +183,7 @@ repositories 1.3.0+ - Repository @@ -240,30 +194,24 @@ pluginRepositories 1.3.0+ - Repository * - profiles 1.0.0+ - Profile @@ -274,10 +222,8 @@ activeProfiles 1.0.0+ - String @@ -302,115 +248,87 @@ 1.0.0/1.3.0 activeProxy field to null + * Reset the {@code activeProxy} field to {@code null}. */ - public void flushActiveProxy() - { + public void flushActiveProxy() { this.activeProxy = null; } /** * @return the first active proxy */ - public synchronized Proxy getActiveProxy() - { - if ( activeProxy == null ) - { + public synchronized Proxy getActiveProxy() { + if (activeProxy == null) { java.util.List proxies = getProxies(); - if ( proxies != null && !proxies.isEmpty() ) - { - for ( Proxy proxy : proxies ) - { - if ( proxy.isActive() ) - { + if (proxies != null && !proxies.isEmpty()) { + for (Proxy proxy : proxies) { + if (proxy.isActive()) { activeProxy = proxy; break; } } } } - return activeProxy; } - public Server getServer( String serverId ) - { + public Server getServer(String serverId) { Server match = null; - java.util.List servers = getServers(); - if ( servers != null && serverId != null ) - { - for ( Server server : servers ) - { - if ( serverId.equals( server.getId() ) ) - { + if (servers != null && serverId != null) { + for (Server server : servers) { + if (serverId.equals(server.getId())) { match = server; break; } } } - return match; } @Deprecated - public Mirror getMirrorOf( String repositoryId ) - { + public Mirror getMirrorOf(String repositoryId) { Mirror match = null; - java.util.List mirrors = getMirrors(); - if ( mirrors != null && repositoryId != null ) - { - for ( Mirror mirror : mirrors ) - { - if ( repositoryId.equals( mirror.getMirrorOf() ) ) - { + if (mirrors != null && repositoryId != null) { + for (Mirror mirror : mirrors) { + if (repositoryId.equals(mirror.getMirrorOf())) { match = mirror; break; } } } - return match; } private java.util.Map profileMap; /** - * Reset the profileMap field to null + * Reset the {@code profileMap} field to {@code null} */ - public void flushProfileMap() - { + public void flushProfileMap() { this.profileMap = null; } /** - * @return a Map of profiles field with Profile#getId() as key - * @see Profile#getId() + * @return a Map of profiles field keyed by {@link Profile#getId()} */ - public java.util.Map getProfilesAsMap() - { - if ( profileMap == null ) - { + public java.util.Map getProfilesAsMap() { + if (profileMap == null) { profileMap = new java.util.LinkedHashMap(); - - if ( getProfiles() != null ) - { - for ( Profile profile : getProfiles() ) - { - profileMap.put( profile.getId(), profile ); + if (getProfiles() != null) { + for (Profile profile : getProfiles()) { + profileMap.put(profile.getId(), profile); } } } - return profileMap; } ]]> @@ -418,46 +336,13 @@
- - - Proxy 1.0.0+ IdentifiableBase - <proxy> element contains informations required to a proxy settings. - ]]> + The {@code <proxy>} element contains information required to a proxy settings. + activeString @@ -475,9 +360,7 @@ protocol 1.0.0+ - String http @@ -486,9 +369,7 @@ username 1.0.0+ - String @@ -496,9 +377,7 @@ password 1.0.0+ - String
@@ -517,9 +396,7 @@ host 1.0.0+ - String true @@ -528,9 +405,7 @@ nonProxyHosts 1.0.0+ - String @@ -592,17 +467,14 @@ 1.0.0+ IdentifiableBase - <server> element contains informations required to a server settings. - ]]> + The {@code <server>} element contains information required to a server settings. + username 1.0.0+ - String @@ -610,9 +482,7 @@ password 1.0.0+ - String @@ -620,9 +490,7 @@ privateKey 1.0.0+ - String @@ -630,9 +498,7 @@ passphrase 1.0.0+ - String @@ -640,9 +506,7 @@ filePermissions 1.0.0+ - String @@ -650,9 +514,7 @@ directoryPermissions 1.0.0+ - String @@ -660,9 +522,7 @@ configuration DOM - @@ -734,19 +594,17 @@ @@ -760,20 +618,14 @@ 1.0.0+ IdentifiableBase - + Modifications to the build process which is keyed on some sort of environmental parameter. activation 1.0.0+ - + The conditional logic which will automatically trigger the inclusion of this profile. Activation @@ -782,11 +634,8 @@ properties - <property.name>property.value</property.name> - ]]> + Contents take the form of {@code <property.name>property.value</property.name>} Properties @@ -798,9 +647,7 @@ repositories 1.0.0+ - Repository @@ -811,20 +658,16 @@ pluginRepositories 1.0.0+ - Repository * -
@@ -833,10 +676,8 @@ Activation 1.0.0+ - @@ -852,18 +693,14 @@ 1.0.0+ String - os 1.0.0+ - ActivationOS @@ -873,9 +710,7 @@ property 1.0.0+ - ActivationProperty @@ -885,9 +720,7 @@ file 1.0.0+ - ActivationFile @@ -902,19 +735,15 @@ 1.0.0+ IdentifiableBase - name 1.0.0+ - String @@ -922,9 +751,7 @@ url 1.0.0+ - String @@ -947,13 +774,11 @@ /** * @see java.lang.Object#equals(java.lang.Object) */ - public boolean equals( Object obj ) - { - RepositoryBase other = (RepositoryBase) obj; + public boolean equals(Object obj) { + RepositoryBase other = (RepositoryBase) obj; boolean retValue = false; - if ( this.getId() != null ) - { - retValue = this.getId().equals( other.getId() ); + if (this.getId() != null) { + retValue = this.getId().equals(other.getId()); } return retValue; } @@ -1002,9 +827,8 @@ /** * @see RepositoryBase#equals(java.lang.Object) */ - public boolean equals( Object obj ) - { - return super.equals( obj ); + public boolean equals(Object obj) { + return super.equals(obj); } ]]> @@ -1053,11 +877,9 @@ ActivationProperty 1.0.0+ - @@ -1083,10 +905,8 @@ ActivationOS 1.0.0+ - @@ -1102,8 +922,7 @@ 1.0.0+ String - The general family of the OS to be used to activate a - profile (e.g. 'windows') + The general family of the OS to be used to activate a profile (e.g. 'windows') @@ -1128,11 +947,9 @@ ActivationFile 1.0.0+ - @@ -1140,8 +957,7 @@ 1.0.0+ String - The name of the file that should be missing to activate a - profile. + The name of the file that should be missing to activate a profile. @@ -1165,13 +981,11 @@ 2.0.0+ - @@ -1185,9 +999,7 @@ 2.0.0+ String - @@ -1195,12 +1007,10 @@ 2.0.0+ - diff --git a/api/maven-api-toolchain/pom.xml b/api/maven-api-toolchain/pom.xml index 3320c86ec5a..ead5173ecf6 100644 --- a/api/maven-api-toolchain/pom.xml +++ b/api/maven-api-toolchain/pom.xml @@ -59,6 +59,8 @@ under the License. packageModelV4=org.apache.maven.api.toolchain + locationTracking=true + generateLocationClasses=true diff --git a/api/maven-api-toolchain/src/main/mdo/toolchains.mdo b/api/maven-api-toolchain/src/main/mdo/toolchains.mdo index 322d7501f25..902f67527ba 100644 --- a/api/maven-api-toolchain/src/main/mdo/toolchains.mdo +++ b/api/maven-api-toolchain/src/main/mdo/toolchains.mdo @@ -19,213 +19,186 @@ under the License. --> - - toolchains - MavenToolchains - This is a reference for the Maven Toolchains descriptor.

-

The default location for the toolchains file is ~/.m2/toolchains.xml

-

A Toolchain is a preconfigured object that Maven plugins can use for tool configuration retrieval (location and other information).

+ toolchains + MavenToolchains + The default location for the toolchains file is {@code ~/.m2/toolchains.xml} +

A Toolchain is a preconfigured object that Maven plugins can use for tool configuration retrieval (location and other information).

The toolchains-plugin can read available toolchains on the user's computer - and match them against the toolchain requirements of the project (as configured in pom.xml): + and match them against the toolchain requirements of the project (as configured in {@code pom.xml}): if match is found, the toolchain instance is made available to other Maven plugins.

-

With jdk toolchain, for example, instead of being stuck with the JDK used to run Maven, all plugins can use - the same other JDK instance without hardcoding absolute paths into the pom.xml +

With {@code jdk} toolchain, for example, instead of being stuck with the JDK used to run Maven, all plugins can use + the same other JDK instance without hardcoding absolute paths into the {@code pom.xml} and without configuring every plugin that require path to JDK tools.

See the Guide to Using Toolchains for more information.

]]>
- - - package - org.apache.maven.toolchain.model - - + + + package + org.apache.maven.toolchain.model + + - + - TrackableBase - 1.1.0+ - - common base class that contains code to track the source for - this instance (USER|GLOBAL) - - - - 1.1.0+ - - TrackableBase + 1.1.0+ + + Common base class that contains code to track the source for this instance (USER|GLOBAL) + + + + 1.1.0/1.1.0 + + - - - - - - PersistedToolchains - TrackableBase - <toolchains> element is the root of the descriptor. - The following table lists all of the possible child elements. - ]]>
- 1.0.0+ - - - toolchains - 1.0.0+ - - - ToolchainModel - * - - - -
- - ToolchainModel - TrackableBase - 1.0.0+ - Definition of a toolchain instance. - - - type - 1.0.0+ - - - -
  • jdk for - JDK Standard Toolchain,
  • -
  • other value for - Custom Toolchain
  • - - ]]>
    - String -
    - - provides - 1.0.0/1.0.99 - DOM - - Toolchain identification information, which will be matched against project requirements.

    -

    Actual content structure is completely open: each toolchain type will define its own format and semantics.

    -

    In general, this is a properties format: <name>value</name> with - predefined properties names.

    - ]]>
    -
    - - provides - 1.1.0+ - Properties - - String - * - - - - Toolchain identification information, which will be matched against project requirements.

    -

    For Maven 2.0.9 to 3.2.3, the actual content structure was completely open: each toolchain type would define its own format and semantics. - In general, this was a properties format.

    -

    Since Maven 3.2.4, the type for this field has been changed to Properties to match the de-facto format.

    -

    Each toolchain defines its own properties names and semantics.

    - ]]>
    -
    - - configuration - 1.0.0+ - DOM - - Toolchain configuration information, like location or any information that is to be retrieved.

    -

    Actual content structure is completely open: each toolchain type will define its own format and semantics.

    -

    In general, this is a properties format: <name>value</name> with - per-toolchain defined properties names.

    - ]]>
    -
    -
    - - - 1.2.0+ - Generated hashCode() and equals() based on identifier also calls its super, which breaks comparison - - + + +
    + + PersistedToolchains + TrackableBase + + The {@code <toolchains>} element is the root of the descriptor. + The following table lists all the possible child elements. + + 1.0.0+ + + + toolchains + 1.0.0+ + The toolchain instance definition. + + ToolchainModel + * + + + + + + ToolchainModel + TrackableBase + 1.0.0+ + Definition of a toolchain instance. + + + type + 1.0.0+ + + + Type of toolchain:<ul> + <li>{@code jdk} for <a + href="https://maven.apache.org/plugins/maven-toolchains-plugin/toolchains/jdk.html">JDK Standard Toolchain</a>,</li> + <li>other value for <a + href="https://maven.apache.org/plugins/maven-toolchains-plugin/toolchains/custom.html">Custom Toolchain</a></li> + </ul> + + String + + + provides + 1.0.0/1.0.99 + DOM + + Toolchain identification information, which will be matched against project requirements. + <p>Actual content structure is completely open: each toolchain type will define its own format and + semantics. + <p>This is generally a properties format: {@code <name>value</name>} with predefined + properties names. + + + + provides + 1.1.0+ + Properties + + String + * + + + + Toolchain identification information, which will be matched against project requirements. + <p>For Maven 2.0.9 to 3.2.3, the actual content structure was completely open: each toolchain type would + define its own format and semantics. This was generally a properties format. + <p>Since Maven 3.2.4, the type for this field has been changed to Properties to match the de-facto + format. + <p>Each toolchain defines its own properties names and semantics. + + + + configuration + 1.0.0+ + DOM + + Toolchain configuration information, like location or any information that is to be retrieved. + <p>Actual content structure is completely open: each toolchain type will define its own format and + semantics. + <p>In general, this is a properties format: {@code <name>value</name>} with per-toolchain + defined properties names. + + + + + + 1.2.0+ + Generated hashCode() and equals() based on identifier also calls its super, which breaks comparison + + + - - - - - + + + + + diff --git a/maven-settings/pom.xml b/maven-settings/pom.xml index b4fe691a899..61b977ce9e7 100644 --- a/maven-settings/pom.xml +++ b/maven-settings/pom.xml @@ -81,6 +81,7 @@ under the License. locationTracking=true + generateLocationClasses=true diff --git a/api/maven-api-settings/src/main/java/org/apache/maven/api/settings/InputLocation.java b/src/mdo/java/InputLocation.java similarity index 99% rename from api/maven-api-settings/src/main/java/org/apache/maven/api/settings/InputLocation.java rename to src/mdo/java/InputLocation.java index b3ea387142b..2685b813bac 100644 --- a/api/maven-api-settings/src/main/java/org/apache/maven/api/settings/InputLocation.java +++ b/src/mdo/java/InputLocation.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.maven.api.settings; +package ${package}; import java.io.Serializable; import java.util.Collection; diff --git a/api/maven-api-settings/src/main/java/org/apache/maven/api/settings/InputLocationTracker.java b/src/mdo/java/InputLocationTracker.java similarity index 95% rename from api/maven-api-settings/src/main/java/org/apache/maven/api/settings/InputLocationTracker.java rename to src/mdo/java/InputLocationTracker.java index d49d7230766..9d28ad2494b 100644 --- a/api/maven-api-settings/src/main/java/org/apache/maven/api/settings/InputLocationTracker.java +++ b/src/mdo/java/InputLocationTracker.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.maven.api.settings; +package ${package}; public interface InputLocationTracker { InputLocation getLocation(Object field); diff --git a/api/maven-api-settings/src/main/java/org/apache/maven/api/settings/InputSource.java b/src/mdo/java/InputSource.java similarity index 97% rename from api/maven-api-settings/src/main/java/org/apache/maven/api/settings/InputSource.java rename to src/mdo/java/InputSource.java index 2450c1d7986..aeb405f9760 100644 --- a/api/maven-api-settings/src/main/java/org/apache/maven/api/settings/InputSource.java +++ b/src/mdo/java/InputSource.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.maven.api.settings; +package ${package}; import java.io.Serializable; diff --git a/src/mdo/model.vm b/src/mdo/model.vm index 9f790bd583a..be741434ac5 100644 --- a/src/mdo/model.vm +++ b/src/mdo/model.vm @@ -31,10 +31,18 @@ #set ( $dummy = $allFields.addAll( $cl.getFields($version) ) ) #end #set ( $className = "${class.name}" ) + #if ( $locationTracking && $generateLocationClasses ) +#MODELLO-VELOCITY#SAVE-OUTPUT-TO ${package.replace('.','/')}/InputLocation.java + #parse ( "java/InputLocation.java" ) +#MODELLO-VELOCITY#SAVE-OUTPUT-TO ${package.replace('.','/')}/InputLocationTracker.java + #parse ( "java/InputLocationTracker.java" ) +#MODELLO-VELOCITY#SAVE-OUTPUT-TO ${package.replace('.','/')}/InputSource.java + #parse ( "java/InputSource.java" ) + #end #MODELLO-VELOCITY#SAVE-OUTPUT-TO ${package.replace('.','/')}/ImmutableCollections.java #parse ( "java/ImmutableCollections.java" ) -#MODELLO-VELOCITY#SAVE-OUTPUT-TO ${package.replace('.','/')}/${className}.java #if ( $class.name != "InputLocation" && $class.name != "InputSource" ) +#MODELLO-VELOCITY#SAVE-OUTPUT-TO ${package.replace('.','/')}/${className}.java #set ( $types = { } ) #set ( $imports = $class.getClass().forName("java.util.TreeSet").newInstance() ) #set ( $dummy = $imports.add( "java.io.Serializable" ) ) From de4789c648065af061e8573a8c07730c20219019 Mon Sep 17 00:00:00 2001 From: Guillaume Nodet Date: Tue, 9 Jan 2024 18:20:25 +0100 Subject: [PATCH 2/4] Another set of fixes --- api/maven-api-model/src/main/mdo/maven.mdo | 525 ++++++------------ .../src/main/mdo/lifecycle.mdo | 10 +- api/maven-api-plugin/src/main/mdo/plugin.mdo | 69 ++- .../src/main/mdo/settings.mdo | 6 +- .../src/main/mdo/remote-resources.mdo | 12 +- .../src/main/mdo/metadata.mdo | 2 +- 6 files changed, 218 insertions(+), 406 deletions(-) diff --git a/api/maven-api-model/src/main/mdo/maven.mdo b/api/maven-api-model/src/main/mdo/maven.mdo index acd7425f551..a0e9c8ab95d 100644 --- a/api/maven-api-model/src/main/mdo/maven.mdo +++ b/api/maven-api-model/src/main/mdo/maven.mdo @@ -71,10 +71,8 @@ Model ModelBase - } element is the root of the descriptor. + The {@code <project>} element is the root of the descriptor. The following table lists all of the possible child elements. - ]]> 3.0.0+ @@ -123,11 +121,9 @@ 3.0.0+ true - String @@ -152,15 +148,13 @@ packaging 4.0.0+ - String jar @@ -181,10 +175,10 @@ description 3.0.0+ A detailed description of the project, used by Maven whenever it needs to - describe the project, such as on the web site. While this element can be specified as + describe the project, such as on the website. While this element can be specified as CDATA to enable the use of HTML tags within the description, it is discouraged to allow - plain text representation. If you need to modify the index page of the generated web - site, you are able to specify your own instead of adjusting this text. + plain text representation. If you need to modify the index page of the generated website, + you are able to specify your own instead of adjusting this text. String @@ -193,8 +187,8 @@ Default value is: parent value [+ path adjustment] + (artifactId or project.directory property), or just parent value if - project's {@code child.project.url.inherit.append.path="false"} +

    Default value is: parent value [+ path adjustment] + (artifactId or project.directory property), or just parent value if + project's {@code child.project.url.inherit.append.path="false"}

    ]]>
    String @@ -207,8 +201,8 @@ When children inherit from project's url, append path or not? Note: While the type of this field is {@code String} for technical reasons, the semantic type is actually {@code Boolean} -
    Default value is: {@code true} -
    Since: Maven 3.6.1 +

    Default value is: {@code true}

    + @since Maven 3.6.1 ]]> String @@ -217,11 +211,10 @@ root 4.1.0+ - Since: Maven 4.0.0 - ]]> + + @since Maven 4.0.0 boolean false @@ -230,11 +223,9 @@ preserveModelVersion 4.1.0+ - Since: Maven 4.0.0 - ]]> + @since Maven 4.0.0 boolean false @@ -263,7 +254,7 @@ 3.0.0+ @@ -470,9 +453,8 @@ * @return The base directory for the corresponding project or {@code null} if this model does not belong to a local * project (e.g. describes the metadata of some artifact from the repository). */ - public Path getProjectDirectory() - { - return ( pomFile != null ) ? pomFile.getParent() : null; + public Path getProjectDirectory() { + return (pomFile != null) ? pomFile.getParent() : null; } /** @@ -513,9 +495,7 @@ ModelBase 3.0.0+ - @@ -543,11 +523,9 @@ properties 4.0.0+ - value}. - ]]> + The format is {@code <name>value</name>}. Properties @@ -572,15 +550,12 @@ dependencies 3.0.0+ - the - dependency mechanism for more information. - ]]> + See <a href="https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html">the + dependency mechanism</a> for more information. Dependency @@ -611,9 +586,7 @@ reports 4.0.0 - Deprecated. Now ignored by Maven. - ]]> + @deprecated Now ignored by Maven. DOM @@ -621,12 +594,10 @@ reporting 4.0.0+ - + All the reports will be included in the navigation bar for browsing. Reporting @@ -783,11 +754,11 @@ resources 3.0.0+ - + This element describes all the classpath resources such as properties files associated with a project. These resources are often included in the final package. - The default value is {@code src/main/resources}.]]> + The default value is {@code src/main/resources}. Resource @@ -797,10 +768,10 @@ testResources 4.0.0+ - + This element describes all the classpath resources such as properties files associated with a project's unit tests. - The default value is {@code src/test/resources}.]]> + The default value is {@code src/test/resources}. Resource @@ -810,9 +781,9 @@ directory 4.0.0+ - The directory where all files generated by the build are placed. - The default value is {@code target}.]]> + The default value is {@code target}. String @@ -820,11 +791,9 @@ finalName 4.0.0+ - String @@ -860,21 +829,19 @@ 3.0.0+ BuildBase - } element contains informations required to build the project. + The {@code <build>} element contains information required to build the project. Default values are defined in Super POM. - ]]> sourceDirectory 3.0.0+ true - This element specifies a directory containing the source of the project. The generated build system will compile the sources from this directory when the project is built. The path given is relative to the project descriptor. - The default value is {@code src/main/java}.]]> + The default value is {@code src/main/java}. String @@ -882,12 +849,12 @@ scriptSourceDirectory 4.0.0+ true - This element specifies a directory containing the script sources of the project. This directory is meant to be different from the sourceDirectory, in that its contents will be copied to the output directory in most cases (since scripts are interpreted rather than compiled). - The default value is {@code src/main/scripts}.]]> + The default value is {@code src/main/scripts}. String @@ -895,29 +862,29 @@ testSourceDirectory 4.0.0+ true - This element specifies a directory containing the unit test source of the project. The generated build system will compile these directories when the project is being tested. The path given is relative to the project descriptor. - The default value is {@code src/test/java}.]]> + The default value is {@code src/test/java}. String
    outputDirectory 4.0.0+ - The directory where compiled application classes are placed. - The default value is {@code target/classes}.]]> + The default value is {@code target/classes}. String testOutputDirectory 4.0.0+ - The directory where compiled test classes are placed. - The default value is {@code target/test-classes}.]]> + The default value is {@code target/test-classes}. String @@ -953,7 +920,7 @@ 4.0.0+ } element contains informations required to the + The {@code } element contains information required to the continuous integration system of the project. ]]> @@ -962,17 +929,16 @@ system 4.0.0+ - String url 4.0.0+ - URL for the continuous integration system used by the project if it has a web - interface. + + URL for the continuous integration system used by the project if it has a web interface. + String @@ -1033,9 +999,7 @@ 4.0.0+ String - Deprecated. Where to send the notification to - eg email address. - ]]> + @deprecated Where to send the notification to - eg email address. @@ -1092,11 +1056,9 @@ roles 3.0.0+ - String @@ -1170,10 +1132,8 @@ 3.0.0+ true - String @@ -1181,10 +1141,8 @@ version 3.0.0+ - String @@ -1271,13 +1229,11 @@ optional 4.0.0+ - String @@ -1287,9 +1243,8 @@ 4.0.0+ @@ -1299,9 +1254,8 @@ 4.0.0/4.0.99 @@ -1314,8 +1268,7 @@ /** * @see java.lang.Object#toString() */ - public String toString() - { + public String toString() { return "Dependency {groupId=" + getGroupId() + ", artifactId=" + getArtifactId() + ", version=" + getVersion() + ", type=" + getType() + "}"; } ]]> @@ -1330,11 +1283,9 @@ /** * @return the management key as {@code groupId:artifactId:type} */ - public String getManagementKey() - { - if ( managementKey == null ) - { - managementKey = getGroupId() + ":" + getArtifactId() + ":" + getType() + ( getClassifier() != null ? ":" + getClassifier() : "" ); + public String getManagementKey() { + if (managementKey == null) { + managementKey = getGroupId() + ":" + getArtifactId() + ":" + getType() + (getClassifier() != null ? ":" + getClassifier() : ""); } return managementKey; } @@ -1364,8 +1315,7 @@ /** * @see java.lang.Object#toString() */ - public String toString() - { + public String toString() { return "Developer {id=" + getId() + ", " + super.toString() + "}"; } ]]> @@ -1378,7 +1328,7 @@ 4.0.0+ } element contains informations required to exclude + The {@code } element contains information required to exclude an artifact to the project.

    The {@code groupId} and {@code artifactId} fields are interpreted as glob patterns, @@ -1457,10 +1407,8 @@ snapshotRepository 4.0.0+ - DeploymentRepository @@ -1478,20 +1426,20 @@ downloadUrl 4.0.0+ - String relocation 4.0.0+ - Relocation information of the artifact if it has been moved to a new group ID - and/or artifact ID. + + Relocation information of the artifact if it has been moved to a new group ID + and/or artifact ID. + Relocation @@ -1500,15 +1448,13 @@ status 4.0.0+ - false String @@ -1518,7 +1464,7 @@ License Describes the licenses for this project. This is used to generate the license - page of the project's web site, as well as being taken into consideration in other reporting + page of the project's website, as well as being taken into consideration in other reporting and validation. The licenses listed for the project are that of the project itself, and not of dependencies. 3.0.0+ @@ -1585,9 +1531,7 @@ name 3.0.0+ - String @@ -1595,12 +1539,10 @@ subscribe 3.0.0+ - String @@ -1608,12 +1550,10 @@ unsubscribe 3.0.0+ - String @@ -1621,12 +1561,10 @@ post 3.0.0+ - String @@ -1710,9 +1648,7 @@ includes 3.0.0+ - + A list of patterns to include, e.g. {@code **&#47;*.xml}. String @@ -1723,9 +1659,7 @@ excludes 3.0.0+ - + A list of patterns to exclude, e.g. {@code **&#47;*.xml} String @@ -1741,28 +1675,10 @@ /** * @see java.lang.Object#toString() */ - public String toString() - { - StringBuilder sb = new StringBuilder( 128 ); - - sb.append("PatternSet [includes: {"); - for (java.util.Iterator i = getIncludes().iterator(); i.hasNext(); ) - { - String str = (String) i.next(); - sb.append(str).append(", "); - } - if (sb.substring(sb.length() - 2).equals(", ")) sb.delete(sb.length() - 2, sb.length()); - - sb.append("}, excludes: {"); - for (java.util.Iterator i = getExcludes().iterator(); i.hasNext(); ) - { - String str = (String) i.next(); - sb.append(str).append(", "); - } - if (sb.substring(sb.length() - 2).equals(", ")) sb.delete(sb.length() - 2, sb.length()); - - sb.append("}]"); - return sb.toString(); + public String toString() { + return "PatternSet [" + + "includes: {" + getIncludes().stream().collect(java.util.stream.Collectors.joining(", ")) + "}, " + + "excludes: {" + getExcludes().stream().collect(java.util.stream.Collectors.joining(", ")) + "}]"; } ]]> @@ -1776,7 +1692,7 @@ } element contains information required to locate the parent project from which this project will inherit from. - Note: The children of this element are not interpolated and must be given as literal values. +

    Note: The children of this element are not interpolated and must be given as literal values.

    ]]> @@ -1804,19 +1720,17 @@ relativePath 4.0.0+ - String .. @@ -1830,24 +1744,12 @@ /** * @return the id as {@code groupId:artifactId:version} */ - public String getId() - { - StringBuilder id = new StringBuilder( 64 ); - - id.append( getGroupId() ); - id.append( ":" ); - id.append( getArtifactId() ); - id.append( ":" ); - id.append( "pom" ); - id.append( ":" ); - id.append( getVersion() ); - - return id.toString(); + public String getId() { + return getGroupId() + ":" + getArtifactId() + ":pom:" + getVersion(); } @Override - public String toString() - { + public String toString() { return getId(); } ]]> @@ -1860,10 +1762,8 @@ Scm 4.0.0+ - } element contains informations required to the SCM + The {@code <scm>} element contains informations required to the SCM (Source Control Management) of the project. - ]]> @@ -1890,8 +1790,8 @@ Default value is: parent value [+ path adjustment] + (artifactId or project.directory property), or just parent value if - scm's {@code child.scm.developerConnection.inherit.append.path="false"} +

    Default value is: parent value [+ path adjustment] + (artifactId or project.directory property), or just parent value if + scm's {@code child.scm.developerConnection.inherit.append.path="false"}.

    ]]> String @@ -1909,8 +1809,8 @@ Default value is: parent value [+ path adjustment] + (artifactId or project.directory property), or just parent value if - scm's {@code child.scm.url.inherit.append.path="false"} +

    Default value is: parent value [+ path adjustment] + (artifactId or project.directory property), or just parent value if + scm's {@code child.scm.url.inherit.append.path="false"}

    ]]>
    String @@ -1923,8 +1823,8 @@ When children inherit from scm connection, append path or not? Note: While the type of this field is {@code String} for technical reasons, the semantic type is actually {@code Boolean} -
    Default value is: {@code true} -
    Since: Maven 3.6.1 +

    Default value is: {@code true}

    + @since Maven 3.6.1 ]]> String @@ -1937,8 +1837,8 @@ When children inherit from scm developer connection, append path or not? Note: While the type of this field is {@code String} for technical reasons, the semantic type is actually {@code Boolean} -
    Default value is: {@code true} -
    Since: Maven 3.6.1 +

    Default value is: {@code true}

    + @since Maven 3.6.1 ]]> String @@ -1952,7 +1852,7 @@ of this field is {@code String} for technical reasons, the semantic type is actually {@code Boolean}
    Default value is: {@code true} -
    Since: Maven 3.6.1 + @since Maven 3.6.1 ]]> String @@ -1964,19 +1864,16 @@ @@ -1989,8 +1886,7 @@ /** * @see java.lang.Object#toString() */ - public String toString() - { + public String toString() { return "Scm {connection=" + getConnection() + "}"; } ]]> @@ -2020,8 +1916,7 @@ /** * @see java.lang.Object#toString() */ - public String toString() - { + public String toString() { return "FileSet {directory: " + getDirectory() + ", " + super.toString() + "}"; } ]]> @@ -2040,7 +1935,6 @@ targetPath 3.0.0+ - String
    @@ -2056,13 +1949,11 @@ filtering 3.0.0+ - String @@ -2070,13 +1961,11 @@ mergeId 4.0.0+ - String @@ -2086,9 +1975,8 @@ 4.0.0+ @@ -2097,9 +1985,8 @@ 4.0.0/4.0.99 @@ -2111,8 +1998,7 @@ /** * @see java.lang.Object#toString() */ - public String toString() - { + public String toString() { return "Resource {targetPath: " + getTargetPath() + ", filtering: " + isFiltering() + ", " + super.toString() + "}"; } ]]> @@ -2132,11 +2018,9 @@ true true - String @@ -2151,9 +2035,7 @@ 4.0.0+ true - String @@ -2161,10 +2043,8 @@ layout 4.0.0+ - String default @@ -2225,11 +2105,9 @@ enabled 4.0.0+ - String @@ -2237,16 +2115,11 @@ updatePolicy 4.0.0+ - + {@code always}, + {@code daily} (default), + {@code interval:XXX} (in minutes) or + {@code never} (only if it doesn't exist locally). String @@ -2254,14 +2127,10 @@ checksumPolicy 4.0.0+ - + {@code fail} (default for Maven 4 and above) or + {@code warn} (default for Maven 2 and 3). String @@ -2271,9 +2140,8 @@ 4.0.0+ @@ -2283,9 +2151,8 @@ 4.0.0/4.0.99 @@ -2304,10 +2171,8 @@ id 4.0.0+ - String @@ -2323,8 +2188,8 @@ Default value is: parent value [+ path adjustment] + (artifactId or project.directory property), or just parent value if - site's {@code child.site.url.inherit.append.path="false"} +

    Default value is: parent value [+ path adjustment] + (artifactId or project.directory property), or just parent value if + site's {@code child.site.url.inherit.append.path="false"}.

    ]]>
    String @@ -2337,8 +2202,8 @@ When children inherit from distribution management site url, append path or not? Note: While the type of this field is {@code String} for technical reasons, the semantic type is actually {@code Boolean} -
    Default value is: {@code true} -
    Since: Maven 3.6.1 +

    Default value is: {@code true}

    + @since Maven 3.6.1 ]]> String @@ -2350,9 +2215,8 @@ @@ -2370,11 +2234,9 @@ inherited 4.0.0+ - String @@ -2404,8 +2266,7 @@ 4.0.0+ 4.0.0+ ConfigurationContainer - } element contains informations required for a plugin. - ]]> + The {@code <plugin>} element contains informations required for a plugin. @@ -2449,12 +2308,10 @@ 4.0.0+ String - @@ -2471,9 +2328,7 @@ goals 4.0.0 - Deprecated. Unused by Maven. - ]]> + @deprecated Unused by Maven. DOM @@ -2612,10 +2467,8 @@ 4.0.0+ ConfigurationContainer - } element contains informations required for the + The {@code @lt;execution>} element contains information required for the execution of a plugin. - ]]> @@ -2640,9 +2493,9 @@ Warning: This is an internal utility property that is only public for technical reasons, +

    Warning: This is an internal utility property that is only public for technical reasons, it is not part of the public API. In particular, this property can be changed or deleted without prior - notice. + notice.

    ]]>
    @@ -2651,12 +2504,10 @@ 4.1.0+ int - Since: Maven 4.0.0 - ]]> + @since Maven 4.0.0 @@ -2677,8 +2528,7 @@ public static final String DEFAULT_EXECUTION_ID = "default"; @Override - public String toString() - { + public String toString() { return getId(); } ]]> @@ -2722,12 +2572,10 @@ 4.0.0+ String - @@ -2735,10 +2583,8 @@ 4.0.0+ String - @@ -2757,9 +2603,8 @@ 4.0.0+ @@ -2769,9 +2614,8 @@ 4.0.0/4.0.99 @@ -2825,21 +2669,18 @@ public static final String SOURCE_SETTINGS = "settings.xml"; - public void setSource( String source ) - { - getDelegate().setSource( source ); + public void setSource(String source) { + getDelegate().setSource(source); } - public String getSource() - { + public String getSource() { return getDelegate().getSource(); } /** * @see java.lang.Object#toString() */ - public String toString() - { + public String toString() { return "Profile {id: " + getId() + ", source: " + getSource() + "}"; } ]]> @@ -2857,21 +2698,18 @@ // default source for this profile is in the pom itself. private String source = SOURCE_POM; - public void setSource( String source ) - { + public void setSource(String source) { this.source = source; } - public String getSource() - { + public String getSource() { return source; } /** * @see java.lang.Object#toString() */ - public String toString() - { + public String toString() { return "Profile {id: " + getId() + ", source: " + getSource() + "}"; } ]]> @@ -2900,12 +2738,10 @@ 4.0.0+ String - @@ -2938,7 +2774,7 @@ This could be included once we teach Maven to deal with multiple versions of the model custom - 4.0.0+ + 4.1.0+ Describes a custom profile activation trigger, brought in via build extension. @@ -2981,10 +2817,8 @@ 4.0.0+ String - @@ -2992,10 +2826,8 @@ 4.0.0+ String - @@ -3017,12 +2849,12 @@ ActivationFile 4.0.0+ - This is the file specification used to activate the profile. The {@code missing} value is the location of a file that needs to exist, and if it doesn't, the profile will be activated. On the other hand, {@code exists} will test for the existence of the file and if it is - there, the profile will be activated.
    - Variable interpolation for these file specifications is limited to {@code ${project.basedir}}, - system properties and user properties.]]>
    + there, the profile will be activated. + <p>Variable interpolation for these file specifications is limited to {@code ${project.basedir}}, + system properties and user properties.</p> missing @@ -3043,19 +2875,19 @@ This can be put back in when we figure out how to have multiple model versions ActivationCustom - 4.0.0+ + 4.1.0+ This activation allows users to specify their own custom trigger for a profile. configuration - 4.0.0+ + 4.1.0+ DOM The specification for triggering the profile according to the rules of the custom activation type. type - 4.0.0+ + 4.1.0+ String The type (role-hint) of activation which is to be used to activate the profile. @@ -3093,10 +2925,8 @@ version 4.0.0+ - String @@ -3104,10 +2934,8 @@ reportSets 4.0.0+ - ReportSet @@ -3125,8 +2953,7 @@ /** * Reset the {@code reportSetMap} field to {@code null} */ - public void flushReportSetMap() - { + public void flushReportSetMap() { this.reportSetMap = null; } @@ -3134,17 +2961,13 @@ * @return a Map of reportSets field with {@code ReportSet#getId()} as key * @see ReportSet#getId() */ - public java.util.Map getReportSetsAsMap() - { - if ( reportSetMap == null ) - { + public java.util.Map getReportSetsAsMap() { + if (reportSetMap == null) { reportSetMap = new java.util.LinkedHashMap(); - if ( getReportSets() != null ) - { - for ( java.util.Iterator i = getReportSets().iterator(); i.hasNext(); ) - { + if (getReportSets() != null) { + for (java.util.Iterator i = getReportSets().iterator(); i.hasNext(); ) { ReportSet reportSet = (ReportSet) i.next(); - reportSetMap.put( reportSet.getId(), reportSet ); + reportSetMap.put(reportSet.getId(), reportSet); } } } @@ -3155,9 +2978,8 @@ /** * @return the key of the report plugin, ie {@code groupId:artifactId} */ - public String getKey() - { - return constructKey( getGroupId(), getArtifactId() ); + public String getKey() { + return constructKey(getGroupId(), getArtifactId()); } /** @@ -3165,8 +2987,7 @@ * @param artifactId The artifact ID of the reporting plugin in the repository * @return the key of the report plugin, ie {@code groupId:artifactId} */ - public static String constructKey( String groupId, String artifactId ) - { + public static String constructKey(String groupId, String artifactId) { return groupId + ":" + artifactId; } ]]> @@ -3206,8 +3027,7 @@ @@ -3299,10 +3119,8 @@ configuration 4.1.0+ - Since: Maven 4.0.0 - ]]> + @since Maven 4.0.0 DOM @@ -3369,9 +3187,7 @@ 4.0.0+ String - ::}. - ]]> + The identifier of the POM in the format {@code <groupId>:<artifactId>:<version>}.
    @@ -3379,9 +3195,7 @@ 4.0.0+ String -
    @@ -3391,8 +3205,7 @@ diff --git a/api/maven-api-plugin/src/main/mdo/lifecycle.mdo b/api/maven-api-plugin/src/main/mdo/lifecycle.mdo index b27ba4f1c5f..f469eea4400 100644 --- a/api/maven-api-plugin/src/main/mdo/lifecycle.mdo +++ b/api/maven-api-plugin/src/main/mdo/lifecycle.mdo @@ -23,15 +23,15 @@ under the License. xml.schemaLocation="http://maven.apache.org/xsd/lifecycle-${version}.xsd"> lifecycle Lifecycle - Configuration of custom lifecycle mappings for the plugin, as generally stored in {@code META-INF/maven/lifecycle.xml} in a plugin's jar artifact. - ]]> + LifecycleConfiguration 1.0.0 - + Root element of the {@code lifecycle.xml} file. lifecycles @@ -46,9 +46,7 @@ under the License. Lifecycle 1.0.0 - + A custom lifecycle mapping definition. id diff --git a/api/maven-api-plugin/src/main/mdo/plugin.mdo b/api/maven-api-plugin/src/main/mdo/plugin.mdo index 019236dec8c..a7c9aa73a06 100644 --- a/api/maven-api-plugin/src/main/mdo/plugin.mdo +++ b/api/maven-api-plugin/src/main/mdo/plugin.mdo @@ -24,7 +24,7 @@ under the License. plugin PluginDescriptor META-INF/maven/plugin.xml in a plugin's jar artifact. + Maven 4 Plugin descriptor, stored in {@code META-INF/maven/plugin.xml} in a plugin's jar artifact. This descriptor is generally using the information contained in the annotations of the plugin api.

    An XSD is available at https://maven.apache.org/xsd/plugin-2.0.0.xsd

    ]]> @@ -32,7 +32,7 @@ under the License. PluginDescriptor 1.0.0+ - plugin.xml
    file.]]> + Root element of the {@code plugin.xml} file. name @@ -140,9 +140,7 @@ under the License. MojoDescriptor 1.0.0+ - + A Mojo description. goal @@ -179,12 +177,12 @@ under the License. phase 1.0.0+ String - Defines a default phase to bind a Mojo execution to if the user does not explicitly set a phase in the POM. - Note: This will not automagically make a Mojo run when the plugin declaration is added - to the POM. It merely enables the user to omit the <phase> element from the - surrounding <execution> element. - ]]> + <h4>Note:</h4> This will not automagically make a Mojo run when the plugin declaration is added + to the POM. It merely enables the user to omit the {@code <phase>} element from the + surrounding {@code <execution>} element. + executePhase @@ -209,48 +207,48 @@ under the License. 1.0.0/1.1.0 String runtime - Flags this Mojo as requiring the dependencies in the specified class path to be resolved before it can - execute: compile, runtime, test, - compile+runtime (since Maven 3.0) or runtime+system (since Maven 3.0) - ]]> + execute: {@code compile}, {@code runtime}, {@code test}, + {@code compile+runtime} (since Maven 3.0) or {@code runtime+system} (since Maven 3.0) + dependencyResolution 2.0.0+ String runtime - Flags this Mojo as requiring the dependencies in the specified class path to be resolved before it can - execute: compile, runtime, test, - compile+runtime (since Maven 3.0) or runtime+system (since Maven 3.0) - ]]> + execute: {@code compile}, {@code runtime}, {@code test}, + {@code compile+runtime} (since Maven 3.0) or {@code runtime+system} (since Maven 3.0) + requiresDependencyCollection 1.0.0/1.1.0 String - Flags this Mojo as requiring information about the dependencies that would make up the specified class path. As the name suggests, this is similar to requiresDependencyResolution and supports the same values. The important difference is this will not resolve the files for the dependencies, i.e. the artifacts associated with a Maven project can lack a file. As such, this annotation is meant for Mojos that only want to analyze the set of transitive dependencies, in particular during early lifecycle phases where full dependency resolution might fail due to projects which haven't been built yet. - ]]> + dependencyCollection 2.0.0+ String - Flags this Mojo as requiring information about the dependencies that would make up the specified class path. As the name suggests, this is similar to requiresDependencyResolution and supports the same values. The important difference is this will not resolve the files for the dependencies, i.e. the artifacts associated with a Maven project can lack a file. As such, this annotation is meant for Mojos that only want to analyze the set of transitive dependencies, in particular during early lifecycle phases where full dependency resolution might fail due to projects which haven't been built yet. - ]]> + requiresDirectInvocation @@ -325,7 +323,8 @@ under the License. Marks this Mojo as being thread-safe, i.e. the Mojo safely supports concurrent execution during parallel builds. Mojos without this annotation will make Maven output a warning when used during a parallel build - session. Since Maven 3.0. + session. + @since Maven 3.0. false @@ -347,9 +346,9 @@ under the License. executionStrategy 1.0.0/1.1.0 String - once-per-session
    , always. - ]]> + + Specify the execution strategy: {@code once-per-session}, {@code always}. + once-per-session @@ -362,10 +361,10 @@ under the License. deprecated 1.0.0+ String - @deprecated + + Description with the reason of Mojo deprecation. Similar to Javadoc {@code @deprecated} This will trigger a warning when a user tries to use a Mojo marked as deprecated. - ]]> + configurator @@ -466,15 +465,15 @@ under the License. 1.0.0+ boolean true - Specifies that this parameter can be configured directly by the user (as in the case of POM-specified configuration). This is useful when you want to force the user to use common POM elements rather than plugin configurations, as in the case where you want to use the artifact's final name as a parameter. In - this case, you want the user to modify <build><finalName/></build> rather + this case, you want the user to modify {@code <build><finalName/></build>} rather than specifying a value for finalName directly in the plugin configuration section. It is also useful to ensure that - for example - a List-typed parameter which expects items of type Artifact doesn't get a List full of Strings. - ]]> + description @@ -492,10 +491,10 @@ under the License. deprecated 1.0.0+ String - @deprecated + + Description with the reason of parameter deprecation. Similar to Javadoc {@code @deprecated}. This will trigger a warning when a user tries to configure a parameter marked as deprecated. - ]]> + expression diff --git a/api/maven-api-settings/src/main/mdo/settings.mdo b/api/maven-api-settings/src/main/mdo/settings.mdo index e29d2ddab23..d973f4d0e6b 100644 --- a/api/maven-api-settings/src/main/mdo/settings.mdo +++ b/api/maven-api-settings/src/main/mdo/settings.mdo @@ -566,7 +566,8 @@ 1.1.0+ String default - The layout of the mirror repository. Since Maven 3. + The layout of the mirror repository. + @since Maven 3. mirrorOfLayouts @@ -575,7 +576,8 @@ default,legacy The layouts of repositories being mirrored. This value can be used to restrict the usage - of the mirror to repositories with a matching layout (apart from a matching id). Since Maven 3. + of the mirror to repositories with a matching layout (apart from a matching id). + @since Maven 3. diff --git a/maven-core/src/test/projects/lifecycle-executor/project-with-multiple-executions/src/main/mdo/remote-resources.mdo b/maven-core/src/test/projects/lifecycle-executor/project-with-multiple-executions/src/main/mdo/remote-resources.mdo index c64cfbc83cf..c4618988047 100644 --- a/maven-core/src/test/projects/lifecycle-executor/project-with-multiple-executions/src/main/mdo/remote-resources.mdo +++ b/maven-core/src/test/projects/lifecycle-executor/project-with-multiple-executions/src/main/mdo/remote-resources.mdo @@ -20,10 +20,10 @@ under the License. remoteResourcesBundle RemoteResourcesBundle - A bundle of remote resources. This is the model specification for remote-resources.xml. - ]]> + package @@ -39,9 +39,9 @@ under the License. remoteResources 1.1.0 - Remote resources that are contained in a remote resources bundle. - ]]> + String * @@ -50,9 +50,9 @@ under the License. sourceEncoding 1.1.0 - Source encoding of the remote resources contained in the bundle. - ]]> + String
    diff --git a/maven-repository-metadata/src/main/mdo/metadata.mdo b/maven-repository-metadata/src/main/mdo/metadata.mdo index e9c39f8fa85..6624c5fc85c 100644 --- a/maven-repository-metadata/src/main/mdo/metadata.mdo +++ b/maven-repository-metadata/src/main/mdo/metadata.mdo @@ -69,7 +69,7 @@ under the License. version 1.0.0+ String - -SNAPSHOT) when this directory represents a "groupId/artifactId/version" for a SNAPSHOT.]]> + The base version (i.e. ending in {@code -SNAPSHOT}) when this directory represents a "groupId/artifactId/version" for a SNAPSHOT. plugins From 9ef5a63a247a09a8a78502951338387c0f2e306e Mon Sep 17 00:00:00 2001 From: Guillaume Nodet Date: Tue, 9 Jan 2024 18:27:35 +0100 Subject: [PATCH 3/4] Fix javadoc --- api/maven-api-plugin/src/main/mdo/plugin.mdo | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/maven-api-plugin/src/main/mdo/plugin.mdo b/api/maven-api-plugin/src/main/mdo/plugin.mdo index a7c9aa73a06..30933a497fa 100644 --- a/api/maven-api-plugin/src/main/mdo/plugin.mdo +++ b/api/maven-api-plugin/src/main/mdo/plugin.mdo @@ -179,9 +179,9 @@ under the License. String Defines a default phase to bind a Mojo execution to if the user does not explicitly set a phase in the POM. - <h4>Note:</h4> This will not automagically make a Mojo run when the plugin declaration is added + <p><b>Note:</b> This will not automagically make a Mojo run when the plugin declaration is added to the POM. It merely enables the user to omit the {@code <phase>} element from the - surrounding {@code <execution>} element. + surrounding {@code <execution>} element.</p> From e4e2142369e3e6d0c270c469a57cf46a37f2d0ed Mon Sep 17 00:00:00 2001 From: Guillaume Nodet Date: Wed, 10 Jan 2024 14:12:12 +0100 Subject: [PATCH 4/4] A few more fixes --- api/maven-api-model/src/main/mdo/maven.mdo | 31 ++++++++++--------- .../src/main/mdo/toolchains.mdo | 4 +-- maven-core/src/main/mdo/extension.mdo | 4 +-- .../src/main/mdo/core-extensions.mdo | 4 +-- .../src/main/mdo/metadata.mdo | 4 +-- 5 files changed, 24 insertions(+), 23 deletions(-) diff --git a/api/maven-api-model/src/main/mdo/maven.mdo b/api/maven-api-model/src/main/mdo/maven.mdo index a0e9c8ab95d..ce8ae901390 100644 --- a/api/maven-api-model/src/main/mdo/maven.mdo +++ b/api/maven-api-model/src/main/mdo/maven.mdo @@ -554,8 +554,8 @@ These dependencies are used to construct a classpath for your project during the build process. They are automatically downloaded from the repositories defined in this project. - See <a href="https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html">the - dependency mechanism</a> for more information. + + @see <a href="https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html">Dependency mechanism</a> Dependency @@ -608,7 +608,7 @@ PluginContainer 3.0.0+ - Contains the plugins informations for the project. + Contains the plugins information for the project. plugins @@ -702,7 +702,7 @@ PluginConfiguration 3.0.0+ PluginContainer - Contains the plugins management informations for the project. + Contains the plugins management information for the project. @@ -1331,8 +1331,9 @@ The {@code } element contains information required to exclude an artifact to the project.

    - The {@code groupId} and {@code artifactId} fields are interpreted as glob patterns, - see {@link java.nio.file.FileSystem#getPathMatcher}. + The {@code groupId} and {@code artifactId} fields are interpreted as glob patterns. + + @see java.nio.file.FileSystem#getPathMatcher ]]> @@ -1762,7 +1763,7 @@ Scm 4.0.0+ - The {@code <scm>} element contains informations required to the SCM + The {@code <scm>} element contains information required to the SCM (Source Control Management) of the project. @@ -1773,12 +1774,12 @@ URL format - and list of supported SCMs. + repository. This connection is read-only.
    Default value is: parent value [+ path adjustment] + (artifactId or project.directory property), or just parent value if scm's {@code child.scm.connection.inherit.append.path="false"} + @see URL format + @see list of supported SCMs ]]> String @@ -2252,9 +2253,9 @@

  • {@code combine.children}: available values are {@code merge} (default) and {@code append},
  • {@code combine.self}: available values are {@code merge} (default) and {@code override}.
  • -

    See POM Reference documentation and - Xpp3DomUtils - for more information.

    + + @see POM Reference documentation + @see Xpp3DomUtils ]]> configuration @@ -2280,7 +2281,7 @@ 4.0.0+ ConfigurationContainer - The {@code <plugin>} element contains informations required for a plugin. + The {@code <plugin>} element contains information required for a plugin. @@ -2902,7 +2903,7 @@ ConfigurationContainer } element in {@code } contains informations required for a report plugin. + The {@code } element in {@code } contains information required for a report plugin. ]]> diff --git a/api/maven-api-toolchain/src/main/mdo/toolchains.mdo b/api/maven-api-toolchain/src/main/mdo/toolchains.mdo index 902f67527ba..6a9bd87860e 100644 --- a/api/maven-api-toolchain/src/main/mdo/toolchains.mdo +++ b/api/maven-api-toolchain/src/main/mdo/toolchains.mdo @@ -35,8 +35,8 @@

    With {@code jdk} toolchain, for example, instead of being stuck with the JDK used to run Maven, all plugins can use the same other JDK instance without hardcoding absolute paths into the {@code pom.xml} and without configuring every plugin that require path to JDK tools.

    -

    See the Guide to Using Toolchains for - more information.

    + + @see Guide to Using Toolchains ]]> diff --git a/maven-core/src/main/mdo/extension.mdo b/maven-core/src/main/mdo/extension.mdo index 3b642833973..37dfe791a24 100644 --- a/maven-core/src/main/mdo/extension.mdo +++ b/maven-core/src/main/mdo/extension.mdo @@ -17,8 +17,8 @@ specific language governing permissions and limitations under the License. --> - + extension ExtensionDescriptor - diff --git a/maven-repository-metadata/src/main/mdo/metadata.mdo b/maven-repository-metadata/src/main/mdo/metadata.mdo index 6624c5fc85c..509e51aeb95 100644 --- a/maven-repository-metadata/src/main/mdo/metadata.mdo +++ b/maven-repository-metadata/src/main/mdo/metadata.mdo @@ -17,8 +17,8 @@ specific language governing permissions and limitations under the License. --> - repository-metadata