Eclipse environment setup requirements for Wildfly

47 views
Skip to first unread message

Jeremy Jackson

unread,
Feb 14, 2023, 3:56:12 PM2/14/23
to WildFly
Hi, I'm wondering what versions of Eclipse are known to work for Wildfly development.


doesn't elaborate beyond JDK and Maven version requirements.

I am using OpenJDK 11 and Eclipse 2022-12, and getting 13,545 warnings, 207 errors, and many other issues.

The 3 wildfly projects listed are building fine with maven on commandline.

It would be nice if there was a known working starting point for Eclipse.

Cameron Rodriguez

unread,
Feb 14, 2023, 6:02:46 PM2/14/23
to Jeremy Jackson, WildFly
Hi Jeremy,

Generally, you should be able to just open the folder in any IDE without issue. Eclipse is a bit of an exception, since it attempts to import multi-module POMs as separate modules. I'll open some PRs to update the documentation, but in the meantime here's how you can fix the configuration for most WildFly projects (at least WildFly, WildFly Core[1], and WildFly Elytron[2]):

- Remove all of the modules from Eclipse
- Open a terminal in the root directory and run `mvn clean`
- Import the project into Eclipse, but deselect all modules except the root one (called "wildfly-parent")

Let me know if there are any issues.


--
You received this message because you are subscribed to the Google Groups "WildFly" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wildfly+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/wildfly/4b9dea3f-3aac-4a51-9834-0c4615166130n%40googlegroups.com.


--
Cameron Rodriguez (he/him)
Software Engineering Intern
WildFly Elytron

Jeremy Jackson

unread,
Feb 14, 2023, 7:40:05 PM2/14/23
to WildFly
HI Thanks for the speedy reply.
I have tried your steps and there are no errors or warnings, in fact, Eclipse does not seem to compile anything at all!  I have been importing as Existing Maven project...

Cameron Rodriguez

unread,
Feb 15, 2023, 2:27:46 PM2/15/23
to Jeremy Jackson, WildFly
Hey Jeremy,

I tested out the config, and it seemed to work properly, but I might have forgotten to mention something. One thing you'll want to check is that you run commands as Maven builds. I attached a few screenshots, in case something doesn't match up with my testing. 

Screenshot from 2023-02-15 14-21-33.png
Screenshot from 2023-02-15 14-22-57.png
Screenshot from 2023-02-15 14-23-14.png

Jeremy Jackson

unread,
Feb 15, 2023, 3:20:45 PM2/15/23
to WildFly
OK this is the same result I am getting... but this seems to cause Eclipse to not parse or use the Maven subprojects pom.xml, as well as the Eclipse .project files in sub-project folders.  It seems that m2eclipse plugin doesn't function on the sub-projects, and Java packages aren't shown in Package Explorer View, or Project Explorer View.

If I import one subproject separately, say elytron-keystore, then I get the context menu options for Maven, and Java packages are shown.

Without the sub-projects being recognized, I loose the Eclipse feature to search References of a class, making it hardly a Java IDE at all.

When importing Maven sub-projects, Eclipse gives these errors:

No marketplace entries found to handle maven-dependency-plugin:3.1.1:get in Eclipse
No marketplace entries found to handle maven-dependency-plugin:3.1.1:properties in Eclipse.

Continuing with import will result in projects with build errors.

Is that perhaps the reason to omit importing the subprojects?

Jeremy Jackson

unread,
Feb 15, 2023, 5:22:01 PM2/15/23
to WildFly
Just looking at m2e-connector for maven-dependency-plugin, on Github, hasn't been updated for 10 years.  Seems like Maven support in Eclipse is dead.  I should switch to a supported IDE, what does Wildfly team use?

Cameron Rodriguez

unread,
Feb 15, 2023, 5:53:09 PM2/15/23
to Jeremy Jackson, WildFly
For what it's worth, one recommendation I found was to replace Eclipse's embedded Maven runner with your system installation: https://stackoverflow.com/a/25540809/19546298 (there are some other good answers on that page). While this alone won't remove the errors that Eclipse raises (it seems sources and Javadocs are always downloaded by the embedded Maven), it should allow you to import all of the modules and run builds anyways.

Otherwise, I've used IntelliJ and haven't run into many issues. The main change I needed to make was delegating build tasks to Maven, instead of IntelliJ's internal build tools: https://www.jetbrains.com/help/idea/delegate-build-and-run-actions-to-maven.html#delegate_to_maven

Reply all
Reply to author
Forward
0 new messages