Error when trying to convert to Maven under Eclipse

200 views
Skip to first unread message

ma...@makr.zone

unread,
Apr 17, 2018, 5:43:03 AM4/17/18
to OpenPnP
Hi

I successfully built OpenPNP under Eclipse before, but now when I try to newly import the (forked) project and then convert it to Maven (as documented), Eclipse just displays the follwoing error:

Could not get configured mojo for org.apache.maven.plugins:maven-checkstyle-plugin:2.17:check {execution: validate}
Plugin org.apache.maven.plugins:maven-checkstyle-plugin:2.17 or one of its dependencies could not be resolved: Could not find artifact com.sun:tools:jar:1.8.0 at specified path C:\Program Files\Java\jre1.8.0_162/../lib/tools.jar



The same error appears when I try to do "Maven / Project update..."

It seems the configure process is only half done. The "Convert to Maven" Menu entry is gone but the project remains unusable as I cannot start the application as documented in Step 14, 15.

Note that the build still does work on the command line, as documented.

What did I do?! I switched back to JDK 8 (from JDK 9 because of the issues discussed here) and I updated some Eclipse components as prompted by the IDEs auto-updater.

I'm afraid this is all quite "black box" for me as I'm new to Maven, Eclipse, the gazillion of plugins etc.

All help with this issue is very welcome!

Many thanks,
-Mark

P.S. I'm quite overwhelmed by Eclipse. Any suggestions for a simpler experience? All I really need is a good syntax highlighting editor and code browsing capability (navigating definitions and references).

 
Auto Generated Inline Image 1

Jason von Nieda

unread,
Apr 17, 2018, 3:04:38 PM4/17/18
to ope...@googlegroups.com
Hi Mark,

I'll look into the Eclipse problems as soon as I can. In the mean time, to answer your PS, you can use any editor you prefer and just handle the Maven stuff from the command line. For instance, a lot of users find IntelliJ to be easier to use than Eclipse. Even without the Maven integration, you could import the source into IntelliJ and just handle builds on the command line with `mvn package`.

Jason


--
You received this message because you are subscribed to the Google Groups "OpenPnP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openpnp+u...@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/6dc5d757-0a95-4fb0-a8b9-2665efb15580%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

ma...@makr.zone

unread,
Apr 21, 2018, 4:17:29 AM4/21/18
to OpenPnP
Thanks Jason.

After figuring out that %JAVA_HOME%\bin needs to be set in %PATH% as described in another post it now works again. To be clear the checkstyle configuration error still happens but I can now run the application from Eclipse, the proper Run As options suddenly appeared.

I knew Java a veeery long time ago but only from a purely theoretical "teaching basics" to beginner students perspective. From my professional background with other such runtime stuff I find it strange that a built java package will not automatically choose the proper runtime environment it was built for. But yeahh that's off topic.

_Mark
Reply all
Reply to author
Forward
0 new messages