Skip to content

Commit

Permalink
Upgrade to JUnit 5.3 RC1 and Maven Compiler 3.8.0
Browse files Browse the repository at this point in the history
Closes #7
Closes #10
  • Loading branch information
sormuras committed Aug 15, 2018
1 parent f27ac61 commit fb4415f
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 42 deletions.
37 changes: 24 additions & 13 deletions modules/sawdust.alpha/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,40 @@
</parent>

<artifactId>sawdust.alpha</artifactId>
<version>1.0-SNAPSHOT</version>

<build>
<directory>target/maven</directory>
<sourceDirectory>src/main/java/sawdust.alpha</sourceDirectory>
<testSourceDirectory>src/test/java/sawdust.alpha</testSourceDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.6.0</version>
<executions>
<execution>
<id>launch-console</id>
<phase>test</phase>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
<configuration>
<testExcludes>
<testExclude>module-info.java</testExclude>
</testExcludes>
<classpathScope>test</classpathScope>
<longModulepath>false</longModulepath>
<executable>java</executable>
<arguments>
<argument>--module-path</argument>
<modulepath/>
<argument>--add-modules</argument>
<argument>ALL-MODULE-PATH</argument>
<argument>--module</argument>
<argument>org.junit.platform.console</argument>
<argument>--scan-modules</argument>
</arguments>
</configuration>
</plugin>
<!--<plugin>-->
<!--<artifactId>maven-surefire-plugin</artifactId>-->
<!--<version>2.22.0</version>-->
<!--<configuration>-->
<!--<argLine>-Djunit.jupiter.execution.parallel.enabled=true</argLine>-->
<!--</configuration>-->
<!--</plugin>-->
</plugins>
</build>

Expand Down
41 changes: 25 additions & 16 deletions modules/user.view/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,29 +18,38 @@
<artifactId>sawdust.alpha</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>${jupiter.version}</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>${jupiter.version}</version>
<scope>runtime</scope>
</dependency>
</dependencies>

<build>
<directory>target/maven</directory>
<sourceDirectory>src/test/java/user.view</sourceDirectory>

<testSourceDirectory>src/test/java/user.view</testSourceDirectory>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.0</version>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.6.0</version>
<executions>
<execution>
<id>launch-console</id>
<phase>test</phase>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
<configuration>
<argLine>-Dmodular.tests=true -Djunit.jupiter.execution.parallel.enabled=true</argLine>
<classpathScope>test</classpathScope>
<longModulepath>false</longModulepath>
<executable>java</executable>
<arguments>
<argument>--module-path</argument>
<modulepath/>
<argument>--add-modules</argument>
<argument>ALL-MODULE-PATH</argument>
<argument>--module</argument>
<argument>org.junit.platform.console</argument>
<argument>--scan-modules</argument>
</arguments>
</configuration>
</plugin>
</plugins>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.EnabledIfSystemProperty;
import sawdust.alpha.AlphaPublic;

@DisplayName("[user.view] UserViewTests")
Expand All @@ -17,7 +16,6 @@ void accessExportedTypes() {
}

@Test
@EnabledIfSystemProperty(named = "modular.tests", matches = "true")
void modular() {
var module = UserViewTests.class.getModule();
assertEquals("user.view", module.getName());
Expand Down
22 changes: 11 additions & 11 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<slf4j.version>1.8.0-beta2</slf4j.version>
<apiguardian.version>1.0.0</apiguardian.version>
<jupiter.version>5.3.0-M1</jupiter.version>
<platform.version>1.3.0-M1</platform.version>
<jupiter.version>5.3.0-RC1</jupiter.version>
<platform.version>1.3.0-RC1</platform.version>
</properties>

<modules>
Expand All @@ -35,11 +35,18 @@
<artifactId>junit-jupiter-api</artifactId>
<version>${jupiter.version}</version>
</dependency>

<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-console</artifactId>
<version>${platform.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<scope>test</scope>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>${jupiter.version}</version>
<scope>runtime</scope>
</dependency>
</dependencies>

Expand All @@ -50,19 +57,12 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<version>3.8.0</version>
<configuration>
<release>10</release>
<showWarnings>true</showWarnings>
<showDeprecation>true</showDeprecation>
</configuration>
<dependencies>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>6.2</version> <!-- Use newer version of ASM -->
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
Expand Down

0 comments on commit fb4415f

Please sign in to comment.