missing resources when using --patch-module
Robert Scholte
rfscholte at apache.org
Fri Apr 3 09:17:50 UTC 2020
This issue was registered as SUREFIRE-1768[1]
It contains a very small Maven project to demonstrate the issue.
That project contains one method executing the following:
Demo.class.getClassLoader().getResources("demo").asIterator().forEachRemaining(url -> {
System.out.println(url.getFile()); // I'd like to see the target/classes/demo directory here at some point.
});
After executing the test it shows the following result
/E:/test-classpath-demo-master/target/test-classes/demo/
/E:/test-classpath-demo-master/target/test-classes/demo
these are similar, but more worrying: where is
/E:/test-classpath-demo-master/target/classes/demo
I rewrote it a bit by including a main method to ensure it is not caused by surefire:
"%JAVA_HOME%"\bin\java --module-path target/classes --patch-module test.classpath.demo=target/test-classes --module test.classpath.demo/demo.DemoTest
this gave me only one result (where I expected 2):
/E:/test-classpath-demo-master/target/test-classes/demo/
So the question is, where is
/E:/test-classpath-demo-master/target/classes/demo/
thanks,
Robert
[1] https://issues.apache.org/jira/browse/SUREFIRE-1768
More information about the jigsaw-dev
mailing list