Repository: maven-integration-testing Updated Branches: refs/heads/master 06e3a23ae -> 2e74409fc
MNG-5889 added IT 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/2e74409f Tree: http://git-wip-us.apache.org/repos/asf/maven-integration-testing/tree/2e74409f Diff: http://git-wip-us.apache.org/repos/asf/maven-integration-testing/diff/2e74409f Branch: refs/heads/master Commit: 2e74409fc2593b4478c40f28c7fdabc60202c06b Parents: 06e3a23 Author: Hervé Boutemy <hbout...@apache.org> Authored: Mon Nov 14 00:37:52 2016 +0100 Committer: Hervé Boutemy <hbout...@apache.org> Committed: Mon Nov 14 00:37:52 2016 +0100 ---------------------------------------------------------------------- .../it/MavenITmng5771CoreExtensionsTest.java | 24 +++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/2e74409f/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5771CoreExtensionsTest.java ---------------------------------------------------------------------- diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5771CoreExtensionsTest.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5771CoreExtensionsTest.java index fd99a79..9462bba 100644 --- a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5771CoreExtensionsTest.java +++ b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5771CoreExtensionsTest.java @@ -83,6 +83,28 @@ public class MavenITmng5771CoreExtensionsTest server.stop(); } - + /** + * check that <code>.mvn/</code> is found when current dir does not contain <code>pom.xml</code> + * but path to POM set by <code>--file path/to/pom.xml</code> + */ + public void testCoreExtensionMNG5889File() + throws Exception + { + File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-5771-core-extensions" ); + + Verifier verifier = newVerifier( testDir.getAbsolutePath() ); // not client directory + verifier.filterFile( "settings-template.xml", "settings.xml", "UTF-8", verifier.newDefaultFilterProperties() ); + + verifier = newVerifier( testDir.getAbsolutePath() ); + verifier.deleteDirectory( "client/target" ); + verifier.deleteArtifacts( "org.apache.maven.its.it-core-extensions" ); + verifier.getCliOptions().add( "-s" ); + verifier.getCliOptions().add( new File( testDir, "settings.xml" ).getAbsolutePath() ); + verifier.getCliOptions().add( "-f" ); // --file client/pom.xml + verifier.getCliOptions().add( new File( testDir, "client/pom.xml" ).getAbsolutePath() ); + verifier.executeGoal( "validate" ); + verifier.verifyErrorFreeLog(); + verifier.resetStreams(); + } }