[jira] [Comment Edited] (MCOMPILER-481) JPMS Regression: cannot access (requires static module not include anymore)

2023-01-20 Thread Tamas Cservenak (Jira)


[ 
https://issues.apache.org/jira/browse/MCOMPILER-481?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17679050#comment-17679050
 ] 

Tamas Cservenak edited comment on MCOMPILER-481 at 1/20/23 8:44 AM:


When building maven-compiler-plugin master with Maven 3.9.0 this IT fails
{noformat}
[INFO] -
[INFO] Build Summary:
[INFO]   Passed: 62, Failed: 1, Errors: 0, Skipped: 5
[INFO] -
[ERROR] The following builds failed:
[ERROR] *  MCOMPILER-481-requires-static-included/pom.xml
[INFO] - {noformat}
Using
{noformat}
[cstamas@urnebes maven-compiler-plugin]$ java -version
openjdk version "11.0.17" 2022-10-18
OpenJDK Runtime Environment Temurin-11.0.17+8 (build 11.0.17+8)
OpenJDK 64-Bit Server VM Temurin-11.0.17+8 (build 11.0.17+8, mixed mode)
[cstamas@urnebes maven-compiler-plugin]$ mvn -v
Apache Maven 3.9.0-SNAPSHOT (f7ca0b697ac7223b42d982d92cad5af48c9d184d)
Maven home: /home/cstamas/.sdkman/candidates/maven/current
Java version: 11.0.17, vendor: Eclipse Adoptium, runtime: 
/home/cstamas/.sdkman/candidates/java/11.0.17-tem
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "6.1.6-200.fc37.x86_64", arch: "amd64", family: 
"unix"
[cstamas@urnebes maven-compiler-plugin]$  {noformat}
Same happens with Java17 + mvn 3.9.0-SNAP


was (Author: cstamas):
When building maven-compiler-plugin master with Maven 3.9.0 this IT fails
{noformat}
[INFO] -
[INFO] Build Summary:
[INFO]   Passed: 62, Failed: 1, Errors: 0, Skipped: 5
[INFO] -
[ERROR] The following builds failed:
[ERROR] *  MCOMPILER-481-requires-static-included/pom.xml
[INFO] - {noformat}
Using
{noformat}
[cstamas@urnebes maven-compiler-plugin]$ java -version
openjdk version "11.0.17" 2022-10-18
OpenJDK Runtime Environment Temurin-11.0.17+8 (build 11.0.17+8)
OpenJDK 64-Bit Server VM Temurin-11.0.17+8 (build 11.0.17+8, mixed mode)
[cstamas@urnebes maven-compiler-plugin]$ mvn -v
Apache Maven 3.9.0-SNAPSHOT (f7ca0b697ac7223b42d982d92cad5af48c9d184d)
Maven home: /home/cstamas/.sdkman/candidates/maven/current
Java version: 11.0.17, vendor: Eclipse Adoptium, runtime: 
/home/cstamas/.sdkman/candidates/java/11.0.17-tem
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "6.1.6-200.fc37.x86_64", arch: "amd64", family: 
"unix"
[cstamas@urnebes maven-compiler-plugin]$  {noformat}
 

> JPMS Regression: cannot access  (requires static module not include 
> anymore)
> ---
>
> Key: MCOMPILER-481
> URL: https://issues.apache.org/jira/browse/MCOMPILER-481
> Project: Maven Compiler Plugin
>  Issue Type: Bug
>Affects Versions: 3.9.0
>Reporter: Simone Bordet
>Assignee: Olivier Lamy
>Priority: Blocker
> Fix For: 3.10.0
>
> Attachments: compiler-bug.tar.gz
>
>
> Version 3.8.1 is not affected.
> The problem lies in how the module-path is constructed by the 
> maven-compiler-plugin – not sure what changes from 3.8.1 caused this.
> In 3.8.1:
> {code:java}
> -d
>   /home/simon/tmp/compiler-bug/app/target/test-classes
> -classpath
>   /home/simon/tmp/compiler-bug/app/target/test-classes
>   
> /home/simon/.m2/repository/org/junit/jupiter/junit-jupiter-api/5.8.2/junit-jupiter-api-5.8.2.jar
>   
> /home/simon/.m2/repository/org/opentest4j/opentest4j/1.2.0/opentest4j-1.2.0.jar
>   
> /home/simon/.m2/repository/org/junit/platform/junit-platform-commons/1.8.2/junit-platform-commons-1.8.2.jar
>   
> /home/simon/.m2/repository/org/apiguardian/apiguardian-api/1.1.2/apiguardian-api-1.1.2.jar
>   
> --module-path
>   /home/simon/tmp/compiler-bug/app/target/classes
>   
> /home/simon/.m2/repository/org/example/compiler-bug-service/1.0-SNAPSHOT/compiler-bug-service-1.0-SNAPSHOT.jar
>   
> /home/simon/.m2/repository/org/eclipse/jetty/jetty-util-ajax/10.0.7/jetty-util-ajax-10.0.7.jar
>   
> /home/simon/.m2/repository/org/eclipse/jetty/jetty-util/10.0.7/jetty-util-10.0.7.jar
>   
> /home/simon/.m2/repository/org/slf4j/slf4j-api/2.0.0-alpha5/slf4j-api-2.0.0-alpha5.jar
>   
> -sourcepath
>   /home/simon/tmp/compiler-bug/app/src/test/java
>   
> /home/simon/tmp/compiler-bug/app/target/generated-test-sources/test-annotations
>   
> -s
>   
> /home/simon/tmp/compiler-bug/app/target/generated-test-sources/test-annotations
> -g
> -nowarn
> --release
>   11
> -encoding
>   UTF-8
> --patch-module
>   compiler.bug.app=/home/simon/tmp/compiler-bug/app/target/classes
>   /home/simon/tmp/compiler-bug/app/src/test/java
>   
> /home/simon/tmp/compiler-bug/app/target/generated-test-sources/test-annotations
>   
> 

[jira] [Comment Edited] (MCOMPILER-481) JPMS Regression: cannot access (requires static module not include anymore)

2022-01-24 Thread Olivier Lamy (Jira)


[ 
https://issues.apache.org/jira/browse/MCOMPILER-481?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17481495#comment-17481495
 ] 

Olivier Lamy edited comment on MCOMPILER-481 at 1/25/22, 7:35 AM:
--

I find it strange we almost do not read anything from pom regarding (test?) 
dependencies.

Shouldn't we automatically add test dependencies coming from the pom  in 
module-path  for test?

not sure including static should be limited to test compilation only. If you 
look at the provided test project. not included static will fail compilation as 
there is 

requires static org.eclipse.jetty.util.ajax

and the dependency is marked as optional

but it's required for compilation.

 

 

 


was (Author: olamy):
I find it strange we almost do not read anything from pom regarding (test?) 
dependencies.

Shouldn't we automatically add test dependencies coming from the pom  in 
module-path  for test?

not sure including static should be limited to test compilation only. If you 
look at the provided test project. not included static will fail compilation as 
there is 

requires static org.eclipse.jetty.util.ajax

and the dependency is marked as optional

but it's required for compilation.

 

 

 

> JPMS Regression: cannot access  (requires static module not include 
> anymore)
> ---
>
> Key: MCOMPILER-481
> URL: https://issues.apache.org/jira/browse/MCOMPILER-481
> Project: Maven Compiler Plugin
>  Issue Type: Bug
>Affects Versions: 3.9.0
>Reporter: Simone Bordet
>Assignee: Olivier Lamy
>Priority: Major
> Fix For: 3.9.1
>
> Attachments: compiler-bug.tar.gz
>
>
> Version 3.8.1 is not affected.
> The problem lies in how the module-path is constructed by the 
> maven-compiler-plugin – not sure what changes from 3.8.1 caused this.
> In 3.8.1:
> {code:java}
> -d
>   /home/simon/tmp/compiler-bug/app/target/test-classes
> -classpath
>   /home/simon/tmp/compiler-bug/app/target/test-classes
>   
> /home/simon/.m2/repository/org/junit/jupiter/junit-jupiter-api/5.8.2/junit-jupiter-api-5.8.2.jar
>   
> /home/simon/.m2/repository/org/opentest4j/opentest4j/1.2.0/opentest4j-1.2.0.jar
>   
> /home/simon/.m2/repository/org/junit/platform/junit-platform-commons/1.8.2/junit-platform-commons-1.8.2.jar
>   
> /home/simon/.m2/repository/org/apiguardian/apiguardian-api/1.1.2/apiguardian-api-1.1.2.jar
>   
> --module-path
>   /home/simon/tmp/compiler-bug/app/target/classes
>   
> /home/simon/.m2/repository/org/example/compiler-bug-service/1.0-SNAPSHOT/compiler-bug-service-1.0-SNAPSHOT.jar
>   
> /home/simon/.m2/repository/org/eclipse/jetty/jetty-util-ajax/10.0.7/jetty-util-ajax-10.0.7.jar
>   
> /home/simon/.m2/repository/org/eclipse/jetty/jetty-util/10.0.7/jetty-util-10.0.7.jar
>   
> /home/simon/.m2/repository/org/slf4j/slf4j-api/2.0.0-alpha5/slf4j-api-2.0.0-alpha5.jar
>   
> -sourcepath
>   /home/simon/tmp/compiler-bug/app/src/test/java
>   
> /home/simon/tmp/compiler-bug/app/target/generated-test-sources/test-annotations
>   
> -s
>   
> /home/simon/tmp/compiler-bug/app/target/generated-test-sources/test-annotations
> -g
> -nowarn
> --release
>   11
> -encoding
>   UTF-8
> --patch-module
>   compiler.bug.app=/home/simon/tmp/compiler-bug/app/target/classes
>   /home/simon/tmp/compiler-bug/app/src/test/java
>   
> /home/simon/tmp/compiler-bug/app/target/generated-test-sources/test-annotations
>   
> --add-reads
>   compiler.bug.app=ALL-UNNAMED {code}
> In 3.9.0:
> {code:java}
> -d
>   /home/simon/tmp/compiler-bug/app/target/test-classes
> -classpath
>   /home/simon/tmp/compiler-bug/app/target/test-classes
>   
> /home/simon/.m2/repository/org/eclipse/jetty/jetty-util-ajax/10.0.7/jetty-util-ajax-10.0.7.jar
>   
> /home/simon/.m2/repository/org/eclipse/jetty/jetty-util/10.0.7/jetty-util-10.0.7.jar
>   
> /home/simon/.m2/repository/org/slf4j/slf4j-api/2.0.0-alpha5/slf4j-api-2.0.0-alpha5.jar
>   
> /home/simon/.m2/repository/org/junit/jupiter/junit-jupiter-api/5.8.2/junit-jupiter-api-5.8.2.jar
>   
> /home/simon/.m2/repository/org/opentest4j/opentest4j/1.2.0/opentest4j-1.2.0.jar
>   
> /home/simon/.m2/repository/org/junit/platform/junit-platform-commons/1.8.2/junit-platform-commons-1.8.2.jar
>   
> /home/simon/.m2/repository/org/apiguardian/apiguardian-api/1.1.2/apiguardian-api-1.1.2.jar
>   
> --module-path
>   /home/simon/tmp/compiler-bug/app/target/classes
>   
> /home/simon/.m2/repository/org/example/compiler-bug-service/1.0-SNAPSHOT/compiler-bug-service-1.0-SNAPSHOT.jar
>   
> -sourcepath
>   /home/simon/tmp/compiler-bug/app/src/test/java
>   
> /home/simon/tmp/compiler-bug/app/target/generated-test-sources/test-annotations
>   
> -s
>   
> /home/simon/tmp/compiler-bug/app/target/generated-test-sources/test-annotations
> -g
> -nowarn
> --release
>   11

[jira] [Comment Edited] (MCOMPILER-481) JPMS Regression: cannot access (requires static module not include anymore)

2022-01-24 Thread Olivier Lamy (Jira)


[ 
https://issues.apache.org/jira/browse/MCOMPILER-481?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17481495#comment-17481495
 ] 

Olivier Lamy edited comment on MCOMPILER-481 at 1/25/22, 2:25 AM:
--

I find it strange we almost do not read anything from pom regarding (test?) 
dependencies.

Shouldn't we automatically add test dependencies coming from the pom  in 
module-path  for test?

not sure including static should be limited to test compilation only. If you 
look at the provided test project. not included static will fail compilation as 
there is 

requires static org.eclipse.jetty.util.ajax

and the dependency is marked as optional

but it's required for compilation.

 

 

 


was (Author: olamy):
I find it strange we almost do not read anything from pom regarding (test?) 
dependencies.

Shouldn't we automatically add test dependencies coming from the pom  in 
module-path  for test?

> JPMS Regression: cannot access  (requires static module not include 
> anymore)
> ---
>
> Key: MCOMPILER-481
> URL: https://issues.apache.org/jira/browse/MCOMPILER-481
> Project: Maven Compiler Plugin
>  Issue Type: Bug
>Affects Versions: 3.9.0
>Reporter: Simone Bordet
>Assignee: Olivier Lamy
>Priority: Major
> Fix For: 3.9.1
>
> Attachments: compiler-bug.tar.gz
>
>
> Version 3.8.1 is not affected.
> The problem lies in how the module-path is constructed by the 
> maven-compiler-plugin – not sure what changes from 3.8.1 caused this.
> In 3.8.1:
> {code:java}
> -d
>   /home/simon/tmp/compiler-bug/app/target/test-classes
> -classpath
>   /home/simon/tmp/compiler-bug/app/target/test-classes
>   
> /home/simon/.m2/repository/org/junit/jupiter/junit-jupiter-api/5.8.2/junit-jupiter-api-5.8.2.jar
>   
> /home/simon/.m2/repository/org/opentest4j/opentest4j/1.2.0/opentest4j-1.2.0.jar
>   
> /home/simon/.m2/repository/org/junit/platform/junit-platform-commons/1.8.2/junit-platform-commons-1.8.2.jar
>   
> /home/simon/.m2/repository/org/apiguardian/apiguardian-api/1.1.2/apiguardian-api-1.1.2.jar
>   
> --module-path
>   /home/simon/tmp/compiler-bug/app/target/classes
>   
> /home/simon/.m2/repository/org/example/compiler-bug-service/1.0-SNAPSHOT/compiler-bug-service-1.0-SNAPSHOT.jar
>   
> /home/simon/.m2/repository/org/eclipse/jetty/jetty-util-ajax/10.0.7/jetty-util-ajax-10.0.7.jar
>   
> /home/simon/.m2/repository/org/eclipse/jetty/jetty-util/10.0.7/jetty-util-10.0.7.jar
>   
> /home/simon/.m2/repository/org/slf4j/slf4j-api/2.0.0-alpha5/slf4j-api-2.0.0-alpha5.jar
>   
> -sourcepath
>   /home/simon/tmp/compiler-bug/app/src/test/java
>   
> /home/simon/tmp/compiler-bug/app/target/generated-test-sources/test-annotations
>   
> -s
>   
> /home/simon/tmp/compiler-bug/app/target/generated-test-sources/test-annotations
> -g
> -nowarn
> --release
>   11
> -encoding
>   UTF-8
> --patch-module
>   compiler.bug.app=/home/simon/tmp/compiler-bug/app/target/classes
>   /home/simon/tmp/compiler-bug/app/src/test/java
>   
> /home/simon/tmp/compiler-bug/app/target/generated-test-sources/test-annotations
>   
> --add-reads
>   compiler.bug.app=ALL-UNNAMED {code}
> In 3.9.0:
> {code:java}
> -d
>   /home/simon/tmp/compiler-bug/app/target/test-classes
> -classpath
>   /home/simon/tmp/compiler-bug/app/target/test-classes
>   
> /home/simon/.m2/repository/org/eclipse/jetty/jetty-util-ajax/10.0.7/jetty-util-ajax-10.0.7.jar
>   
> /home/simon/.m2/repository/org/eclipse/jetty/jetty-util/10.0.7/jetty-util-10.0.7.jar
>   
> /home/simon/.m2/repository/org/slf4j/slf4j-api/2.0.0-alpha5/slf4j-api-2.0.0-alpha5.jar
>   
> /home/simon/.m2/repository/org/junit/jupiter/junit-jupiter-api/5.8.2/junit-jupiter-api-5.8.2.jar
>   
> /home/simon/.m2/repository/org/opentest4j/opentest4j/1.2.0/opentest4j-1.2.0.jar
>   
> /home/simon/.m2/repository/org/junit/platform/junit-platform-commons/1.8.2/junit-platform-commons-1.8.2.jar
>   
> /home/simon/.m2/repository/org/apiguardian/apiguardian-api/1.1.2/apiguardian-api-1.1.2.jar
>   
> --module-path
>   /home/simon/tmp/compiler-bug/app/target/classes
>   
> /home/simon/.m2/repository/org/example/compiler-bug-service/1.0-SNAPSHOT/compiler-bug-service-1.0-SNAPSHOT.jar
>   
> -sourcepath
>   /home/simon/tmp/compiler-bug/app/src/test/java
>   
> /home/simon/tmp/compiler-bug/app/target/generated-test-sources/test-annotations
>   
> -s
>   
> /home/simon/tmp/compiler-bug/app/target/generated-test-sources/test-annotations
> -g
> -nowarn
> --release
>   11
> -encoding
>   UTF-8
> --patch-module
>   compiler.bug.app=/home/simon/tmp/compiler-bug/app/target/classes
>   /home/simon/tmp/compiler-bug/app/src/test/java
>   
> /home/simon/tmp/compiler-bug/app/target/generated-test-sources/test-annotations
>   
> --add-reads
>   compiler.bug.app=ALL-UNNAMED 

[jira] [Comment Edited] (MCOMPILER-481) JPMS Regression: cannot access (requires static module not include anymore)

2022-01-21 Thread Simone Bordet (Jira)


[ 
https://issues.apache.org/jira/browse/MCOMPILER-481?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17480228#comment-17480228
 ] 

Simone Bordet edited comment on MCOMPILER-481 at 1/21/22, 6:47 PM:
---

There was a reply in the compiler-dev thread.

IIUC, when the {{compiler.bug.service}} module is imported as a dependency, it 
does not import (because it's a {{requires static}}) the {{jetty-util-ajax}} 
jar.

So when compiling the module {{compiler.bug.app,}} the "app" module sees the 
{{JSON}} class because of {{-add-reads compiler.bug.app=ALL-UNNAMED}}, but 
the "service" module still does not see it because it's not in the module-path 
and neither there is an {{-add-reads}} for the "service" module.

So it seems a legit Maven Compiler Plugin issue/ feature that needs to be 
supported.

In light of this information, is my algorithm or [~rfscholte]'s algorithm the 
right solution, or something else?


was (Author: sbordet):
There was a reply in the compiler-dev thread.

IIUC, when the {{compiler.bug.service}} module is imported as a dependency, it 
does not import (because it's a {{requires static}}) the {{jetty-util-ajax}} 
jar.

So when compiling the module {{compiler.bug.app,}} the "app" module sees the 
{{JSON}} class because of {{-add-reads compiler.bug.app=ALL-UNNAMED}}, but 
the "service" module still does not see it because it's not in the module-path 
and neither there is an {{-add-reads}} for the "service" module.

So it seems a legit Maven Compiler Plugin issue/ feature that needs to be 
supported.

In light of this information, is my algorithm or [~rfscholte]'s algorithm the 
right solution?

> JPMS Regression: cannot access  (requires static module not include 
> anymore)
> ---
>
> Key: MCOMPILER-481
> URL: https://issues.apache.org/jira/browse/MCOMPILER-481
> Project: Maven Compiler Plugin
>  Issue Type: Bug
>Affects Versions: 3.9.0
>Reporter: Simone Bordet
>Assignee: Olivier Lamy
>Priority: Major
> Fix For: 3.9.1
>
> Attachments: compiler-bug.tar.gz
>
>
> Version 3.8.1 is not affected.
> The problem lies in how the module-path is constructed by the 
> maven-compiler-plugin – not sure what changes from 3.8.1 caused this.
> In 3.8.1:
> {code:java}
> -d
>   /home/simon/tmp/compiler-bug/app/target/test-classes
> -classpath
>   /home/simon/tmp/compiler-bug/app/target/test-classes
>   
> /home/simon/.m2/repository/org/junit/jupiter/junit-jupiter-api/5.8.2/junit-jupiter-api-5.8.2.jar
>   
> /home/simon/.m2/repository/org/opentest4j/opentest4j/1.2.0/opentest4j-1.2.0.jar
>   
> /home/simon/.m2/repository/org/junit/platform/junit-platform-commons/1.8.2/junit-platform-commons-1.8.2.jar
>   
> /home/simon/.m2/repository/org/apiguardian/apiguardian-api/1.1.2/apiguardian-api-1.1.2.jar
>   
> --module-path
>   /home/simon/tmp/compiler-bug/app/target/classes
>   
> /home/simon/.m2/repository/org/example/compiler-bug-service/1.0-SNAPSHOT/compiler-bug-service-1.0-SNAPSHOT.jar
>   
> /home/simon/.m2/repository/org/eclipse/jetty/jetty-util-ajax/10.0.7/jetty-util-ajax-10.0.7.jar
>   
> /home/simon/.m2/repository/org/eclipse/jetty/jetty-util/10.0.7/jetty-util-10.0.7.jar
>   
> /home/simon/.m2/repository/org/slf4j/slf4j-api/2.0.0-alpha5/slf4j-api-2.0.0-alpha5.jar
>   
> -sourcepath
>   /home/simon/tmp/compiler-bug/app/src/test/java
>   
> /home/simon/tmp/compiler-bug/app/target/generated-test-sources/test-annotations
>   
> -s
>   
> /home/simon/tmp/compiler-bug/app/target/generated-test-sources/test-annotations
> -g
> -nowarn
> --release
>   11
> -encoding
>   UTF-8
> --patch-module
>   compiler.bug.app=/home/simon/tmp/compiler-bug/app/target/classes
>   /home/simon/tmp/compiler-bug/app/src/test/java
>   
> /home/simon/tmp/compiler-bug/app/target/generated-test-sources/test-annotations
>   
> --add-reads
>   compiler.bug.app=ALL-UNNAMED {code}
> In 3.9.0:
> {code:java}
> -d
>   /home/simon/tmp/compiler-bug/app/target/test-classes
> -classpath
>   /home/simon/tmp/compiler-bug/app/target/test-classes
>   
> /home/simon/.m2/repository/org/eclipse/jetty/jetty-util-ajax/10.0.7/jetty-util-ajax-10.0.7.jar
>   
> /home/simon/.m2/repository/org/eclipse/jetty/jetty-util/10.0.7/jetty-util-10.0.7.jar
>   
> /home/simon/.m2/repository/org/slf4j/slf4j-api/2.0.0-alpha5/slf4j-api-2.0.0-alpha5.jar
>   
> /home/simon/.m2/repository/org/junit/jupiter/junit-jupiter-api/5.8.2/junit-jupiter-api-5.8.2.jar
>   
> /home/simon/.m2/repository/org/opentest4j/opentest4j/1.2.0/opentest4j-1.2.0.jar
>   
> /home/simon/.m2/repository/org/junit/platform/junit-platform-commons/1.8.2/junit-platform-commons-1.8.2.jar
>   
> /home/simon/.m2/repository/org/apiguardian/apiguardian-api/1.1.2/apiguardian-api-1.1.2.jar
>   
> --module-path
>   

[jira] [Comment Edited] (MCOMPILER-481) JPMS Regression: cannot access (requires static module not include anymore)

2022-01-21 Thread Simone Bordet (Jira)


[ 
https://issues.apache.org/jira/browse/MCOMPILER-481?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17480228#comment-17480228
 ] 

Simone Bordet edited comment on MCOMPILER-481 at 1/21/22, 6:47 PM:
---

There was a reply in the compiler-dev thread.

IIUC, when the {{compiler.bug.service}} module is imported as a dependency, it 
does not import (because it's a {{requires static}}) the {{jetty-util-ajax}} 
jar.

So when compiling the module {{compiler.bug.app,}} the "app" module sees the 
{{JSON}} class because of {{-add-reads compiler.bug.app=ALL-UNNAMED}}, but 
the "service" module still does not see it because it's not in the module-path 
and neither there is an {{-add-reads}} for the "service" module.

So it seems a legit Maven Compiler Plugin issue/ feature that needs to be 
supported.

In light of this information, is my algorithm or [~rfscholte]'s algorithm the 
right solution?


was (Author: sbordet):
There was a reply in the compiler-dev thread.

IIUC, when the {{compiler.bug.service}} module is imported as a dependency, it 
does not import (because it's a {{requires static}}) the {{jetty-util-ajax}} 
jar.

So when compiling the module {{compiler.bug.app,}} the "app" module sees the 
{{JSON}} class because of {{-add-reads compiler.bug.app=ALL-UNNAMED }}, 
but the "service" module still does not see it because it's not in the 
module-path and neither there is an {{-add-reads}} for the "service" 
module.

So it seems a legit Maven Compiler Plugin issue/ feature that needs to be 
supported.

In light of this information, is my algorithm or [~rfscholte]'s algorithm the 
right solution?

> JPMS Regression: cannot access  (requires static module not include 
> anymore)
> ---
>
> Key: MCOMPILER-481
> URL: https://issues.apache.org/jira/browse/MCOMPILER-481
> Project: Maven Compiler Plugin
>  Issue Type: Bug
>Affects Versions: 3.9.0
>Reporter: Simone Bordet
>Assignee: Olivier Lamy
>Priority: Major
> Fix For: 3.9.1
>
> Attachments: compiler-bug.tar.gz
>
>
> Version 3.8.1 is not affected.
> The problem lies in how the module-path is constructed by the 
> maven-compiler-plugin – not sure what changes from 3.8.1 caused this.
> In 3.8.1:
> {code:java}
> -d
>   /home/simon/tmp/compiler-bug/app/target/test-classes
> -classpath
>   /home/simon/tmp/compiler-bug/app/target/test-classes
>   
> /home/simon/.m2/repository/org/junit/jupiter/junit-jupiter-api/5.8.2/junit-jupiter-api-5.8.2.jar
>   
> /home/simon/.m2/repository/org/opentest4j/opentest4j/1.2.0/opentest4j-1.2.0.jar
>   
> /home/simon/.m2/repository/org/junit/platform/junit-platform-commons/1.8.2/junit-platform-commons-1.8.2.jar
>   
> /home/simon/.m2/repository/org/apiguardian/apiguardian-api/1.1.2/apiguardian-api-1.1.2.jar
>   
> --module-path
>   /home/simon/tmp/compiler-bug/app/target/classes
>   
> /home/simon/.m2/repository/org/example/compiler-bug-service/1.0-SNAPSHOT/compiler-bug-service-1.0-SNAPSHOT.jar
>   
> /home/simon/.m2/repository/org/eclipse/jetty/jetty-util-ajax/10.0.7/jetty-util-ajax-10.0.7.jar
>   
> /home/simon/.m2/repository/org/eclipse/jetty/jetty-util/10.0.7/jetty-util-10.0.7.jar
>   
> /home/simon/.m2/repository/org/slf4j/slf4j-api/2.0.0-alpha5/slf4j-api-2.0.0-alpha5.jar
>   
> -sourcepath
>   /home/simon/tmp/compiler-bug/app/src/test/java
>   
> /home/simon/tmp/compiler-bug/app/target/generated-test-sources/test-annotations
>   
> -s
>   
> /home/simon/tmp/compiler-bug/app/target/generated-test-sources/test-annotations
> -g
> -nowarn
> --release
>   11
> -encoding
>   UTF-8
> --patch-module
>   compiler.bug.app=/home/simon/tmp/compiler-bug/app/target/classes
>   /home/simon/tmp/compiler-bug/app/src/test/java
>   
> /home/simon/tmp/compiler-bug/app/target/generated-test-sources/test-annotations
>   
> --add-reads
>   compiler.bug.app=ALL-UNNAMED {code}
> In 3.9.0:
> {code:java}
> -d
>   /home/simon/tmp/compiler-bug/app/target/test-classes
> -classpath
>   /home/simon/tmp/compiler-bug/app/target/test-classes
>   
> /home/simon/.m2/repository/org/eclipse/jetty/jetty-util-ajax/10.0.7/jetty-util-ajax-10.0.7.jar
>   
> /home/simon/.m2/repository/org/eclipse/jetty/jetty-util/10.0.7/jetty-util-10.0.7.jar
>   
> /home/simon/.m2/repository/org/slf4j/slf4j-api/2.0.0-alpha5/slf4j-api-2.0.0-alpha5.jar
>   
> /home/simon/.m2/repository/org/junit/jupiter/junit-jupiter-api/5.8.2/junit-jupiter-api-5.8.2.jar
>   
> /home/simon/.m2/repository/org/opentest4j/opentest4j/1.2.0/opentest4j-1.2.0.jar
>   
> /home/simon/.m2/repository/org/junit/platform/junit-platform-commons/1.8.2/junit-platform-commons-1.8.2.jar
>   
> /home/simon/.m2/repository/org/apiguardian/apiguardian-api/1.1.2/apiguardian-api-1.1.2.jar
>   
> --module-path
>   

[jira] [Comment Edited] (MCOMPILER-481) JPMS Regression: cannot access (requires static module not include anymore)

2022-01-21 Thread Simone Bordet (Jira)


[ 
https://issues.apache.org/jira/browse/MCOMPILER-481?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17480228#comment-17480228
 ] 

Simone Bordet edited comment on MCOMPILER-481 at 1/21/22, 6:46 PM:
---

There was a reply in the compiler-dev thread.

IIUC, when the {{compiler.bug.service}} module is imported as a dependency, it 
does not import (because it's a {{requires static}}) the {{jetty-util-ajax}} 
jar.

So when compiling the module {{compiler.bug.app,}} the "app" module sees the 
{{JSON}} class because of {{-add-reads compiler.bug.app=ALL-UNNAMED }}, 
but the "service" module still does not see it because it's not in the 
module-path and neither there is an {{-add-reads}} for the "service" 
module.

So it seems a legit Maven Compiler Plugin issue/ feature that needs to be 
supported.

In light of this information, is my algorithm or [~rfscholte]'s algorithm the 
right solution?


was (Author: sbordet):
There was a reply in the compiler-dev thread.

IIUC, when the {{compiler.bug.service}} module is imported as a dependency, it 
does not import (because it's a {{requires static}}) the {{jetty-util-ajax}} 
jar.

So when compiling the module {{compiler.bug.app,}} the "app" module sees the 
{{JSON}} class because of {{ --add-reads compiler.bug.app=ALL-UNNAMED }}, but 
the "service" module still does not see it because it's not in the module-path 
and neither there is an {{--add-reads}} for the "service" module.

So it seems a legit Maven Compiler Plugin issue/ feature that needs to be 
supported.

In light of this information, is my algorithm or [~rfscholte]'s algorithm the 
right solution?

> JPMS Regression: cannot access  (requires static module not include 
> anymore)
> ---
>
> Key: MCOMPILER-481
> URL: https://issues.apache.org/jira/browse/MCOMPILER-481
> Project: Maven Compiler Plugin
>  Issue Type: Bug
>Affects Versions: 3.9.0
>Reporter: Simone Bordet
>Assignee: Olivier Lamy
>Priority: Major
> Fix For: 3.9.1
>
> Attachments: compiler-bug.tar.gz
>
>
> Version 3.8.1 is not affected.
> The problem lies in how the module-path is constructed by the 
> maven-compiler-plugin – not sure what changes from 3.8.1 caused this.
> In 3.8.1:
> {code:java}
> -d
>   /home/simon/tmp/compiler-bug/app/target/test-classes
> -classpath
>   /home/simon/tmp/compiler-bug/app/target/test-classes
>   
> /home/simon/.m2/repository/org/junit/jupiter/junit-jupiter-api/5.8.2/junit-jupiter-api-5.8.2.jar
>   
> /home/simon/.m2/repository/org/opentest4j/opentest4j/1.2.0/opentest4j-1.2.0.jar
>   
> /home/simon/.m2/repository/org/junit/platform/junit-platform-commons/1.8.2/junit-platform-commons-1.8.2.jar
>   
> /home/simon/.m2/repository/org/apiguardian/apiguardian-api/1.1.2/apiguardian-api-1.1.2.jar
>   
> --module-path
>   /home/simon/tmp/compiler-bug/app/target/classes
>   
> /home/simon/.m2/repository/org/example/compiler-bug-service/1.0-SNAPSHOT/compiler-bug-service-1.0-SNAPSHOT.jar
>   
> /home/simon/.m2/repository/org/eclipse/jetty/jetty-util-ajax/10.0.7/jetty-util-ajax-10.0.7.jar
>   
> /home/simon/.m2/repository/org/eclipse/jetty/jetty-util/10.0.7/jetty-util-10.0.7.jar
>   
> /home/simon/.m2/repository/org/slf4j/slf4j-api/2.0.0-alpha5/slf4j-api-2.0.0-alpha5.jar
>   
> -sourcepath
>   /home/simon/tmp/compiler-bug/app/src/test/java
>   
> /home/simon/tmp/compiler-bug/app/target/generated-test-sources/test-annotations
>   
> -s
>   
> /home/simon/tmp/compiler-bug/app/target/generated-test-sources/test-annotations
> -g
> -nowarn
> --release
>   11
> -encoding
>   UTF-8
> --patch-module
>   compiler.bug.app=/home/simon/tmp/compiler-bug/app/target/classes
>   /home/simon/tmp/compiler-bug/app/src/test/java
>   
> /home/simon/tmp/compiler-bug/app/target/generated-test-sources/test-annotations
>   
> --add-reads
>   compiler.bug.app=ALL-UNNAMED {code}
> In 3.9.0:
> {code:java}
> -d
>   /home/simon/tmp/compiler-bug/app/target/test-classes
> -classpath
>   /home/simon/tmp/compiler-bug/app/target/test-classes
>   
> /home/simon/.m2/repository/org/eclipse/jetty/jetty-util-ajax/10.0.7/jetty-util-ajax-10.0.7.jar
>   
> /home/simon/.m2/repository/org/eclipse/jetty/jetty-util/10.0.7/jetty-util-10.0.7.jar
>   
> /home/simon/.m2/repository/org/slf4j/slf4j-api/2.0.0-alpha5/slf4j-api-2.0.0-alpha5.jar
>   
> /home/simon/.m2/repository/org/junit/jupiter/junit-jupiter-api/5.8.2/junit-jupiter-api-5.8.2.jar
>   
> /home/simon/.m2/repository/org/opentest4j/opentest4j/1.2.0/opentest4j-1.2.0.jar
>   
> /home/simon/.m2/repository/org/junit/platform/junit-platform-commons/1.8.2/junit-platform-commons-1.8.2.jar
>   
> /home/simon/.m2/repository/org/apiguardian/apiguardian-api/1.1.2/apiguardian-api-1.1.2.jar
>   
> --module-path
>   

[jira] [Comment Edited] (MCOMPILER-481) JPMS Regression: cannot access (requires static module not include anymore)

2022-01-21 Thread Simone Bordet (Jira)


[ 
https://issues.apache.org/jira/browse/MCOMPILER-481?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17480228#comment-17480228
 ] 

Simone Bordet edited comment on MCOMPILER-481 at 1/21/22, 6:44 PM:
---

There was a reply in the compiler-dev thread.

IIUC, when the {{compiler.bug.service}} module is imported as a dependency, it 
does not import (because it's a {{requires static}}) the {{jetty-util-ajax}} 
jar.

So when compiling the module {{compiler.bug.app,}} the "app" module sees the 
{{JSON}} class because of {{ --add-reads compiler.bug.app=ALL-UNNAMED }}, but 
the "service" module still does not see it because it's not in the module-path 
and neither there is an {{--add-reads}} for the "service" module.

So it seems a legit Maven Compiler Plugin issue/ feature that needs to be 
supported.

In light of this information, is my algorithm or [~rfscholte]'s algorithm the 
right solution?


was (Author: sbordet):
There was a reply in the compiler-dev thread.

IIUC, when the {{compiler.bug.service}} module is imported as a dependency, it 
does not import (because it's a {{{}requires static{}}}) the 
{{jetty-util-ajax}} jar.

So when compiling the module {{compiler.bug.app,}} the "app" module sees the 
{{JSON}} class because of {{\--add-reads compiler.bug.app=ALL-UNNAMED}}, but 
the "service" module still does not see it because it's not in the module-path 
and neither there is an {{--add-reads}} for the "service" module.

So it seems a legit Maven Compiler Plugin issue/ feature that needs to be 
supported.

In light of this information, is my algorithm or [~rfscholte]'s algorithm the 
right solution?

> JPMS Regression: cannot access  (requires static module not include 
> anymore)
> ---
>
> Key: MCOMPILER-481
> URL: https://issues.apache.org/jira/browse/MCOMPILER-481
> Project: Maven Compiler Plugin
>  Issue Type: Bug
>Affects Versions: 3.9.0
>Reporter: Simone Bordet
>Assignee: Olivier Lamy
>Priority: Major
> Fix For: 3.9.1
>
> Attachments: compiler-bug.tar.gz
>
>
> Version 3.8.1 is not affected.
> The problem lies in how the module-path is constructed by the 
> maven-compiler-plugin – not sure what changes from 3.8.1 caused this.
> In 3.8.1:
> {code:java}
> -d
>   /home/simon/tmp/compiler-bug/app/target/test-classes
> -classpath
>   /home/simon/tmp/compiler-bug/app/target/test-classes
>   
> /home/simon/.m2/repository/org/junit/jupiter/junit-jupiter-api/5.8.2/junit-jupiter-api-5.8.2.jar
>   
> /home/simon/.m2/repository/org/opentest4j/opentest4j/1.2.0/opentest4j-1.2.0.jar
>   
> /home/simon/.m2/repository/org/junit/platform/junit-platform-commons/1.8.2/junit-platform-commons-1.8.2.jar
>   
> /home/simon/.m2/repository/org/apiguardian/apiguardian-api/1.1.2/apiguardian-api-1.1.2.jar
>   
> --module-path
>   /home/simon/tmp/compiler-bug/app/target/classes
>   
> /home/simon/.m2/repository/org/example/compiler-bug-service/1.0-SNAPSHOT/compiler-bug-service-1.0-SNAPSHOT.jar
>   
> /home/simon/.m2/repository/org/eclipse/jetty/jetty-util-ajax/10.0.7/jetty-util-ajax-10.0.7.jar
>   
> /home/simon/.m2/repository/org/eclipse/jetty/jetty-util/10.0.7/jetty-util-10.0.7.jar
>   
> /home/simon/.m2/repository/org/slf4j/slf4j-api/2.0.0-alpha5/slf4j-api-2.0.0-alpha5.jar
>   
> -sourcepath
>   /home/simon/tmp/compiler-bug/app/src/test/java
>   
> /home/simon/tmp/compiler-bug/app/target/generated-test-sources/test-annotations
>   
> -s
>   
> /home/simon/tmp/compiler-bug/app/target/generated-test-sources/test-annotations
> -g
> -nowarn
> --release
>   11
> -encoding
>   UTF-8
> --patch-module
>   compiler.bug.app=/home/simon/tmp/compiler-bug/app/target/classes
>   /home/simon/tmp/compiler-bug/app/src/test/java
>   
> /home/simon/tmp/compiler-bug/app/target/generated-test-sources/test-annotations
>   
> --add-reads
>   compiler.bug.app=ALL-UNNAMED {code}
> In 3.9.0:
> {code:java}
> -d
>   /home/simon/tmp/compiler-bug/app/target/test-classes
> -classpath
>   /home/simon/tmp/compiler-bug/app/target/test-classes
>   
> /home/simon/.m2/repository/org/eclipse/jetty/jetty-util-ajax/10.0.7/jetty-util-ajax-10.0.7.jar
>   
> /home/simon/.m2/repository/org/eclipse/jetty/jetty-util/10.0.7/jetty-util-10.0.7.jar
>   
> /home/simon/.m2/repository/org/slf4j/slf4j-api/2.0.0-alpha5/slf4j-api-2.0.0-alpha5.jar
>   
> /home/simon/.m2/repository/org/junit/jupiter/junit-jupiter-api/5.8.2/junit-jupiter-api-5.8.2.jar
>   
> /home/simon/.m2/repository/org/opentest4j/opentest4j/1.2.0/opentest4j-1.2.0.jar
>   
> /home/simon/.m2/repository/org/junit/platform/junit-platform-commons/1.8.2/junit-platform-commons-1.8.2.jar
>   
> /home/simon/.m2/repository/org/apiguardian/apiguardian-api/1.1.2/apiguardian-api-1.1.2.jar
>   
> --module-path
>   

[jira] [Comment Edited] (MCOMPILER-481) JPMS Regression: cannot access (requires static module not include anymore)

2022-01-21 Thread Simone Bordet (Jira)


[ 
https://issues.apache.org/jira/browse/MCOMPILER-481?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17480228#comment-17480228
 ] 

Simone Bordet edited comment on MCOMPILER-481 at 1/21/22, 6:44 PM:
---

There was a reply in the compiler-dev thread.

IIUC, when the {{compiler.bug.service}} module is imported as a dependency, it 
does not import (because it's a {{{}requires static{}}}) the 
{{jetty-util-ajax}} jar.

So when compiling the module {{compiler.bug.app,}} the "app" module sees the 
{{JSON}} class because of {{\--add-reads compiler.bug.app=ALL-UNNAMED}}, but 
the "service" module still does not see it because it's not in the module-path 
and neither there is an {{--add-reads}} for the "service" module.

So it seems a legit Maven Compiler Plugin issue/ feature that needs to be 
supported.

In light of this information, is my algorithm or [~rfscholte]'s algorithm the 
right solution?


was (Author: sbordet):
There was a reply in the compiler-dev thread.

IIUC, when the {{compiler.bug.service}} module is imported as a dependency, it 
does not import (because it's a {{{}requires static{}}}) the 
{{jetty-util-ajax}} jar.

So when compiling the module {{compiler.bug.app,}} the "app" module sees the 
{{JSON}} class because of {{--add-reads compiler.bug.app=ALL-UNNAMED}}, but the 
"service" module still does not see it because it's not in the module-path and 
neither there is an {{--add-reads}} for the "service" module.

So it seems a legit Maven Compiler Plugin issue/ feature that needs to be 
supported.

In light of this information, is my algorithm or [~rfscholte]'s algorithm the 
right solution?

> JPMS Regression: cannot access  (requires static module not include 
> anymore)
> ---
>
> Key: MCOMPILER-481
> URL: https://issues.apache.org/jira/browse/MCOMPILER-481
> Project: Maven Compiler Plugin
>  Issue Type: Bug
>Affects Versions: 3.9.0
>Reporter: Simone Bordet
>Assignee: Olivier Lamy
>Priority: Major
> Fix For: 3.9.1
>
> Attachments: compiler-bug.tar.gz
>
>
> Version 3.8.1 is not affected.
> The problem lies in how the module-path is constructed by the 
> maven-compiler-plugin – not sure what changes from 3.8.1 caused this.
> In 3.8.1:
> {code:java}
> -d
>   /home/simon/tmp/compiler-bug/app/target/test-classes
> -classpath
>   /home/simon/tmp/compiler-bug/app/target/test-classes
>   
> /home/simon/.m2/repository/org/junit/jupiter/junit-jupiter-api/5.8.2/junit-jupiter-api-5.8.2.jar
>   
> /home/simon/.m2/repository/org/opentest4j/opentest4j/1.2.0/opentest4j-1.2.0.jar
>   
> /home/simon/.m2/repository/org/junit/platform/junit-platform-commons/1.8.2/junit-platform-commons-1.8.2.jar
>   
> /home/simon/.m2/repository/org/apiguardian/apiguardian-api/1.1.2/apiguardian-api-1.1.2.jar
>   
> --module-path
>   /home/simon/tmp/compiler-bug/app/target/classes
>   
> /home/simon/.m2/repository/org/example/compiler-bug-service/1.0-SNAPSHOT/compiler-bug-service-1.0-SNAPSHOT.jar
>   
> /home/simon/.m2/repository/org/eclipse/jetty/jetty-util-ajax/10.0.7/jetty-util-ajax-10.0.7.jar
>   
> /home/simon/.m2/repository/org/eclipse/jetty/jetty-util/10.0.7/jetty-util-10.0.7.jar
>   
> /home/simon/.m2/repository/org/slf4j/slf4j-api/2.0.0-alpha5/slf4j-api-2.0.0-alpha5.jar
>   
> -sourcepath
>   /home/simon/tmp/compiler-bug/app/src/test/java
>   
> /home/simon/tmp/compiler-bug/app/target/generated-test-sources/test-annotations
>   
> -s
>   
> /home/simon/tmp/compiler-bug/app/target/generated-test-sources/test-annotations
> -g
> -nowarn
> --release
>   11
> -encoding
>   UTF-8
> --patch-module
>   compiler.bug.app=/home/simon/tmp/compiler-bug/app/target/classes
>   /home/simon/tmp/compiler-bug/app/src/test/java
>   
> /home/simon/tmp/compiler-bug/app/target/generated-test-sources/test-annotations
>   
> --add-reads
>   compiler.bug.app=ALL-UNNAMED {code}
> In 3.9.0:
> {code:java}
> -d
>   /home/simon/tmp/compiler-bug/app/target/test-classes
> -classpath
>   /home/simon/tmp/compiler-bug/app/target/test-classes
>   
> /home/simon/.m2/repository/org/eclipse/jetty/jetty-util-ajax/10.0.7/jetty-util-ajax-10.0.7.jar
>   
> /home/simon/.m2/repository/org/eclipse/jetty/jetty-util/10.0.7/jetty-util-10.0.7.jar
>   
> /home/simon/.m2/repository/org/slf4j/slf4j-api/2.0.0-alpha5/slf4j-api-2.0.0-alpha5.jar
>   
> /home/simon/.m2/repository/org/junit/jupiter/junit-jupiter-api/5.8.2/junit-jupiter-api-5.8.2.jar
>   
> /home/simon/.m2/repository/org/opentest4j/opentest4j/1.2.0/opentest4j-1.2.0.jar
>   
> /home/simon/.m2/repository/org/junit/platform/junit-platform-commons/1.8.2/junit-platform-commons-1.8.2.jar
>   
> /home/simon/.m2/repository/org/apiguardian/apiguardian-api/1.1.2/apiguardian-api-1.1.2.jar
>   
> --module-path
>   

[jira] [Comment Edited] (MCOMPILER-481) JPMS Regression: cannot access (requires static module not include anymore)

2022-01-21 Thread Simone Bordet (Jira)


[ 
https://issues.apache.org/jira/browse/MCOMPILER-481?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17480228#comment-17480228
 ] 

Simone Bordet edited comment on MCOMPILER-481 at 1/21/22, 6:43 PM:
---

There was a reply in the compiler-dev thread.

IIUC, when the {{compiler.bug.service}} module is imported as a dependency, it 
does not import (because it's a {{{}requires static{}}}) the 
{{jetty-util-ajax}} jar.

So when compiling the module {{compiler.bug.app,}} the "app" module sees the 
{{JSON}} class because of {{--add-reads compiler.bug.app=ALL-UNNAMED}}, but the 
"service" module still does not see it because it's not in the module-path and 
neither there is an {{--add-reads}} for the "service" module.

So it seems a legit Maven Compiler Plugin issue/ feature that needs to be 
supported.

In light of this information, is my algorithm or [~rfscholte]'s algorithm the 
right solution?


was (Author: sbordet):
There was a reply in the compiler-dev thread.

IIUC, when the {{compiler.bug.service}} module is imported as a dependency, it 
does not import (because it's a {{{}requires static{}}}) the 
{{jetty-util-ajax}} jar.

So when compiling the module {{compiler.bug.app,}} the "app" module sees the 
{{JSON}} class because of {{--add-reads compiler.bug.app=ALL-UNNAMED{}}}, but 
the "service" module still does not see it because it's not in the module-path 
and neither there is an {{--add-reads}} for the "service" module.

So it seems a legit Maven Compiler Plugin issue/ feature that needs to be 
supported.

In light of this information, is my algorithm or [~rfscholte]'s algorithm the 
right solution?

> JPMS Regression: cannot access  (requires static module not include 
> anymore)
> ---
>
> Key: MCOMPILER-481
> URL: https://issues.apache.org/jira/browse/MCOMPILER-481
> Project: Maven Compiler Plugin
>  Issue Type: Bug
>Affects Versions: 3.9.0
>Reporter: Simone Bordet
>Assignee: Olivier Lamy
>Priority: Major
> Fix For: 3.9.1
>
> Attachments: compiler-bug.tar.gz
>
>
> Version 3.8.1 is not affected.
> The problem lies in how the module-path is constructed by the 
> maven-compiler-plugin – not sure what changes from 3.8.1 caused this.
> In 3.8.1:
> {code:java}
> -d
>   /home/simon/tmp/compiler-bug/app/target/test-classes
> -classpath
>   /home/simon/tmp/compiler-bug/app/target/test-classes
>   
> /home/simon/.m2/repository/org/junit/jupiter/junit-jupiter-api/5.8.2/junit-jupiter-api-5.8.2.jar
>   
> /home/simon/.m2/repository/org/opentest4j/opentest4j/1.2.0/opentest4j-1.2.0.jar
>   
> /home/simon/.m2/repository/org/junit/platform/junit-platform-commons/1.8.2/junit-platform-commons-1.8.2.jar
>   
> /home/simon/.m2/repository/org/apiguardian/apiguardian-api/1.1.2/apiguardian-api-1.1.2.jar
>   
> --module-path
>   /home/simon/tmp/compiler-bug/app/target/classes
>   
> /home/simon/.m2/repository/org/example/compiler-bug-service/1.0-SNAPSHOT/compiler-bug-service-1.0-SNAPSHOT.jar
>   
> /home/simon/.m2/repository/org/eclipse/jetty/jetty-util-ajax/10.0.7/jetty-util-ajax-10.0.7.jar
>   
> /home/simon/.m2/repository/org/eclipse/jetty/jetty-util/10.0.7/jetty-util-10.0.7.jar
>   
> /home/simon/.m2/repository/org/slf4j/slf4j-api/2.0.0-alpha5/slf4j-api-2.0.0-alpha5.jar
>   
> -sourcepath
>   /home/simon/tmp/compiler-bug/app/src/test/java
>   
> /home/simon/tmp/compiler-bug/app/target/generated-test-sources/test-annotations
>   
> -s
>   
> /home/simon/tmp/compiler-bug/app/target/generated-test-sources/test-annotations
> -g
> -nowarn
> --release
>   11
> -encoding
>   UTF-8
> --patch-module
>   compiler.bug.app=/home/simon/tmp/compiler-bug/app/target/classes
>   /home/simon/tmp/compiler-bug/app/src/test/java
>   
> /home/simon/tmp/compiler-bug/app/target/generated-test-sources/test-annotations
>   
> --add-reads
>   compiler.bug.app=ALL-UNNAMED {code}
> In 3.9.0:
> {code:java}
> -d
>   /home/simon/tmp/compiler-bug/app/target/test-classes
> -classpath
>   /home/simon/tmp/compiler-bug/app/target/test-classes
>   
> /home/simon/.m2/repository/org/eclipse/jetty/jetty-util-ajax/10.0.7/jetty-util-ajax-10.0.7.jar
>   
> /home/simon/.m2/repository/org/eclipse/jetty/jetty-util/10.0.7/jetty-util-10.0.7.jar
>   
> /home/simon/.m2/repository/org/slf4j/slf4j-api/2.0.0-alpha5/slf4j-api-2.0.0-alpha5.jar
>   
> /home/simon/.m2/repository/org/junit/jupiter/junit-jupiter-api/5.8.2/junit-jupiter-api-5.8.2.jar
>   
> /home/simon/.m2/repository/org/opentest4j/opentest4j/1.2.0/opentest4j-1.2.0.jar
>   
> /home/simon/.m2/repository/org/junit/platform/junit-platform-commons/1.8.2/junit-platform-commons-1.8.2.jar
>   
> /home/simon/.m2/repository/org/apiguardian/apiguardian-api/1.1.2/apiguardian-api-1.1.2.jar
>   
> --module-path
>   

[jira] [Comment Edited] (MCOMPILER-481) JPMS Regression: cannot access (requires static module not include anymore)

2022-01-21 Thread Simone Bordet (Jira)


[ 
https://issues.apache.org/jira/browse/MCOMPILER-481?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17480228#comment-17480228
 ] 

Simone Bordet edited comment on MCOMPILER-481 at 1/21/22, 6:43 PM:
---

There was a reply in the compiler-dev thread.

IIUC, when the {{compiler.bug.service}} module is imported as a dependency, it 
does not import (because it's a {{{}requires static{}}}) the 
{{jetty-util-ajax}} jar.

So when compiling the module {{compiler.bug.app,}} the "app" module sees the 
{{JSON}} class because of {{--add-reads compiler.bug.app=ALL-UNNAMED{}}}, but 
the "service" module still does not see it because it's not in the module-path 
and neither there is an {{--add-reads}} for the "service" module.

So it seems a legit Maven Compiler Plugin issue/ feature that needs to be 
supported.

In light of this information, is my algorithm or [~rfscholte]'s algorithm the 
right solution?


was (Author: sbordet):
There was a reply in the compiler-dev thread.

IIUC, when the {{compiler.bug.service}} module is imported as a dependency, it 
does not import (because it's a {{{}requires static{}}}) the 
{{jetty-util-ajax}} jar.

So when compiling the module {{compiler.bug.app,}} the "app" module sees the 
{{JSON}} class because of {{{}--add-reads compiler.bug.app=ALL-UNNAMED{}}}, but 
the "service" module still does not see it because it's not in the module-path 
and neither there is an {{--add-reads}} for the "service" module.

So it seems a legit Maven Compiler Plugin issue/ feature that needs to be 
supported.

In light of this information, is my algorithm or [~rfscholte]'s algorithm the 
right solution?

> JPMS Regression: cannot access  (requires static module not include 
> anymore)
> ---
>
> Key: MCOMPILER-481
> URL: https://issues.apache.org/jira/browse/MCOMPILER-481
> Project: Maven Compiler Plugin
>  Issue Type: Bug
>Affects Versions: 3.9.0
>Reporter: Simone Bordet
>Assignee: Olivier Lamy
>Priority: Major
> Fix For: 3.9.1
>
> Attachments: compiler-bug.tar.gz
>
>
> Version 3.8.1 is not affected.
> The problem lies in how the module-path is constructed by the 
> maven-compiler-plugin – not sure what changes from 3.8.1 caused this.
> In 3.8.1:
> {code:java}
> -d
>   /home/simon/tmp/compiler-bug/app/target/test-classes
> -classpath
>   /home/simon/tmp/compiler-bug/app/target/test-classes
>   
> /home/simon/.m2/repository/org/junit/jupiter/junit-jupiter-api/5.8.2/junit-jupiter-api-5.8.2.jar
>   
> /home/simon/.m2/repository/org/opentest4j/opentest4j/1.2.0/opentest4j-1.2.0.jar
>   
> /home/simon/.m2/repository/org/junit/platform/junit-platform-commons/1.8.2/junit-platform-commons-1.8.2.jar
>   
> /home/simon/.m2/repository/org/apiguardian/apiguardian-api/1.1.2/apiguardian-api-1.1.2.jar
>   
> --module-path
>   /home/simon/tmp/compiler-bug/app/target/classes
>   
> /home/simon/.m2/repository/org/example/compiler-bug-service/1.0-SNAPSHOT/compiler-bug-service-1.0-SNAPSHOT.jar
>   
> /home/simon/.m2/repository/org/eclipse/jetty/jetty-util-ajax/10.0.7/jetty-util-ajax-10.0.7.jar
>   
> /home/simon/.m2/repository/org/eclipse/jetty/jetty-util/10.0.7/jetty-util-10.0.7.jar
>   
> /home/simon/.m2/repository/org/slf4j/slf4j-api/2.0.0-alpha5/slf4j-api-2.0.0-alpha5.jar
>   
> -sourcepath
>   /home/simon/tmp/compiler-bug/app/src/test/java
>   
> /home/simon/tmp/compiler-bug/app/target/generated-test-sources/test-annotations
>   
> -s
>   
> /home/simon/tmp/compiler-bug/app/target/generated-test-sources/test-annotations
> -g
> -nowarn
> --release
>   11
> -encoding
>   UTF-8
> --patch-module
>   compiler.bug.app=/home/simon/tmp/compiler-bug/app/target/classes
>   /home/simon/tmp/compiler-bug/app/src/test/java
>   
> /home/simon/tmp/compiler-bug/app/target/generated-test-sources/test-annotations
>   
> --add-reads
>   compiler.bug.app=ALL-UNNAMED {code}
> In 3.9.0:
> {code:java}
> -d
>   /home/simon/tmp/compiler-bug/app/target/test-classes
> -classpath
>   /home/simon/tmp/compiler-bug/app/target/test-classes
>   
> /home/simon/.m2/repository/org/eclipse/jetty/jetty-util-ajax/10.0.7/jetty-util-ajax-10.0.7.jar
>   
> /home/simon/.m2/repository/org/eclipse/jetty/jetty-util/10.0.7/jetty-util-10.0.7.jar
>   
> /home/simon/.m2/repository/org/slf4j/slf4j-api/2.0.0-alpha5/slf4j-api-2.0.0-alpha5.jar
>   
> /home/simon/.m2/repository/org/junit/jupiter/junit-jupiter-api/5.8.2/junit-jupiter-api-5.8.2.jar
>   
> /home/simon/.m2/repository/org/opentest4j/opentest4j/1.2.0/opentest4j-1.2.0.jar
>   
> /home/simon/.m2/repository/org/junit/platform/junit-platform-commons/1.8.2/junit-platform-commons-1.8.2.jar
>   
> /home/simon/.m2/repository/org/apiguardian/apiguardian-api/1.1.2/apiguardian-api-1.1.2.jar
>   
> --module-path
>   

[jira] [Comment Edited] (MCOMPILER-481) JPMS Regression: cannot access (requires static module not include anymore)

2022-01-21 Thread Robert Scholte (Jira)


[ 
https://issues.apache.org/jira/browse/MCOMPILER-481?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17479961#comment-17479961
 ] 

Robert Scholte edited comment on MCOMPILER-481 at 1/21/22, 10:26 AM:
-

This is how I think it should work for compilation:
Based on the module descriptor:
- direct static required modules should always be included
- indirect required modules should always be included
- indirect static required modules should not be included

And I agree with [~sbordet]: it is very weird that {{--add-reads 
compiler.bug.app=ALL-UNNAMED}} doesn't work.

To me the adjusted separation between 3.8.1 and 3.9.0 now looks better, maybe 
we've now hit an issue in the compiler.


was (Author: rfscholte):
This is how I think it should work for compilation:
Based on the module descriptor:
- direct static required modules should always be included
- indirect required modules should always be included
- indirect static required modules should not be included

Based on the pom:
- every direct dependency should be added to the module path. 

In this case the jetty-util-ajax should be added based on the last rule, but 
(most likely) is removed because it is also an indirect required module. For an 
unrelated dependency like junit it works as expected.



> JPMS Regression: cannot access  (requires static module not include 
> anymore)
> ---
>
> Key: MCOMPILER-481
> URL: https://issues.apache.org/jira/browse/MCOMPILER-481
> Project: Maven Compiler Plugin
>  Issue Type: Bug
>Affects Versions: 3.9.0
>Reporter: Simone Bordet
>Assignee: Olivier Lamy
>Priority: Major
> Fix For: 3.9.1
>
> Attachments: compiler-bug.tar.gz
>
>
> Version 3.8.1 is not affected.
> The problem lies in how the module-path is constructed by the 
> maven-compiler-plugin – not sure what changes from 3.8.1 caused this.
> In 3.8.1:
> {code:java}
> -d
>   /home/simon/tmp/compiler-bug/app/target/test-classes
> -classpath
>   /home/simon/tmp/compiler-bug/app/target/test-classes
>   
> /home/simon/.m2/repository/org/junit/jupiter/junit-jupiter-api/5.8.2/junit-jupiter-api-5.8.2.jar
>   
> /home/simon/.m2/repository/org/opentest4j/opentest4j/1.2.0/opentest4j-1.2.0.jar
>   
> /home/simon/.m2/repository/org/junit/platform/junit-platform-commons/1.8.2/junit-platform-commons-1.8.2.jar
>   
> /home/simon/.m2/repository/org/apiguardian/apiguardian-api/1.1.2/apiguardian-api-1.1.2.jar
>   
> --module-path
>   /home/simon/tmp/compiler-bug/app/target/classes
>   
> /home/simon/.m2/repository/org/example/compiler-bug-service/1.0-SNAPSHOT/compiler-bug-service-1.0-SNAPSHOT.jar
>   
> /home/simon/.m2/repository/org/eclipse/jetty/jetty-util-ajax/10.0.7/jetty-util-ajax-10.0.7.jar
>   
> /home/simon/.m2/repository/org/eclipse/jetty/jetty-util/10.0.7/jetty-util-10.0.7.jar
>   
> /home/simon/.m2/repository/org/slf4j/slf4j-api/2.0.0-alpha5/slf4j-api-2.0.0-alpha5.jar
>   
> -sourcepath
>   /home/simon/tmp/compiler-bug/app/src/test/java
>   
> /home/simon/tmp/compiler-bug/app/target/generated-test-sources/test-annotations
>   
> -s
>   
> /home/simon/tmp/compiler-bug/app/target/generated-test-sources/test-annotations
> -g
> -nowarn
> --release
>   11
> -encoding
>   UTF-8
> --patch-module
>   compiler.bug.app=/home/simon/tmp/compiler-bug/app/target/classes
>   /home/simon/tmp/compiler-bug/app/src/test/java
>   
> /home/simon/tmp/compiler-bug/app/target/generated-test-sources/test-annotations
>   
> --add-reads
>   compiler.bug.app=ALL-UNNAMED {code}
> In 3.9.0:
> {code:java}
> -d
>   /home/simon/tmp/compiler-bug/app/target/test-classes
> -classpath
>   /home/simon/tmp/compiler-bug/app/target/test-classes
>   
> /home/simon/.m2/repository/org/eclipse/jetty/jetty-util-ajax/10.0.7/jetty-util-ajax-10.0.7.jar
>   
> /home/simon/.m2/repository/org/eclipse/jetty/jetty-util/10.0.7/jetty-util-10.0.7.jar
>   
> /home/simon/.m2/repository/org/slf4j/slf4j-api/2.0.0-alpha5/slf4j-api-2.0.0-alpha5.jar
>   
> /home/simon/.m2/repository/org/junit/jupiter/junit-jupiter-api/5.8.2/junit-jupiter-api-5.8.2.jar
>   
> /home/simon/.m2/repository/org/opentest4j/opentest4j/1.2.0/opentest4j-1.2.0.jar
>   
> /home/simon/.m2/repository/org/junit/platform/junit-platform-commons/1.8.2/junit-platform-commons-1.8.2.jar
>   
> /home/simon/.m2/repository/org/apiguardian/apiguardian-api/1.1.2/apiguardian-api-1.1.2.jar
>   
> --module-path
>   /home/simon/tmp/compiler-bug/app/target/classes
>   
> /home/simon/.m2/repository/org/example/compiler-bug-service/1.0-SNAPSHOT/compiler-bug-service-1.0-SNAPSHOT.jar
>   
> -sourcepath
>   /home/simon/tmp/compiler-bug/app/src/test/java
>   
> /home/simon/tmp/compiler-bug/app/target/generated-test-sources/test-annotations
>   
> -s
>   
> 

[jira] [Comment Edited] (MCOMPILER-481) JPMS Regression: cannot access (requires static module not include anymore)

2022-01-19 Thread Olivier Lamy (Jira)


[ 
https://issues.apache.org/jira/browse/MCOMPILER-481?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17478330#comment-17478330
 ] 

Olivier Lamy edited comment on MCOMPILER-481 at 1/19/22, 8:10 AM:
--

requires static are not include anymore per default (ResolvePathsRequest has 
includeStatic field false per default).

BTW I tried to change m-compiler-p to 
ResolvePathsRequest.setIncludeStatic(true) but doesn't work.

[~rfscholte]  This commit has some issues 
[https://github.com/codehaus-plexus/plexus-languages/commit/868b3d7439634c35d05cfc6aa8a012adb070d02d]
 I'm investigating.

[~sbordet] not sure why you need static
{quote}requires static org.eclipse.jetty.util.ajax;
{quote}
Thanks for the test project. As there is no license included do you mind if I 
include it as a test in the maven-compiler-plugin code?

 

 


was (Author: olamy):
requires static are not include anymore per default (ResolvePathsRequest has 
includeStatic field false per default).

BTW I tried to change m-compiler-p to 
ResolvePathsRequest.setIncludeStatic(true) but doesn't work.

[~rfscholte]  This commit has some issues 
[https://github.com/codehaus-plexus/plexus-languages/commit/868b3d7439634c35d05cfc6aa8a012adb070d02d]
 I'm investigating.

[~sbordet] not sure why you need static
{quote}requires static org.eclipse.jetty.util.ajax;
{quote}
Thanks for the test project. As there is not license included do you mind if I 
include it as a test in the maven-compiler-plugin code?

 

 

> JPMS Regression: cannot access  (requires static module not include 
> anymore)
> ---
>
> Key: MCOMPILER-481
> URL: https://issues.apache.org/jira/browse/MCOMPILER-481
> Project: Maven Compiler Plugin
>  Issue Type: Bug
>Affects Versions: 3.9.0
>Reporter: Simone Bordet
>Priority: Major
> Attachments: compiler-bug.tar.gz
>
>
> Version 3.8.1 is not affected.
> The problem lies in how the module-path is constructed by the 
> maven-compiler-plugin – not sure what changes from 3.8.1 caused this.
> In 3.8.1:
> {code:java}
> -d
>   /home/simon/tmp/compiler-bug/app/target/test-classes
> -classpath
>   /home/simon/tmp/compiler-bug/app/target/test-classes
>   
> /home/simon/.m2/repository/org/junit/jupiter/junit-jupiter-api/5.8.2/junit-jupiter-api-5.8.2.jar
>   
> /home/simon/.m2/repository/org/opentest4j/opentest4j/1.2.0/opentest4j-1.2.0.jar
>   
> /home/simon/.m2/repository/org/junit/platform/junit-platform-commons/1.8.2/junit-platform-commons-1.8.2.jar
>   
> /home/simon/.m2/repository/org/apiguardian/apiguardian-api/1.1.2/apiguardian-api-1.1.2.jar
>   
> --module-path
>   /home/simon/tmp/compiler-bug/app/target/classes
>   
> /home/simon/.m2/repository/org/example/compiler-bug-service/1.0-SNAPSHOT/compiler-bug-service-1.0-SNAPSHOT.jar
>   
> /home/simon/.m2/repository/org/eclipse/jetty/jetty-util-ajax/10.0.7/jetty-util-ajax-10.0.7.jar
>   
> /home/simon/.m2/repository/org/eclipse/jetty/jetty-util/10.0.7/jetty-util-10.0.7.jar
>   
> /home/simon/.m2/repository/org/slf4j/slf4j-api/2.0.0-alpha5/slf4j-api-2.0.0-alpha5.jar
>   
> -sourcepath
>   /home/simon/tmp/compiler-bug/app/src/test/java
>   
> /home/simon/tmp/compiler-bug/app/target/generated-test-sources/test-annotations
>   
> -s
>   
> /home/simon/tmp/compiler-bug/app/target/generated-test-sources/test-annotations
> -g
> -nowarn
> --release
>   11
> -encoding
>   UTF-8
> --patch-module
>   compiler.bug.app=/home/simon/tmp/compiler-bug/app/target/classes
>   /home/simon/tmp/compiler-bug/app/src/test/java
>   
> /home/simon/tmp/compiler-bug/app/target/generated-test-sources/test-annotations
>   
> --add-reads
>   compiler.bug.app=ALL-UNNAMED {code}
> In 3.9.0:
> {code:java}
> -d
>   /home/simon/tmp/compiler-bug/app/target/test-classes
> -classpath
>   /home/simon/tmp/compiler-bug/app/target/test-classes
>   
> /home/simon/.m2/repository/org/eclipse/jetty/jetty-util-ajax/10.0.7/jetty-util-ajax-10.0.7.jar
>   
> /home/simon/.m2/repository/org/eclipse/jetty/jetty-util/10.0.7/jetty-util-10.0.7.jar
>   
> /home/simon/.m2/repository/org/slf4j/slf4j-api/2.0.0-alpha5/slf4j-api-2.0.0-alpha5.jar
>   
> /home/simon/.m2/repository/org/junit/jupiter/junit-jupiter-api/5.8.2/junit-jupiter-api-5.8.2.jar
>   
> /home/simon/.m2/repository/org/opentest4j/opentest4j/1.2.0/opentest4j-1.2.0.jar
>   
> /home/simon/.m2/repository/org/junit/platform/junit-platform-commons/1.8.2/junit-platform-commons-1.8.2.jar
>   
> /home/simon/.m2/repository/org/apiguardian/apiguardian-api/1.1.2/apiguardian-api-1.1.2.jar
>   
> --module-path
>   /home/simon/tmp/compiler-bug/app/target/classes
>   
> /home/simon/.m2/repository/org/example/compiler-bug-service/1.0-SNAPSHOT/compiler-bug-service-1.0-SNAPSHOT.jar
>   
> -sourcepath
>   /home/simon/tmp/compiler-bug/app/src/test/java
>   
> 

[jira] [Comment Edited] (MCOMPILER-481) JPMS Regression: cannot access (requires static module not include anymore)

2022-01-18 Thread Olivier Lamy (Jira)


[ 
https://issues.apache.org/jira/browse/MCOMPILER-481?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17478330#comment-17478330
 ] 

Olivier Lamy edited comment on MCOMPILER-481 at 1/19/22, 7:48 AM:
--

requires static are not include anymore per default (ResolvePathsRequest has 
includeStatic field false per default).

BTW I tried to change m-compiler-p to 
ResolvePathsRequest.setIncludeStatic(true) but doesn't work.

[~rfscholte]  This commit has some issues 
[https://github.com/codehaus-plexus/plexus-languages/commit/868b3d7439634c35d05cfc6aa8a012adb070d02d]
 I'm investigating.

[~sbordet] not sure why you need static
{quote}requires static org.eclipse.jetty.util.ajax;
{quote}
Thanks for the test project. As there is not license included do you mind if I 
include it as a test in the maven-compiler-plugin code?

 

 


was (Author: olamy):
the culprit change is here 
[https://github.com/codehaus-plexus/plexus-languages/commit/714fa9f8d0c72b9b6990429550e976d77561d17c]

[~rfscholte] do you remember the reason of this change? (hard to tell as there 
is no much comment to explain)

[~sbordet] not sure why you need
{quote}requires static org.eclipse.jetty.util.ajax;
{quote}
it works not using static but sounds like a bug to me as requires static means 
module is required for compilation but optional at runtime.

 

 

> JPMS Regression: cannot access  (requires static module not include 
> anymore)
> ---
>
> Key: MCOMPILER-481
> URL: https://issues.apache.org/jira/browse/MCOMPILER-481
> Project: Maven Compiler Plugin
>  Issue Type: Bug
>Affects Versions: 3.9.0
>Reporter: Simone Bordet
>Priority: Major
> Attachments: compiler-bug.tar.gz
>
>
> Version 3.8.1 is not affected.
> The problem lies in how the module-path is constructed by the 
> maven-compiler-plugin – not sure what changes from 3.8.1 caused this.
> In 3.8.1:
> {code:java}
> -d
>   /home/simon/tmp/compiler-bug/app/target/test-classes
> -classpath
>   /home/simon/tmp/compiler-bug/app/target/test-classes
>   
> /home/simon/.m2/repository/org/junit/jupiter/junit-jupiter-api/5.8.2/junit-jupiter-api-5.8.2.jar
>   
> /home/simon/.m2/repository/org/opentest4j/opentest4j/1.2.0/opentest4j-1.2.0.jar
>   
> /home/simon/.m2/repository/org/junit/platform/junit-platform-commons/1.8.2/junit-platform-commons-1.8.2.jar
>   
> /home/simon/.m2/repository/org/apiguardian/apiguardian-api/1.1.2/apiguardian-api-1.1.2.jar
>   
> --module-path
>   /home/simon/tmp/compiler-bug/app/target/classes
>   
> /home/simon/.m2/repository/org/example/compiler-bug-service/1.0-SNAPSHOT/compiler-bug-service-1.0-SNAPSHOT.jar
>   
> /home/simon/.m2/repository/org/eclipse/jetty/jetty-util-ajax/10.0.7/jetty-util-ajax-10.0.7.jar
>   
> /home/simon/.m2/repository/org/eclipse/jetty/jetty-util/10.0.7/jetty-util-10.0.7.jar
>   
> /home/simon/.m2/repository/org/slf4j/slf4j-api/2.0.0-alpha5/slf4j-api-2.0.0-alpha5.jar
>   
> -sourcepath
>   /home/simon/tmp/compiler-bug/app/src/test/java
>   
> /home/simon/tmp/compiler-bug/app/target/generated-test-sources/test-annotations
>   
> -s
>   
> /home/simon/tmp/compiler-bug/app/target/generated-test-sources/test-annotations
> -g
> -nowarn
> --release
>   11
> -encoding
>   UTF-8
> --patch-module
>   compiler.bug.app=/home/simon/tmp/compiler-bug/app/target/classes
>   /home/simon/tmp/compiler-bug/app/src/test/java
>   
> /home/simon/tmp/compiler-bug/app/target/generated-test-sources/test-annotations
>   
> --add-reads
>   compiler.bug.app=ALL-UNNAMED {code}
> In 3.9.0:
> {code:java}
> -d
>   /home/simon/tmp/compiler-bug/app/target/test-classes
> -classpath
>   /home/simon/tmp/compiler-bug/app/target/test-classes
>   
> /home/simon/.m2/repository/org/eclipse/jetty/jetty-util-ajax/10.0.7/jetty-util-ajax-10.0.7.jar
>   
> /home/simon/.m2/repository/org/eclipse/jetty/jetty-util/10.0.7/jetty-util-10.0.7.jar
>   
> /home/simon/.m2/repository/org/slf4j/slf4j-api/2.0.0-alpha5/slf4j-api-2.0.0-alpha5.jar
>   
> /home/simon/.m2/repository/org/junit/jupiter/junit-jupiter-api/5.8.2/junit-jupiter-api-5.8.2.jar
>   
> /home/simon/.m2/repository/org/opentest4j/opentest4j/1.2.0/opentest4j-1.2.0.jar
>   
> /home/simon/.m2/repository/org/junit/platform/junit-platform-commons/1.8.2/junit-platform-commons-1.8.2.jar
>   
> /home/simon/.m2/repository/org/apiguardian/apiguardian-api/1.1.2/apiguardian-api-1.1.2.jar
>   
> --module-path
>   /home/simon/tmp/compiler-bug/app/target/classes
>   
> /home/simon/.m2/repository/org/example/compiler-bug-service/1.0-SNAPSHOT/compiler-bug-service-1.0-SNAPSHOT.jar
>   
> -sourcepath
>   /home/simon/tmp/compiler-bug/app/src/test/java
>   
> /home/simon/tmp/compiler-bug/app/target/generated-test-sources/test-annotations
>   
> -s
>   
> 

[jira] [Comment Edited] (MCOMPILER-481) JPMS Regression: cannot access (requires static module not include anymore)

2022-01-18 Thread Olivier Lamy (Jira)


[ 
https://issues.apache.org/jira/browse/MCOMPILER-481?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17478330#comment-17478330
 ] 

Olivier Lamy edited comment on MCOMPILER-481 at 1/19/22, 4:43 AM:
--

the culprit change is here 
[https://github.com/codehaus-plexus/plexus-languages/commit/714fa9f8d0c72b9b6990429550e976d77561d17c]

[~rfscholte] do you remember the reason of this change? (hard to tell as there 
is no much comment to explain)

[~sbordet] not sure why you need
{quote}requires static org.eclipse.jetty.util.ajax;
{quote}
it works not using static but sounds like a bug to me as requires static means 
module is required for compilation but optional at runtime.

 

 


was (Author: olamy):
the culprit change is here 
[https://github.com/codehaus-plexus/plexus-languages/commit/714fa9f8d0c72b9b6990429550e976d77561d17c]

[~rfscholte] do you remember the reason of this change? (hard to tell as there 
is no much comment to explain)

[~sbordet] not sure why you need
{quote}requires static org.eclipse.jetty.util.ajax;{quote}
it works not using static but sounds like a bug to me as requires static means 
module is required for compilation but optional at runtime 

 

 

> JPMS Regression: cannot access  (requires static module not include 
> anymore)
> ---
>
> Key: MCOMPILER-481
> URL: https://issues.apache.org/jira/browse/MCOMPILER-481
> Project: Maven Compiler Plugin
>  Issue Type: Bug
>Affects Versions: 3.9.0
>Reporter: Simone Bordet
>Priority: Major
> Attachments: compiler-bug.tar.gz
>
>
> Version 3.8.1 is not affected.
> The problem lies in how the module-path is constructed by the 
> maven-compiler-plugin – not sure what changes from 3.8.1 caused this.
> In 3.8.1:
> {code:java}
> -d
>   /home/simon/tmp/compiler-bug/app/target/test-classes
> -classpath
>   /home/simon/tmp/compiler-bug/app/target/test-classes
>   
> /home/simon/.m2/repository/org/junit/jupiter/junit-jupiter-api/5.8.2/junit-jupiter-api-5.8.2.jar
>   
> /home/simon/.m2/repository/org/opentest4j/opentest4j/1.2.0/opentest4j-1.2.0.jar
>   
> /home/simon/.m2/repository/org/junit/platform/junit-platform-commons/1.8.2/junit-platform-commons-1.8.2.jar
>   
> /home/simon/.m2/repository/org/apiguardian/apiguardian-api/1.1.2/apiguardian-api-1.1.2.jar
>   
> --module-path
>   /home/simon/tmp/compiler-bug/app/target/classes
>   
> /home/simon/.m2/repository/org/example/compiler-bug-service/1.0-SNAPSHOT/compiler-bug-service-1.0-SNAPSHOT.jar
>   
> /home/simon/.m2/repository/org/eclipse/jetty/jetty-util-ajax/10.0.7/jetty-util-ajax-10.0.7.jar
>   
> /home/simon/.m2/repository/org/eclipse/jetty/jetty-util/10.0.7/jetty-util-10.0.7.jar
>   
> /home/simon/.m2/repository/org/slf4j/slf4j-api/2.0.0-alpha5/slf4j-api-2.0.0-alpha5.jar
>   
> -sourcepath
>   /home/simon/tmp/compiler-bug/app/src/test/java
>   
> /home/simon/tmp/compiler-bug/app/target/generated-test-sources/test-annotations
>   
> -s
>   
> /home/simon/tmp/compiler-bug/app/target/generated-test-sources/test-annotations
> -g
> -nowarn
> --release
>   11
> -encoding
>   UTF-8
> --patch-module
>   compiler.bug.app=/home/simon/tmp/compiler-bug/app/target/classes
>   /home/simon/tmp/compiler-bug/app/src/test/java
>   
> /home/simon/tmp/compiler-bug/app/target/generated-test-sources/test-annotations
>   
> --add-reads
>   compiler.bug.app=ALL-UNNAMED {code}
> In 3.9.0:
> {code:java}
> -d
>   /home/simon/tmp/compiler-bug/app/target/test-classes
> -classpath
>   /home/simon/tmp/compiler-bug/app/target/test-classes
>   
> /home/simon/.m2/repository/org/eclipse/jetty/jetty-util-ajax/10.0.7/jetty-util-ajax-10.0.7.jar
>   
> /home/simon/.m2/repository/org/eclipse/jetty/jetty-util/10.0.7/jetty-util-10.0.7.jar
>   
> /home/simon/.m2/repository/org/slf4j/slf4j-api/2.0.0-alpha5/slf4j-api-2.0.0-alpha5.jar
>   
> /home/simon/.m2/repository/org/junit/jupiter/junit-jupiter-api/5.8.2/junit-jupiter-api-5.8.2.jar
>   
> /home/simon/.m2/repository/org/opentest4j/opentest4j/1.2.0/opentest4j-1.2.0.jar
>   
> /home/simon/.m2/repository/org/junit/platform/junit-platform-commons/1.8.2/junit-platform-commons-1.8.2.jar
>   
> /home/simon/.m2/repository/org/apiguardian/apiguardian-api/1.1.2/apiguardian-api-1.1.2.jar
>   
> --module-path
>   /home/simon/tmp/compiler-bug/app/target/classes
>   
> /home/simon/.m2/repository/org/example/compiler-bug-service/1.0-SNAPSHOT/compiler-bug-service-1.0-SNAPSHOT.jar
>   
> -sourcepath
>   /home/simon/tmp/compiler-bug/app/src/test/java
>   
> /home/simon/tmp/compiler-bug/app/target/generated-test-sources/test-annotations
>   
> -s
>   
> /home/simon/tmp/compiler-bug/app/target/generated-test-sources/test-annotations
> -g
> -nowarn
> --release
>   11
> -encoding
>   UTF-8
> --patch-module
>