maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] sormuras commented on issue #184: Donate current sources from junit-platform-surefire-provider
Date Sun, 06 May 2018 07:14:44 GMT
sormuras commented on issue #184: Donate current sources from junit-platform-surefire-provider
URL: https://github.com/apache/maven-surefire/pull/184#issuecomment-386859383
 
 
   > Did you also have a problem with JaCoCO:0.7.9 on JDK10?
   
   According to https://github.com/jacoco/jacoco/releases 0.8.1 introduced JDK 10 support.
Thus, 0.7.9 had to fail.
   
   > Do we need to have scope=compile on the dependency <artifactId>junit-platform-launcher</artifactId>
in our provider POM? What will happen if it would be scope provided?
   
   99% yes, the provider needs it at compile time. That's what JUnit Platform is all about.
It's the API for tools (build tools, IDEs, ...) to get "JUnit 5" _(technically, there's no
JUnit 5)_ running. See this import statements in `org.apache.maven.surefire.junitplatform.JUnitPlatformProvider`:
   
   ```java
   import org.junit.platform.launcher.Launcher;
   import org.junit.platform.launcher.LauncherDiscoveryRequest;
   import org.junit.platform.launcher.TagFilter;
   import org.junit.platform.launcher.core.LauncherDiscoveryRequestBuilder;
   import org.junit.platform.launcher.core.LauncherFactory;
   ```
   
   And recall the "JUnit 5" architecture layout:
   
   ![](https://user-images.githubusercontent.com/214207/38951423-e2d5c82c-4348-11e8-94f0-840a0c78b617.png)
   
   Just move the **junit-platform-surefire-provider** from the bottom-left out off the red
**PLATFORM** box into the **IDEs/Build Tool** bubble at the bottom. Here be dragons, Gradle,
Surefire, IDEA, Eclipse, etc...
   
   1% no, perhaps there's some Maven-trick to achieve the same with `provided` scope?
   
   > How did you skip tests on surefire-junit-platform with JDK 1.7?
   
   Mh, if it is because of `<jvm>${java.home}/bin/java</jvm>` then @britter did
it.
   At test runtime, the assumption declared in `JUnitPlatformIT` ensures that a JDK 1.8+ is
at work:
   
   ```java
   @Before
   public void setUp()
   {
       assumeThat( "java.specification.version: ",
                       getProperty( "java.specification.version" ),
                       is( greaterThanOrEqualTo( "1.8" ) ) );
   }
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message