You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by kh...@apache.org on 2018/06/21 19:09:14 UTC
[maven-remote-resources-plugin] 07/07: WIP - executeGoal will get
an exception.
This is an automated email from the ASF dual-hosted git repository.
khmarbaise pushed a commit to branch MRRESOURCES-104
in repository https://gitbox.apache.org/repos/asf/maven-remote-resources-plugin.git
commit df7948c41c4643596c831ef0d8ed1534e3974e59
Author: Karl Heinz Marbaise <kh...@apache.org>
AuthorDate: Sun Apr 8 00:56:17 2018 +0200
WIP - executeGoal will get an exception.
---
.../remote/it/IT_RunOnlyAtExecutionRoot.java | 28 +++++++++++++---------
1 file changed, 17 insertions(+), 11 deletions(-)
diff --git a/src/test/java/org/apache/maven/plugin/resources/remote/it/IT_RunOnlyAtExecutionRoot.java b/src/test/java/org/apache/maven/plugin/resources/remote/it/IT_RunOnlyAtExecutionRoot.java
index 182841f..a91ffce 100644
--- a/src/test/java/org/apache/maven/plugin/resources/remote/it/IT_RunOnlyAtExecutionRoot.java
+++ b/src/test/java/org/apache/maven/plugin/resources/remote/it/IT_RunOnlyAtExecutionRoot.java
@@ -58,21 +58,27 @@ public class IT_RunOnlyAtExecutionRoot
// Might reconsider how to write a better testcase.
// verifier.deleteArtifacts( "org.apache.maven.plugin.rresource.it.mrr41" );
- verifier.executeGoal( "generate-resources" );
- verifier.verifyErrorFreeLog();
- verifier.resetStreams();
+ try
+ {
+ verifier.executeGoal( "generate-resources" );
+ }
+ catch ( VerificationException e )
+ {
+ verifier.resetStreams();
+
+ String depResource = "target/maven-shared-archive-resources/DEPENDENCIES";
+ File output = new File( dir, depResource );
+ assertTrue( output.exists() );
- String depResource = "target/maven-shared-archive-resources/DEPENDENCIES";
- File output = new File( dir, depResource );
- assertTrue( output.exists() );
+ assertFalse( new File( dir, "child1/" + depResource ).exists() );
+ assertFalse( new File( dir, "child2/" + depResource ).exists() );
- assertFalse( new File( dir, "child1/" + depResource ).exists() );
- assertFalse( new File( dir, "child2/" + depResource ).exists() );
+ String content = FileUtils.fileRead( output );
- String content = FileUtils.fileRead( output );
+ assertTrue( content.contains( "Dependency Id: org.apache.maven.plugin.rresource.it.mrr41:release:1.0" ) );
+ assertTrue( content.contains( "Dependency Id: org.apache.maven.plugin.rresource.it.mrr41:snapshot:1.0-SNAPSHOT" ) );
- assertTrue( content.contains( "Dependency Id: org.apache.maven.plugin.rresource.it.mrr41:release:1.0" ) );
- assertTrue( content.contains( "Dependency Id: org.apache.maven.plugin.rresource.it.mrr41:snapshot:1.0-SNAPSHOT" ) );
+ }
}
}