ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tzezula <>
Subject [GitHub] ant issue #18: JDK9 modules support for JUnitTask
Date Tue, 12 Jul 2016 16:20:44 GMT
Github user tzezula commented on the issue:
    Sorry I've overlooked the comment.
    Regarding the JUnit lookup. When the JUnit is not found on the classpath it's searched
on the modulepath. In fact the module path is used for 2 things here. First it's passed to
the forked external process running the test(s). The presence of modulepath requires fork
as there is no way how to change the module path of existing VM except of running the JUnit
in a custom 
The second thing the module path is used to is to lookup the JUnit needed by the JunitTask
itself. In this case the JUnit is not handled as module but loaded by AntClassLoader as a
jar into the unnamed module containing the Ant. I hope it should be OK.
    The code: `loader.getResource("junit.framework.Test")` is clearly wrong, it should be
either `loader.getResource("junit/framework/Test.class")` or `loader.loadClass("junit.framework.Test")`
as done in createMirror. The `loader.getResource("junit/framework/Test.class")`  works as
both the JUnit and Ant are part of the unnamed module.
    Fixed  by: b9183f95e5b543acd60eaea240c6c3fc74bae748
    The toLowerCase problem is fixed by: 1fc1ce108693bd52b9cf691b68dffb8f16343a42

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message