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

gnodet pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven.git


The following commit(s) were added to refs/heads/master by this push:
     new 1da418c87e [MNG-8675] Correctly deprecate Resource in the model (#2234)
1da418c87e is described below

commit 1da418c87e8c88d15639ab4e78b56aa7829f1e7a
Author: Guillaume Nodet <gno...@gmail.com>
AuthorDate: Sun Apr 13 20:51:10 2025 +0100

    [MNG-8675] Correctly deprecate Resource in the model (#2234)
---
 api/maven-api-model/src/main/mdo/maven.mdo | 13 +++++++------
 src/mdo/model.vm                           |  3 +++
 2 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/api/maven-api-model/src/main/mdo/maven.mdo 
b/api/maven-api-model/src/main/mdo/maven.mdo
index 34cfe87020..f0e9f7ca9f 100644
--- a/api/maven-api-model/src/main/mdo/maven.mdo
+++ b/api/maven-api-model/src/main/mdo/maven.mdo
@@ -2171,9 +2171,15 @@
     <class>
       <name>Resource</name>
       <description>This element describes all of the classpath resources 
associated with a project
-        or unit tests.</description>
+        or unit tests.
+
+        @deprecated Replaced by {@code &lt;Source&gt;} with {@code resources} 
language.
+      </description>
       <version>3.0.0+</version>
       <superClass>FileSet</superClass>
+      <annotations>
+        <annotation>@Deprecated(since = "4.0.0")</annotation>
+      </annotations>
       <fields>
         <field>
           <name>targetPath</name>
@@ -2186,13 +2192,8 @@
             element with this value: {@code org/apache/maven/messages}.
             This is not required if you simply put the resources in that 
directory
             structure at the source, however.
-
-            @deprecated Replaced by {@code &lt;Source&gt;} with {@code 
resources} language.
           </description>
           <type>String</type>
-          <annotations>
-            <annotation>@Deprecated(since = "4.0.0")</annotation>
-          </annotations>
         </field>
         <field>
           <name>filtering</name>
diff --git a/src/mdo/model.vm b/src/mdo/model.vm
index 1a6e923a87..dc08d35421 100644
--- a/src/mdo/model.vm
+++ b/src/mdo/model.vm
@@ -114,6 +114,9 @@ import $imp;
  * ${line.trim()}
     #end
  */
+#foreach( $ann in ${class.annotations} )
+${ann}
+#end
 @Experimental
 @Generated @ThreadSafe @Immutable
 public class ${class.name}

Reply via email to