You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 module java.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 to Java Build Path -> Module Dependencies -> Add System Module..., selecting the java.smartcardio entry, clicking Add and then Apply and Close - see this StackOverflow answer. This will add the module and limit-modules attribute to one of the classpathentry 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 the maven-compiler-plugin build step in our pom.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 the pom.xml and hoped that the compiler arguments would do it. Is there a configuration option for this elsewhere in the pom.xml or the compiler plugin? Or is this a bug/missing feature?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
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