mirror of https://github.com/apache/maven.git
[MNG-7804] Fix broken MavenModelVersion generation (#1284)
This commit is contained in:
parent
f2df54723b
commit
80a8e41540
|
@ -65,7 +65,7 @@ class MavenModelVersionTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
void testV4V4ModelPriority() {
|
||||
void testV4ModelPriority() {
|
||||
Model m = model.withBuild(Build.newInstance()
|
||||
.withPlugins(Collections.singleton(Plugin.newInstance()
|
||||
.withExecutions(Collections.singleton(
|
||||
|
|
|
@ -123,6 +123,15 @@ public class ${className} {
|
|||
#end
|
||||
#end
|
||||
#end
|
||||
#if ( $class.superClass )
|
||||
#if ( $classToFields.containsKey( $model.getClass( $class.superClass, $class.versionRange ) ) )
|
||||
#set ( $fields = $classToFields.get( $class ) )
|
||||
#if ( ! $fields )
|
||||
#set ( $fields = $LinkedHashSet.newInstance() )
|
||||
#set ( $dummy = $classToFields.put( $class, $fields ) )
|
||||
#end
|
||||
#end
|
||||
#end
|
||||
#end
|
||||
#end
|
||||
#foreach ( $class in $classToFields.keySet() )
|
||||
|
@ -131,7 +140,7 @@ public class ${className} {
|
|||
return ${var} != null && (
|
||||
#set ( $pfx = " " )
|
||||
#if ( $class.superClass )
|
||||
#if ( $classToFields.containsKey( $model.getClass( $class.superClass, $version ) ) )
|
||||
#if ( $classToFields.containsKey( $model.getClass( $class.superClass, $class.versionRange ) ) )
|
||||
$pfx is_${v}((${class.superClass}) ${var})
|
||||
#set ( $pfx = "||" )
|
||||
#end
|
||||
|
|
Loading…
Reference in New Issue