From b60b15d8e7397f48686610cb0fc96a73dcc92078 Mon Sep 17 00:00:00 2001 From: Michael Osipov Date: Mon, 27 Apr 2020 23:35:14 +0200 Subject: [PATCH] [MNG-2478] add "resources-filtered" filtered resource directories to super POM Modified MavenITmng3843PomInheritanceTest to accommodate additional resource directories. --- .../it/MavenITmng3843PomInheritanceTest.java | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3843PomInheritanceTest.java b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3843PomInheritanceTest.java index ac235d379a..56205542e0 100644 --- a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3843PomInheritanceTest.java +++ b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3843PomInheritanceTest.java @@ -95,11 +95,25 @@ public class MavenITmng3843PomInheritanceTest assertPathEquals( basedir, "src/main/java", props.getProperty( "project.build.sourceDirectory" ) ); assertPathEquals( basedir, "src/test/java", props.getProperty( "project.build.testSourceDirectory" ) ); assertPathEquals( basedir, "src/main/scripts", props.getProperty( "project.build.scriptSourceDirectory" ) ); - assertEquals( "1", props.getProperty( "project.build.resources" ) ); + if ( matchesVersionRange( "[3.7.0,)" ) ) + { + assertEquals( "2", props.getProperty( "project.build.resources" ) ); + assertEquals( "2", props.getProperty( "project.build.testResources" ) ); + } + else + { + assertEquals( "1", props.getProperty( "project.build.resources" ) ); + assertEquals( "1", props.getProperty( "project.build.testResources" ) ); + } assertPathEquals( basedir, "src/main/resources", props.getProperty( "project.build.resources.0.directory" ) ); - assertEquals( "1", props.getProperty( "project.build.testResources" ) ); assertPathEquals( basedir, "src/test/resources", props.getProperty( "project.build.testResources.0.directory" ) ); + if ( matchesVersionRange( "[3.7.0,)" ) ) + { + assertPathEquals( basedir, "src/main/resources-filtered", props.getProperty( "project.build.resources.1.directory" ) ); + assertPathEquals( basedir, "src/test/resources-filtered", + props.getProperty( "project.build.testResources.1.directory" ) ); + } assertPathEquals( basedir, "target", props.getProperty( "project.build.directory" ) ); assertPathEquals( basedir, "target/classes", props.getProperty( "project.build.outputDirectory" ) ); assertPathEquals( basedir, "target/test-classes", props.getProperty( "project.build.testOutputDirectory" ) );