Saturday, October 26, 2019

Apache Ivy 2.5.0 released

This week, we released 2.5.0 version of Apache Ivy. Apache Ivy is a build dependency manager that is integrated with the Apache Ant build tool. The download is available as usual at https://ant.apache.org/ivy/download.cgi.

This 2.5.0 version comes after a long gap in releases of Ivy. 2.4.0 was released way back on December 26 2014. After that, the project has seen slowness in development activities. However, with help from the some community members, especially Nicolas Lalevée, back in around 2017, we had some bug fixes and enhancements done. On April 19 2018, we released 2.5.0-rc1. We called it a "rc1" because it was a long time since we had done a project release and wanted users to be aware that there might be some unexpected issues.

2.5.0-rc1 saw some community members using this version and reporting back some bugs that they ran into. We have been able to fix them during this past year and it was now finally time to release it as 2.5.0. We expect the Ivy community to start using this version in favour of older releases and report back any issues that they run into either at https://issues.apache.org/jira/browse/IVY or in our Ivy user mailing list https://ant.apache.org/mail.html

Users migrating from previous versions of Ivy are recommended to use a fresh/clean Ivy local cache to avoid certain issues with cached Ivy metadata that might have been introduced in a previous version (2.5.0-rc1) of Ivy.

The complete list of changes (since 2.4.0) that are part of this release is available at https://ant.apache.org/ivy/history/2.5.0/release-notes.html.

Going forward, the goal is to fix any bugs that are reported and introduce certain enhancements that will help improve the usage of the tool.

Friday, September 06, 2019

Ant 1.10.7 released - Ability to include/exclude JUnit 5 "tags" during test execution

1.10.7 version of Ant has just been released yesterday. This release consists mostly bug fixes and some minor enhancements. The downloads are as usual available at https://ant.apache.org/bindownload.cgi

Notable among these bug fixes is a fix to a regression that happened in our 1.10.6 release. In that 1.10.6 release, we accidentally broke compatibility against Java 8. Ant 1.10.x releases are supposed to support Java runtimes starting from Java 8. However, during our previous release, our use of javac compilation attributes caused us to generate a binary which in some cases would run into issues when run against Java 8. This issue has now been fixed in this 1.10.7 release. More details about the regression are available in the bugzilla issue here https://bz.apache.org/bugzilla/show_bug.cgi?id=63457.

Among the enhancements that have made it into this newer release, includes an enhancement to the junitlauncher task. The junitlauncher task is meant for running JUnit 5 framework based test cases. In this 1.10.7 release of Ant, thanks to a contribution from Matthias Gutheil (https://github.com/MatthiasGutheil), this task now allows you to include or exclude JUnit 5 "tags" from a particular execution of tests. New attributes "includeTags" and "excludeTags" have been introduced to support selecting the relevant tags for execution. The junitlauncher task manual https://ant.apache.org/manual/Tasks/junitlauncher.html has the complete details.

As usual, any suggestions, feedback or questions can be raised in our user mailing list https://ant.apache.org/mail.html.

Saturday, May 11, 2019

Apache Ant 1.10.6 released - fork mode for junitlauncher and new jmod and link tasks

Apache Ant 1.10.6 has been released this week. This release contains numerous bug fixes as well as some very exciting new features. The complete release notes is available here and the downloads itself are available here. In this article, I will go over some of the new features that have made it into this release.

Running JUnit5 tests in a forked JVM, using junitlauncher task


A while back, Ant 1.10.x introduced support for JUnit5 tests to be launched using the new "junitlauncher" task. Given the nature of changes between JUnit 4.x and JUnit 5, the amount of support introduced in the new "junitlauncher" task was minimal. Based on user feedback about this task, this task has now been enhanced to support "fork" mode. This was one of the most asked for enhancement, in this task. The "fork" mode support in this task now allows users to configure this task to launch the tests in a forked JVM instead of running these tests within the same JVM as the one, the build is currently running in. Fork mode allows much more control over how these tests execute (things like setting up additional JVM arguments just for these tests or even system properties). The complete details of how to use fork mode in this task, is available in the manual for this task. Here's a very basic minimal example of one such usage:

<target name="test-basic-fork">
        <junitlauncher>
         <!-- Imagine test.classpath points to a previously configured path -->
            <classpath refid="test.classpath"/>
            <test name="org.example.myapp.SampleTest" outputdir="${output.dir}">
                <fork dir="${basedir}">
                    <sysproperty key="myapp-system-property" value="hello world!"/>
                </fork>
            </test>
        </junitlauncher>
</target>


The example above, sets up "junitlauncher" task to launch a test class named "org.example.myapp.SampleTest" in a forked JVM. The "fork" element in the example above is configured to setup a Java system property named "myapp-system-property" with a value of "hello world!". When the test executes, this Java system property will be made available to this test or any other class being executed in that forked JVM. More advanced ability of the "fork" element is explained in the manual linked previously.

New jmod and link tasks for Java 9+ tools


Java 9 shipped with a new modular ecosystem. This also brought in new tools to create and manage the Java modules. In this release of Ant 1.10.6, we introduce new tasks - "jmod" and "link", which can be used to create Java modules and then assemble them to create custom JVM runtime images. More details about these tasks can be found in their manuals here and here. A big thanks to Craig Pell who contributed these valuable tasks. More Java 9+ enhancements are being worked upon in Ant and we plan to make them available in future releases.

Please do download this new version of Ant and provide us feedback, suggestions in our user mailing list.