You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by rf...@apache.org on 2018/08/01 20:06:22 UTC

[maven-jdeps-plugin] branch master updated: Rewrite assertion ( JDK8 can have both outputs )

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

rfscholte pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-jdeps-plugin.git


The following commit(s) were added to refs/heads/master by this push:
     new 721d1a2  Rewrite assertion ( JDK8 can have both outputs )
721d1a2 is described below

commit 721d1a25186d8a6ca9567e30c9e00b4a0e801921
Author: rfscholte <rf...@apache.org>
AuthorDate: Wed Aug 1 22:06:15 2018 +0200

    Rewrite assertion ( JDK8 can have both outputs )
---
 src/it/package/verify.groovy | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/it/package/verify.groovy b/src/it/package/verify.groovy
index abd830b..a228cb8 100644
--- a/src/it/package/verify.groovy
+++ b/src/it/package/verify.groovy
@@ -20,13 +20,13 @@
  
 def buildLog = new File( basedir, 'build.log' )
 
-if (!System.getProperty('java.version').startsWith('1.8.')) {
+def lines = buildLog.readLines().dropWhile{ !it.startsWith("classes -> ") }.takeWhile{ !it.startsWith( '[INFO]' ) }
+
   // classes -> java.base
   //   org.apache.maven.plugins.jdeps.its                 -> java.io                                            java.base
-  assert 1 == buildLog.readLines().dropWhile{ it != 'classes -> java.base' }.drop(1).takeWhile{ !it.startsWith( '[INFO]' ) }.size()
-} else {
+
   // classes -> c:\Program Files\Java\jdk1.8.0_152\jre\lib\rt.jar
   //   org.apache.maven.plugins.jdeps.its (classes)
   //      -> java.io  
-  assert 2 == buildLog.readLines().dropWhile{ !it.startsWith("classes -> ") }.drop(1).takeWhile{ !it.startsWith( '[INFO]' ) }.size()
-}
+
+assert lines.size() == ( lines[0] == 'classes -> java.base' ? 2 : 3  )