This is an automated email from the ASF dual-hosted git repository.

hboutemy pushed a commit to branch maven-buildinfo-plugin
in repository https://gitbox.apache.org/repos/asf/maven-studies.git


The following commit(s) were added to refs/heads/maven-buildinfo-plugin by this 
push:
     new db0f4f2  improved remote checks
db0f4f2 is described below

commit db0f4f2acda716505f558a3dc39bd56e492467ff
Author: HervĂ© Boutemy <[email protected]>
AuthorDate: Sun Dec 29 12:44:32 2019 +0100

    improved remote checks
---
 src/it/multi/verify.groovy | 29 ++++++++++++++++++++++++++++-
 1 file changed, 28 insertions(+), 1 deletion(-)

diff --git a/src/it/multi/verify.groovy b/src/it/multi/verify.groovy
index d3fbd00..1dd1559 100644
--- a/src/it/multi/verify.groovy
+++ b/src/it/multi/verify.groovy
@@ -65,4 +65,31 @@ File localAggregate = new File( basedir, 
"../../local-repo/org/apache/maven/plug
 assert localAggregate.isFile()
 
 // check existence of buildinfos in remote repository
-// TODO
\ No newline at end of file
+void checkBuildinfo( String root, String artifactId, boolean aggregate )
+{
+  File remoteDir = new File( basedir, root + 
"target/remote-repo/org/apache/maven/plugins/it/" + artifactId + 
"/1.0-SNAPSHOT" )
+  assert remoteDir.isDirectory()
+  int count = 0;
+  for ( File f : remoteDir.listFiles() )
+  {
+    if ( f.getName().endsWith( ".pom" ) )
+    {
+      File b = new File( remoteDir, f.getName().replace( ".pom", ".buildinfo" 
) )
+      println b
+      assert b.isFile()
+      count++
+      if ( aggregate )
+      {
+        File a = new File( remoteDir, f.getName().replace( ".pom", 
"-aggregate.buildinfo" ) )
+        println a
+        assert a.isFile()
+        count++
+      }
+    }
+  }
+  assert count >= ( aggregate ? 2 : 1 )
+}
+
+checkBuildinfo( "", "multi", false )
+checkBuildinfo( "modA/", "multi-modA", false )
+checkBuildinfo( "modB/", "multi-modB", true )

Reply via email to