[MNG-6127] support IT re-run without cleaning Project: http://git-wip-us.apache.org/repos/asf/maven-integration-testing/repo Commit: http://git-wip-us.apache.org/repos/asf/maven-integration-testing/commit/d2b9d890 Tree: http://git-wip-us.apache.org/repos/asf/maven-integration-testing/tree/d2b9d890 Diff: http://git-wip-us.apache.org/repos/asf/maven-integration-testing/diff/d2b9d890
Branch: refs/heads/master Commit: d2b9d890e5d84253cfa80541ac4af8078e54b0fa Parents: 207ee9c Author: Hervé Boutemy <hbout...@apache.org> Authored: Thu Feb 8 22:35:21 2018 +0100 Committer: Hervé Boutemy <hbout...@apache.org> Committed: Thu Feb 8 22:35:21 2018 +0100 ---------------------------------------------------------------------- ...ginExecutionConfigurationInterferenceTest.java | 18 +++++++++++------- .../apache/maven/its/mng6127/plugin/TestMojo.java | 4 ++-- .../main/resources/META-INF/plexus/components.xml | 2 +- 3 files changed, 14 insertions(+), 10 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/d2b9d890/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6127PluginExecutionConfigurationInterferenceTest.java ---------------------------------------------------------------------- diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6127PluginExecutionConfigurationInterferenceTest.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6127PluginExecutionConfigurationInterferenceTest.java index 07ee610..e9ca4ce 100644 --- a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6127PluginExecutionConfigurationInterferenceTest.java +++ b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6127PluginExecutionConfigurationInterferenceTest.java @@ -53,25 +53,29 @@ public class MavenITmng6127PluginExecutionConfigurationInterferenceTest verifier.resetStreams(); verifier.verifyErrorFreeLog(); + File modAconfigurationFile = new File( modAprojectDir, "configuration.txt" ); + File modBconfigurationFile = new File( modBprojectDir, "configuration.txt" ); + File modCconfigurationFile = new File( modCprojectDir, "configuration.txt" ); + modAconfigurationFile.delete(); + modBconfigurationFile.delete(); + modCconfigurationFile.delete(); + // build the test project verifier = newVerifier( projectDir.getAbsolutePath(), "remote" ); - verifier.executeGoal( "install" ); + verifier.executeGoal( "verify" ); verifier.resetStreams(); verifier.verifyErrorFreeLog(); - File modAconfigurationFile = new File( modAprojectDir, "configuration.txt" ); verifier.assertFilePresent( modAconfigurationFile.getCanonicalPath() ); String modAactual = FileUtils.fileRead( modAconfigurationFile ); - assertEquals( "mod-asecond", modAactual ); + assertEquals( "name=mod-a, secondName=second from components.xml", modAactual ); - File modBconfigurationFile = new File( modBprojectDir, "configuration.txt" ); verifier.assertFilePresent( modBconfigurationFile.getCanonicalPath() ); String modBactual = FileUtils.fileRead( modBconfigurationFile ); - assertEquals( "mod-bsecond", modBactual ); + assertEquals( "name=mod-b, secondName=second from components.xml", modBactual ); - File modCconfigurationFile = new File( modCprojectDir, "configuration.txt" ); verifier.assertFilePresent( modCconfigurationFile.getCanonicalPath() ); String modCactual = FileUtils.fileRead( modCconfigurationFile ); - assertEquals( "second", modCactual ); + assertEquals( "secondName=second from components.xml", modCactual ); } } http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/d2b9d890/core-it-suite/src/test/resources/mng-6127-plugin-execution-configuration-interference/plugin/src/main/java/org/apache/maven/its/mng6127/plugin/TestMojo.java ---------------------------------------------------------------------- diff --git a/core-it-suite/src/test/resources/mng-6127-plugin-execution-configuration-interference/plugin/src/main/java/org/apache/maven/its/mng6127/plugin/TestMojo.java b/core-it-suite/src/test/resources/mng-6127-plugin-execution-configuration-interference/plugin/src/main/java/org/apache/maven/its/mng6127/plugin/TestMojo.java index 8dddab6..386b982 100644 --- a/core-it-suite/src/test/resources/mng-6127-plugin-execution-configuration-interference/plugin/src/main/java/org/apache/maven/its/mng6127/plugin/TestMojo.java +++ b/core-it-suite/src/test/resources/mng-6127-plugin-execution-configuration-interference/plugin/src/main/java/org/apache/maven/its/mng6127/plugin/TestMojo.java @@ -68,9 +68,9 @@ public class TestMojo { if ( name != null ) { - w.write( name ); + w.write( "name=" + name + ", " ); } - w.write( secondName ); + w.write( "secondName=" + secondName ); } catch ( IOException e ) { http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/d2b9d890/core-it-suite/src/test/resources/mng-6127-plugin-execution-configuration-interference/plugin/src/main/resources/META-INF/plexus/components.xml ---------------------------------------------------------------------- diff --git a/core-it-suite/src/test/resources/mng-6127-plugin-execution-configuration-interference/plugin/src/main/resources/META-INF/plexus/components.xml b/core-it-suite/src/test/resources/mng-6127-plugin-execution-configuration-interference/plugin/src/main/resources/META-INF/plexus/components.xml index 7effd4d..20b78c1 100644 --- a/core-it-suite/src/test/resources/mng-6127-plugin-execution-configuration-interference/plugin/src/main/resources/META-INF/plexus/components.xml +++ b/core-it-suite/src/test/resources/mng-6127-plugin-execution-configuration-interference/plugin/src/main/resources/META-INF/plexus/components.xml @@ -17,7 +17,7 @@ <mojo> <goal>mng-6127:mng-6127-plugin:test</goal> <configuration> - <secondName>second</secondName> + <secondName>second from components.xml</secondName> </configuration> </mojo> </mojos>