[GitHub] maven-surefire pull request #120: Add convinient method to check for the cur...

2016-09-19 Thread britter
Github user britter closed the pull request at:

https://github.com/apache/maven-surefire/pull/120


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



[GitHub] maven-surefire pull request #120: Add convinient method to check for the cur...

2016-09-18 Thread Tibor17
Github user Tibor17 commented on a diff in the pull request:

https://github.com/apache/maven-surefire/pull/120#discussion_r79314476
  
--- Diff: 
surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/fixture/HelperAssertions.java
 ---
@@ -172,7 +173,7 @@ public static IntegrationTestSuiteResults 
parseReportList( List
 
 public static void assumeJavaVersion( JavaVersion version )
 {
-assumeThat( "java.specification.version: ",
-JAVA_SPECIFICATION_VERSION, is( greaterThanOrEqualTo( 
version.toString() ) ) );
+assumeTrue( "java.specification.version: " + 
JAVA_SPECIFICATION_VERSION,
+SystemUtils.isJavaVersionAtLeast( version ) );
--- End diff --

I am running the build _mvn install -Prun-its_, let's wait for the result.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



[GitHub] maven-surefire pull request #120: Add convinient method to check for the cur...

2016-09-18 Thread Tibor17
Github user Tibor17 commented on a diff in the pull request:

https://github.com/apache/maven-surefire/pull/120#discussion_r79310840
  
--- Diff: 
surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/fixture/HelperAssertions.java
 ---
@@ -172,7 +173,7 @@ public static IntegrationTestSuiteResults 
parseReportList( List
 
 public static void assumeJavaVersion( JavaVersion version )
 {
-assumeThat( "java.specification.version: ",
-JAVA_SPECIFICATION_VERSION, is( greaterThanOrEqualTo( 
version.toString() ) ) );
+assumeTrue( "java.specification.version: " + 
JAVA_SPECIFICATION_VERSION,
+SystemUtils.isJavaVersionAtLeast( version ) );
--- End diff --

Yes this is cool. Thx.
I will come back to your PRs soon.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



[GitHub] maven-surefire pull request #120: Add convinient method to check for the cur...

2016-09-14 Thread britter
Github user britter commented on a diff in the pull request:

https://github.com/apache/maven-surefire/pull/120#discussion_r78776416
  
--- Diff: 
surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/fixture/HelperAssertions.java
 ---
@@ -159,4 +164,10 @@ public static IntegrationTestSuiteResults 
parseReportList( List
 throw new RuntimeException( "Couldn't parse XML reports", e );
 }
 }
+
+public static void assumeJavaVersion(JavaVersion version)
+{
+assumeThat( "java.specification.version: ",
--- End diff --

I've added the static import.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



[GitHub] maven-surefire pull request #120: Add convinient method to check for the cur...

2016-09-14 Thread britter
Github user britter commented on a diff in the pull request:

https://github.com/apache/maven-surefire/pull/120#discussion_r78775898
  
--- Diff: 
surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/fixture/HelperAssertions.java
 ---
@@ -159,4 +164,10 @@ public static IntegrationTestSuiteResults 
parseReportList( List
 throw new RuntimeException( "Couldn't parse XML reports", e );
 }
 }
+
+public static void assumeJavaVersion(JavaVersion version)
+{
+assumeThat( "java.specification.version: ",
--- End diff --

Hey Tibor,

do you mean to use a constant instead of the string in the message part of 
`assumeThat`? There is no constant for the property name in Commons Lang. But I 
could introduce one in `HelperAssertions` or we could extend SystemUtils, but 
then we have to wait for the next release of Commons Lang.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



[GitHub] maven-surefire pull request #120: Add convinient method to check for the cur...

2016-09-12 Thread britter
Github user britter commented on a diff in the pull request:

https://github.com/apache/maven-surefire/pull/120#discussion_r78354537
  
--- Diff: 
surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/fixture/HelperAssertions.java
 ---
@@ -159,4 +164,10 @@ public static IntegrationTestSuiteResults 
parseReportList( List
 throw new RuntimeException( "Couldn't parse XML reports", e );
 }
 }
+
+public static void assumeJavaVersion(JavaVersion version)
+{
+assumeThat( "java.specification.version: ",
+SystemUtils.JAVA_SPECIFICATION_VERSION, is( 
greaterThanOrEqualTo( version.toString() ) ) );
--- End diff --

I'll update this, but I won't get to it before Friday/Saturday. Stay tuned 
😎 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



[GitHub] maven-surefire pull request #120: Add convinient method to check for the cur...

2016-09-12 Thread Tibor17
Github user Tibor17 commented on a diff in the pull request:

https://github.com/apache/maven-surefire/pull/120#discussion_r78351427
  
--- Diff: 
surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/fixture/HelperAssertions.java
 ---
@@ -159,4 +164,10 @@ public static IntegrationTestSuiteResults 
parseReportList( List
 throw new RuntimeException( "Couldn't parse XML reports", e );
 }
 }
+
+public static void assumeJavaVersion(JavaVersion version)
+{
+assumeThat( "java.specification.version: ",
+SystemUtils.JAVA_SPECIFICATION_VERSION, is( 
greaterThanOrEqualTo( version.toString() ) ) );
--- End diff --

I would not use JDK 9 for such simple comparison.
Back to `SystemUtils.JAVA_SPECIFICATION_VERSION, is( greaterThanOrEqualTo( 
version.toString() ) ) );`
It's matter of taste if you just compare strings or float numbers. 
Comparing float numbers would make me sleep better.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



[GitHub] maven-surefire pull request #120: Add convinient method to check for the cur...

2016-09-12 Thread britter
Github user britter commented on a diff in the pull request:

https://github.com/apache/maven-surefire/pull/120#discussion_r78336717
  
--- Diff: 
surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/fixture/HelperAssertions.java
 ---
@@ -159,4 +164,10 @@ public static IntegrationTestSuiteResults 
parseReportList( List
 throw new RuntimeException( "Couldn't parse XML reports", e );
 }
 }
+
+public static void assumeJavaVersion(JavaVersion version)
+{
+assumeThat( "java.specification.version: ",
+SystemUtils.JAVA_SPECIFICATION_VERSION, is( 
greaterThanOrEqualTo( version.toString() ) ) );
--- End diff --

Hello @Tibor17 

> Unfortunately org.apache.commons.lang3.JavaVersion is not Comparable

Java enums are comparable by default.

> How would this work with string 1.10? [...]

I'm currently working on Commons Lang Release 3.5 which I expect to be 
ready in two weeks or so. Commons Lang 3.5 will have full Java 9 support with 
regards to version number. Furthermore it will have a better API for comparing 
the current version against a desired version:

```
if(JavaVersion.CURRENT.atLeast(JavaVersion.JAVA_1_8)) {
   // do something only possible with Java 8
}
```

I suggest to apply this for now so I can finish the junit-5 IT PR with this 
new check API. I will provide a PR for updating this again to the new API 
introduced in Commons Lang 3.5 when Lang 3.5 is ready. Makes sense?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



[GitHub] maven-surefire pull request #120: Add convinient method to check for the cur...

2016-09-11 Thread Tibor17
Github user Tibor17 commented on a diff in the pull request:

https://github.com/apache/maven-surefire/pull/120#discussion_r78302041
  
--- Diff: 
surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/fixture/HelperAssertions.java
 ---
@@ -159,4 +164,10 @@ public static IntegrationTestSuiteResults 
parseReportList( List
 throw new RuntimeException( "Couldn't parse XML reports", e );
 }
 }
+
+public static void assumeJavaVersion(JavaVersion version)
+{
+assumeThat( "java.specification.version: ",
+SystemUtils.JAVA_SPECIFICATION_VERSION, is( 
greaterThanOrEqualTo( version.toString() ) ) );
--- End diff --

Unfortunately `org.apache.commons.lang3.JavaVersion` is not `Comparable`. 
How would this work with string `1.10`? JDK 9, I guess, returns `9` instead of 
`1.9`. Did you try? If so then such lexical comparison should be fine. JDK 10 I 
hope will follow the same pattern.  Version `10.1` bigger than `10`. Are you 
facing any problem with lexicographic comparison?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



[GitHub] maven-surefire pull request #120: Add convinient method to check for the cur...

2016-09-11 Thread Tibor17
Github user Tibor17 commented on a diff in the pull request:

https://github.com/apache/maven-surefire/pull/120#discussion_r78301886
  
--- Diff: 
surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/fixture/HelperAssertions.java
 ---
@@ -159,4 +164,10 @@ public static IntegrationTestSuiteResults 
parseReportList( List
 throw new RuntimeException( "Couldn't parse XML reports", e );
 }
 }
+
+public static void assumeJavaVersion(JavaVersion version)
+{
+assumeThat( "java.specification.version: ",
--- End diff --

Nice PR. Maybe `SystemUtils.JAVA_SPECIFICATION_VERSION + ": ` instead. Do 
you like static imports?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



[GitHub] maven-surefire pull request #120: Add convinient method to check for the cur...

2016-09-10 Thread britter
GitHub user britter opened a pull request:

https://github.com/apache/maven-surefire/pull/120

Add convinient method to check for the currently used Java Version



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/britter/maven-surefire assume-java-version

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/maven-surefire/pull/120.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #120


commit ff951f9dd2836101ce0df86b79da76bc51c2996b
Author: Benedikt Ritter 
Date:   2016-09-10T13:13:24Z

Add convinient method to check for the currently used Java Version




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org