Skip to content

Commit

Permalink
Introduce 'junit-jupiter' module
Browse files Browse the repository at this point in the history
Introduce 'junit-jupiter' as an almost empty aggregator module easing
the configuration required to get started with JUnit Jupiter.

Addresses #1629
  • Loading branch information
sormuras committed Nov 30, 2018
1 parent e11febe commit a1d17fc
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 33 deletions.
1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ val platformProjects by extra(listOf(
))

val jupiterProjects by extra(listOf(
project(":junit-jupiter"),
project(":junit-jupiter-api"),
project(":junit-jupiter-engine"),
project(":junit-jupiter-migrationsupport"),
Expand Down
15 changes: 15 additions & 0 deletions junit-jupiter/junit-jupiter.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
description = "JUnit Jupiter (Aggregator)"

dependencies {
api(project(":junit-jupiter-api"))
api(project(":junit-jupiter-params"))
runtimeOnly(project(":junit-jupiter-engine"))
}

tasks.jar {
manifest {
attributes(
"Automatic-Module-Name" to "org.junit.jupiter"
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ repositories {
}

dependencies {
testImplementation("org.junit.jupiter:junit-jupiter-api:${jupiterVersion}")
testImplementation("org.junit.jupiter:junit-jupiter-params:${jupiterVersion}")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:${jupiterVersion}")
testImplementation("org.junit.jupiter:junit-jupiter:${jupiterVersion}")
}

test {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
>> 1 line header: No module descriptor found. Derived automatic module. >>

org.junit.jupiter@${jupiterVersion} automatic
requires java.base mandated
33 changes: 3 additions & 30 deletions platform-tooling-support-tests/projects/maven-starter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,14 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>10</java.version>
<maven.compiler.release>11</maven.compiler.release>
<junit.jupiter.version>${env.JUNIT_JUPITER_VERSION}</junit.jupiter.version>
<junit.platform.version>${env.JUNIT_PLATFORM_VERSION}</junit.platform.version>
</properties>

<dependencies>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>${junit.jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<version>${junit.jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<artifactId>junit-jupiter</artifactId>
<version>${junit.jupiter.version}</version>
<scope>test</scope>
</dependency>
Expand All @@ -39,11 +26,7 @@
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
<version>3.8.0</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
Expand All @@ -52,14 +35,4 @@
</plugins>
</build>

<repositories>
<repository>
<id>sonatype-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ class HelperTests {
@Test
void loadModuleDirectoryNames() {
assertLinesMatch(List.of( //
"junit-jupiter", //
"junit-jupiter-api", //
"junit-jupiter-engine", //
"junit-jupiter-migrationsupport", //
Expand Down
1 change: 1 addition & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ require(javaVersion.isJava11Compatible) {
rootProject.name = "junit5"

include("documentation")
include("junit-jupiter")
include("junit-jupiter-api")
include("junit-jupiter-engine")
include("junit-jupiter-migrationsupport")
Expand Down

0 comments on commit a1d17fc

Please sign in to comment.