maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tibor Digana <tibordig...@apache.org>
Subject Further questions to "Add modulepath support" SUREFIRE-1262
Date Sun, 18 Sep 2016 20:08:24 GMT
I have executed examples from
http://openjdk.java.net/projects/jigsaw/quick-start
Now I have handson exps but still something is not clear.

Did Jigsaw broke backwards compatibility?
Running Main-Class from Manifest would not work like this?
java -jar surefire.jar

The problem is that it makes sense to me to use "*--patch-module*" along
with
building sources to Java 9 module using *module-info.java*.
So it is strange to me that somebody is going to compile *src/test/java* to
Jigsaw module e,g, "*test.base*" and it is strange that Manifest Main-Class
cannot be executed in Java 9.

So I compiled sources a little bit different way but the principle like
this:


*javac -d target/test-classes/test.base
\src/test/java/test.base/module-info.java
\src/test/java/test.base/pkg/Test.java*

The module appears in *target/test-classes/test.base* using
module-info.class.
Now I am going to provide patched class-path to *mypatches/test.base*
without having *module-info.class*.

This means we are going to suppress regular module in target and use
another class path
from location *mypatches/test.base* yet having sub-directory *test.base* as
module name (does not have module-info.class).

This executes console application in pkg.Test.java - not from Manifest.


*java --patch-module test.base=mypatches/test.base \--module-path
target/test-classes \--module test.base/pkg.Test*

The main problem here is that we are going to replace two class paths as
another workaround of old command "*java -jar surefire.jar*" which would
not work with Manifest anymore in JDK9, AFAIK.
Is it truth?
If it is truth, then it is broken backwards compatibility in Java.

Pls correct me if I am wrong and clarify more what is intended with Jigsaw
in Surefire.

Cheers
Tibor

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message