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 41e676014 Do not generate empty files for InputLocation and InputSource
41e676014 is described below

commit 41e676014389ab1afa1ed6ca85f924269bd449bb
Author: Guillaume Nodet <[email protected]>
AuthorDate: Tue Jul 11 08:29:13 2023 +0200

    Do not generate empty files for InputLocation and InputSource
---
 src/mdo/model-v3.vm | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/mdo/model-v3.vm b/src/mdo/model-v3.vm
index 30bdf24a8..2da536d4f 100644
--- a/src/mdo/model-v3.vm
+++ b/src/mdo/model-v3.vm
@@ -22,7 +22,13 @@
 #
 #set ( $root = $model.getClass( $model.getRoot($version), $version ) )
 #
+#set ( $allClasses = [] )
 #foreach ( $class in $model.allClasses )
+  #if ( $class.name != "InputLocation" && $class.name != "InputSource" )
+    #set ( $dummy = $allClasses.add( $class ) )
+  #end
+#end
+#foreach ( $class in $allClasses )
   #set ( $ancestors = $Helper.ancestors( $class ) )
   #set ( $allFields = [] )
   #set ( $inheritedFields = [] )
@@ -38,7 +44,6 @@
 #MODELLO-VELOCITY#SAVE-OUTPUT-TO 
${package.replace('.','/')}/WrapperProperties.java
 #parse ( "java/WrapperProperties.java" )
 #MODELLO-VELOCITY#SAVE-OUTPUT-TO ${package.replace('.','/')}/${className}.java
-  #if ( $class.name != "InputLocation" && $class.name != "InputSource" )
     #set ( $types = { } )
     #set ( $imports = 
$class.getClass().forName("java.util.TreeSet").newInstance() )
     #set ( $dummy = $imports.add( "java.io.Serializable" ) )
@@ -318,5 +323,4 @@ public class ${class.name}
 $cs.code
     #end
 }
-  #end
 #end

Reply via email to