Releases: sylvainhalle/AntRun
Version 1.10.5
A single modification: updates to the latest version of JaCoCo and JUnit.
Version 1.10.4
Versions 1.10.2 and 1.10.3 have not been released publicly.
Fixes:
- The JaCoCo report task correctly ignores test files
- Fix to test-legacy task
The main change is the generation of the Manifest file in the case of "fat JAR" files. The manifest correctly exports a package name and a version attached to this package; fat JARs that bundle multiple packages preserve that information, so that it is possible to inspect this file to see exactly what packages are included and the version number for each of them.
In addition, the fat JAR no longer includes multiple copies of the same file (in case multiple source JARs contain it), which could cause version clashes and a lot of confusion.
Version 1.10.1
Changes to this release:
- The task
test-legacy
allows users of Ant 1.10.5 and older to run tests, albeit with limited HTML reports for unit tests and coverage. - The creation of JARs is separated into three files, containing the binary files, the documentation and the source code, respectively. This makes it easier to package projects for repositories such at the Central Repository, which expect projects to be distributed under that form.
Version 1.10
Changes in this release:
- Contains a workaround to an alleged bug in Ant, which has been discovered and reported here: https://bz.apache.org/bugzilla/show_bug.cgi?id=66504
- Added target
clean-reports
, which only cleans test report files (JUnit and JaCoCo) - Configurable output folders for unit test and coverage reports. This can be useful in the case of a "super-project" where the results of tests in sub-projects can be merged in a single "super-report" (works both for JUnit and JaCoCo).
- The
test
task no longer generates unit test and coverage reports. Those actions are now in their own targets,junit-report
andjacoco-report
Version 1.9
This version changes the way JUnit tests are run internally. No modifications need to be made to a project that already uses version 1.8.
The way JUnit was called in versions 1.7.x and 1.8.x resulted in an HTML report where all test cases were incorrectly reported as belonging to the " JUnit Vintage" class instead of the actual class they were contained into. It is intended behavior on the part of the JUnit console launcher, and it apparently won't get fixed. However, this makes HTML reports mostly unusable as one cannot locate the class where a test is implemented. Version 1.9 (after much fiddling and trial-and-error) calls JUnit in a different way and restores the proper format of HTML reports that were produced in AntRun versions prior to 1.7.
The only downside is that with the version of Ant that ships with Ubuntu 20.04, console output for test results is less informative than before (it only shows the number of passed/failed tests). This is a limitation of Ant, although the output is apparently improved since version 1.10.
Version 1.8
Instead of compiling against a bootstrap classpath (i.e. a downloadable rt.jar file) using the -source and -target compiler switches, it uses the newer -release option, which does not require a version of rt.jar, and supports cross-compiling to versions of Java all the way down to version 6.
This option is only available for compilers of Java 9 and higher. Consequently, cross-compiling will no longer work on systems with Java 8 and lower, but one can still compile JAR files that will be compatible with Java 6.
This is an internal change only; nothing needs to be changed to a project's structure to upgrade to this version.
Version 1.7.2
Single enhancement on the task download-rt8
.
Version 1.7.1
Modifications to version 1.7 so that JUnit 5 tests are now supported without modification. The script is also written such that JaCoCo coverage reports work again on all tests from all versions (extending down to JUnit 3). Upgrading to 1.7.1 from 1.7 is highly recommended.
Version 1.7
This version contains a single major upgrade: the switch from JUnit version 4.x to JUnit version 5.x. The JAR files that are downloaded are completely different from previous versions (both in terms of filenames and number of files).
Currently, the script's test
target still runs the legacy junit
Ant task, which in turn uses the JUnit vintage engine to run tests. This engine expects tests to contain annotations for JUnit 4 (i.e. @org.junit.Test
). Tests that use JUnit 5 annotations currently cause errors and should not be used. However, this ensures backwards compatibility with existing JUnit 4.x test suites, so nothing needs to be changed to existing projects upgrading from a previous version of AntRun.
JUnit 5 only supports Java 8 onwards. Therefore, the target
parameter of the javac
task has been increased from 1.6 to 1.8. Similarly, the download-rt6
task has been renamed download-rt8
, and now installs the bootstrap classes of version 8 of the JRE. As a consequence, AntRun can no longer be used to cross-compile to versions of Java earlier than 8.
Version 1.6.1
Single addition: generation of XML reports by JaCoCo