Skip to content

Commit

Permalink
Remove ConsoleLauncher configuration (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
seachicken committed Oct 2, 2019
1 parent 36f2517 commit fb685f4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 19 deletions.
12 changes: 10 additions & 2 deletions junit5-jupiter-starter-ant/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# Set constants.
#
junit_platform_version='1.5.2'
junit_jupiter_version='5.5.2'
ant_version='1.10.7'
ant_folder="apache-ant-${ant_version}"
ant_archive="${ant_folder}-bin.tar.gz"
Expand All @@ -15,9 +16,16 @@ curl --remote-name "https://archive.apache.org/dist/ant/binaries/${ant_archive}"
tar --extract -z --exclude "${ant_folder}/manual" --file "${ant_archive}"

#
# Load and store junit-platform-console-standalone jar into ${ANT_HOME}/lib.
# Load and store necessary JUnit5 jar into ${ANT_HOME}/lib.
#
(cd "${ant_folder}/lib" && curl --remote-name "http://central.maven.org/maven2/org/junit/platform/junit-platform-console-standalone/${junit_platform_version}/junit-platform-console-standalone-${junit_platform_version}.jar")
(cd "${ant_folder}/lib" && curl --remote-name "http://central.maven.org/maven2/org/junit/platform/junit-platform-commons/${junit_platform_version}/junit-platform-commons-${junit_platform_version}.jar")
(cd "${ant_folder}/lib" && curl --remote-name "http://central.maven.org/maven2/org/junit/platform/junit-platform-engine/${junit_platform_version}/junit-platform-engine-${junit_platform_version}.jar")
(cd "${ant_folder}/lib" && curl --remote-name "http://central.maven.org/maven2/org/junit/platform/junit-platform-launcher/${junit_platform_version}/junit-platform-launcher-${junit_platform_version}.jar")
(cd "${ant_folder}/lib" && curl --remote-name "http://central.maven.org/maven2/org/junit/jupiter/junit-jupiter-api/${junit_jupiter_version}/junit-jupiter-api-${junit_jupiter_version}.jar")
(cd "${ant_folder}/lib" && curl --remote-name "http://central.maven.org/maven2/org/junit/jupiter/junit-jupiter-engine/${junit_jupiter_version}/junit-jupiter-engine-${junit_jupiter_version}.jar")
(cd "${ant_folder}/lib" && curl --remote-name "http://central.maven.org/maven2/org/junit/jupiter/junit-jupiter-params/${junit_jupiter_version}/junit-jupiter-params-${junit_jupiter_version}.jar")
(cd "${ant_folder}/lib" && curl --remote-name "http://central.maven.org/maven2/org/opentest4j/opentest4j/1.2.0/opentest4j-1.2.0.jar")
(cd "${ant_folder}/lib" && curl --remote-name "http://central.maven.org/maven2/org/apiguardian/apiguardian-api/1.1.0/apiguardian-api-1.1.0.jar")

#
# Finally, let Ant do its work...
Expand Down
18 changes: 1 addition & 17 deletions junit5-jupiter-starter-ant/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
</target>

<!-- https://junit.org/junit5/docs/snapshot/user-guide/#running-tests-build-ant -->
<target name="test.junit.launcher" depends="compile">
<target name="test" depends="compile">
<junitlauncher haltOnFailure="true" printSummary="true">
<classpath refid="test.classpath"/>
<testclasses outputdir="build/test-report">
Expand All @@ -46,20 +46,4 @@
</junitlauncher>
</target>

<!-- https://junit.org/junit5/docs/current/user-guide/#running-tests-console-launcher -->
<target name="test.console.launcher" depends="compile">
<java classpathref="test.classpath" classname="org.junit.platform.console.ConsoleLauncher" fork="true" failonerror="true">
<arg value="--scan-classpath"/>
<arg line="--reports-dir build/test-report"/>
</java>
<junitreport todir="build/test-report">
<fileset dir="build/test-report">
<include name="TEST-*.xml"/>
</fileset>
<report format="frames" todir="build/test-report/html"/>
</junitreport>
</target>

<target name="test" depends="test.junit.launcher, test.console.launcher" />

</project>

0 comments on commit fb685f4

Please sign in to comment.