You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by gn...@apache.org on 2026/08/28 13:05:33 UTC

(maven) branch backport/12872-to-4.0.x created (now 0441072d7b)

This is an automated email from the ASF dual-hosted git repository.

gnodet pushed a change to branch backport/12872-to-4.0.x
in repository https://gitbox.apache.org/repos/asf/maven.git


      at 0441072d7b Fix #11504: add replacement guidance to deprecated model and settings APIs (#12872)

This branch includes the following new commits:

     new 0441072d7b Fix #11504: add replacement guidance to deprecated model and settings APIs (#12872)

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(maven) 01/01: Fix #11504: add replacement guidance to deprecated model and settings APIs (#12872)

Posted by gn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

gnodet pushed a commit to branch backport/12872-to-4.0.x
in repository https://gitbox.apache.org/repos/asf/maven.git

commit 0441072d7bde917bba36a73cca1b2de994d76828
Author: Guillaume Nodet <gn...@gmail.com>
AuthorDate: Fri Aug 28 15:05:02 2026 +0200

    Fix #11504: add replacement guidance to deprecated model and settings APIs (#12872)
    
    Update @deprecated Javadoc tags in maven.mdo and settings.mdo to tell
    users what to use instead of each deprecated element:
    
    - Notifier.address → use the configuration properties map
    - Model.getProjectDirectory() → use getProjectDirectoryPath()
    - ModelBase.reports → use the reporting element
    - ConfigurationContainer.unsetInheritanceApplied() → no-op, no replacement
    - ConfigurationContainer.setInherited(boolean) → use setInherited(String)
    - Plugin.goals → use executions
    - Plugin.flushExecutionMap() → no-op, no replacement
    - Reporting.flushReportPluginMap() → no-op, no replacement
    - Settings.getMirrorOf() → use mirror matching infrastructure
    
    Co-authored-by: Claude Opus 4.6 <no...@anthropic.com>
---
 api/maven-api-model/src/main/mdo/maven.mdo       | 17 ++++++++++++++---
 api/maven-api-settings/src/main/mdo/settings.mdo |  4 ++++
 2 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/api/maven-api-model/src/main/mdo/maven.mdo b/api/maven-api-model/src/main/mdo/maven.mdo
index 69431f1d92..2fce33c380 100644
--- a/api/maven-api-model/src/main/mdo/maven.mdo
+++ b/api/maven-api-model/src/main/mdo/maven.mdo
@@ -416,6 +416,7 @@
      *
      * @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).
+     * @deprecated Use {@link #getProjectDirectoryPath()} instead, which returns a {@link java.nio.file.Path}.
      */
     @Deprecated
     public java.io.File getProjectDirectory() {
@@ -622,7 +623,7 @@
           <name>reports</name>
           <version>4.0.0</version>
           <description>
-            @deprecated Now ignored by Maven.
+            @deprecated Now ignored by Maven. Use the {@code reporting} element to configure report plugins instead.
           </description>
           <type>DOM</type>
           <annotations>
@@ -1057,7 +1058,7 @@
           <version>4.0.0+</version>
           <type>String</type>
           <description>
-            @deprecated Where to send the notification to - eg email address.
+            @deprecated Use the {@code configuration} properties map to specify the notification address instead.
           </description>
           <annotations>
             <annotation>@Deprecated(since = "4.0.0")</annotation>
@@ -2559,10 +2560,16 @@
           <version>4.0.0/4.0.99</version>
           <code>
             <![CDATA[
+    /**
+     * @deprecated This method is a no-op and has no replacement.
+     */
     @Deprecated
     public void unsetInheritanceApplied() {
     }
 
+    /**
+     * @deprecated Use {@link #setInherited(String)} instead.
+     */
     @Deprecated
     public void setInherited(boolean value) {
       setInherited(Boolean.toString(value));
@@ -2625,7 +2632,7 @@
           <name>goals</name>
           <version>4.0.0</version>
           <description>
-            @deprecated Unused by Maven.
+            @deprecated Unused by Maven. Use {@code executions} to configure plugin goals instead.
           </description>
           <type>DOM</type>
           <annotations>
@@ -2664,6 +2671,8 @@
 
     /**
      * Reset the {@code executionMap} field to {@code null}
+     *
+     * @deprecated This method is a no-op and has no replacement.
      */
      @Deprecated
     public void flushExecutionMap() {
@@ -2896,6 +2905,8 @@
 
     /**
      * Reset the <code>reportPluginMap</code> field to <code>null</code>
+     *
+     * @deprecated This method is a no-op and has no replacement.
      */
     @Deprecated
     public void flushReportPluginMap() {
diff --git a/api/maven-api-settings/src/main/mdo/settings.mdo b/api/maven-api-settings/src/main/mdo/settings.mdo
index 0e8803b2d4..b9f37bda22 100644
--- a/api/maven-api-settings/src/main/mdo/settings.mdo
+++ b/api/maven-api-settings/src/main/mdo/settings.mdo
@@ -293,6 +293,10 @@
         return match;
     }
 
+    /**
+     * @deprecated This simplistic lookup does not support advanced mirror matching syntax.
+     * There is no direct replacement; use the Maven mirror matching infrastructure instead.
+     */
     @Deprecated
     public Mirror getMirrorOf(String repositoryId) {
         Mirror match = null;