Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Maven Integration for Web Tools Platform » M2E Native Plugin issue with PKI Authentication
M2E Native Plugin issue with PKI Authentication [message #1772588] Tue, 12 September 2017 16:58 Go to next message
Vinnie Lima is currently offline Vinnie LimaFriend
Messages: 1
Registered: September 2017
Junior Member
Hi There,

Having an issue with the M2E plugin within Eclipse IDE for java developers (Neon).

The Maven Central repository I am attempting to use requires the use of a PKI certificate.

I have already configured this for the Eclipse IDE JVM environment, which works for other plugins. But the Maven Plugin does not honor the Eclipse JVM as it seems it runs as a separate JVM.

Therefore, I proceeded in defining the necessary javax.net parameters under Run Configuration for Maven (in every place I can think/find) but still no luck. Can anyone provide guidance on leveraging PKI certificates with the M2E Plugin? The following are the JVM Options being passed:

-Djavax.net.ssl.trustStore=trust.jks \
-Djavax.net.ssl.trustStorePassword= \
-Djavax.net.ssl.keyStore=/home/directory/mycertificate.p12 \
-Djavax.net.ssl.keyStoreType=pkcs12 \
-Djavax.net.ssl.keyStorePassword=XXXXXX"

Thanks.
Re: M2E Native Plugin issue with PKI Authentication [message #1775468 is a reply to message #1772588] Mon, 30 October 2017 14:52 Go to previous message
Michael Giroux is currently offline Michael GirouxFriend
Messages: 81
Registered: July 2009
Location: Phoenix, AZ
Member
I have a similar issue. I was able to resolve the maven build issue by adding -Djavax.net.ssl.trustStore=trust.jks to the eclipse.ini vmargs section. Unfortunately, with the eclipse vm configured this way, I get errors attempting to access update sites. Removing the setting from exlipse.ini allows updates and installs from marketplace to run, but now the maven builds fail.

My current solution is to:
1. remove -Djavax.net.ssl.trustStore=trust.jks from eclipse.ini so that updates and marketplace work.
2. If a maven build fails because it is unable to retrieve artifacts from maven central, I run the build from a command line shell to pull the missing dependencies into the maven local repository. After running a build in a shell, I'm able to invoke the "maven -> update project" menu in eclipse to resolve the missing dependencies.

The m2e plugin is documented as using the default maven installation to resolve dependencies, so it does not help to add the trustStore definition to individual maven build configurations. However, doing so does allow me to do a manual build (Run -> as maven build) which works similar to running a build in a command shell.

So for me the choice is:
1. configure trustStore in eclipse vmargs so that maven dependency resolution works , or
2. do not set trustStore in eclipse vmargs so that updates and marketplace work.

I choose #2 because there is a clear workaround (though somewhat inconvenient) for the maven build issue.
Previous Topic:How to test an entire maven web site from eclipse
Next Topic:Eclipse crash after importing Maven project
Goto Forum:
  


Current Time: Sun Sep 23 02:10:31 GMT 2018

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

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

Back to the top