Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Eclipse - Maven - JPMS
Eclipse - Maven - JPMS [message #1801118] Mon, 14 January 2019 09:07 Go to next message
Imanuel R is currently offline Imanuel RFriend
Messages: 4
Registered: March 2017
Junior Member
Currently im migrating legacy-projects from java 8 to java 11. There are some issues using vm args like add-modules, add-exports and add-opens:

Some base informations:
- eclipse 2018-12 for Java developers
- buildin maven (3.5.3)
- java 11 (open-jdk-hotspot_11.0.1_13-windows-x64)


Within the pom im adding modules and exports:

<plugin>
	<groupId>org.apache.maven.plugins</groupId>
	<artifactId>maven-compiler-plugin</artifactId>
	<version>${compiler.plugin.version}</version>
	<configuration>
		<source>11</source>
		<target>11</target>
		<compilerArgs>
			<arg>--add-modules=java.desktop</arg>
			<arg>--add-exports=java.desktop/com.sun.java.swing.plaf.motif=ALL-UNNAMED</arg>
		</compilerArgs>
	</configuration>
</plugin>


Thats working fine. Using maven to compile the project ends with success.
But eclipse shows problems (the type xxx is not accessable).

index.php/fa/34660/0/

To avoid these problems i can modify the project configurtaion:
Java Build Path -> Libraries -> JRE System Library [JavaSE-11] -> Is modular -> Edit

BUT: m2e is controlling the project settings. maven update command removes the changes in the project settings every time.
Is it possible to enable m2e to take over the vm-args from the pom to the project settings?

There is an example project attached demonstrating the issue.

Greetings
Imanuel
  • Attachment: 2018-12.zip
    (Size: 14.32MB, Downloaded 77 times)
  • Attachment: error.jpg
    (Size: 55.70KB, Downloaded 699 times)
Re: Eclipse - Maven - JPMS [message #1801168 is a reply to message #1801118] Mon, 14 January 2019 19:56 Go to previous messageGo to next message
Stephan Herrmann is currently offline Stephan HerrmannFriend
Messages: 1853
Registered: July 2009
Senior Member
Sounds like an excellent question for the m2e experts.
Please find their coordinates in https://www.eclipse.org/m2e/m2e-community.html
Or as a workaround: avoid executing "Maven > Update Project" after initial import, at least that part that changes the project configuration.
Re: Eclipse - Maven - JPMS [message #1801487 is a reply to message #1801168] Mon, 21 January 2019 07:30 Go to previous message
Imanuel R is currently offline Imanuel RFriend
Messages: 4
Registered: March 2017
Junior Member
Ok, thanks . Hiere is the releated bug report: https://bugs.eclipse.org/bugs/show_bug.cgi?id=543631
Previous Topic:Why .metadata is so huge?
Next Topic:Update compiler for Java 8 on old 3.6 Helios version
Goto Forum:
  


Current Time: Thu Apr 25 12:14:56 GMT 2024

Powered by FUDForum. Page generated in 0.03454 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top