Replies: 1 comment 1 reply
-
I have this problem as well. module settings should reflect pom specifications. Also in non modular projects. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We are currently migrating a large project from Java 8 to Java 21. The project uses facets and has the Java facet enabled for Version 21. We use the
javax.smartcardio
package, which was moved to the modulejava.smartcardio
in Java 9. Unfortunately the module is not included in the default module dependencies. It has to be added by opening the project configuration in Eclipse, going toJava Build Path
->Module Dependencies
->Add System Module...
, selecting thejava.smartcardio
entry, clickingAdd
and thenApply and Close
- see this StackOverflow answer. This will add themodule
andlimit-modules
attribute to one of theclasspathentry
entries of the.classpath
file of the project:Unfortunately those two lines are deleted when we run
Maven
->Update Project...
and we get stuck in an infinite build loop. We have tried adding--add-modules
and--limit-modules
args to themaven-compiler-plugin
build step in ourpom.xml
as below:We tried both args separately and both together but the lines are always removed from the
.classpath
. We have been unable to find any documentation on how to add a module dependency through thepom.xml
and hoped that the compiler arguments would do it. Is there a configuration option for this elsewhere in thepom.xml
or the compiler plugin? Or is this a bug/missing feature?Beta Was this translation helpful? Give feedback.
All reactions