Maven "unexpected end of file from server": SSL Handshake problem?
I'm getting this error:
[WARNING] repository metadata for: 'snapshot ***.*****.*****:global:1.0.8-SNAPSHOT' could not be retrieved from repository: public due to an error: Error transferring file: Unexpected end of file from server
through mvn in IDEA. I don't get any errors via command-line. Thoughts?
Command-line uses Maven (mvn) which uses Java as well.
Looks like the "unexpected end of file from server" is masking a 403 coming back from the server. The SSL handshake is failing. Is there a reason why this is happening?
I've modified Contents/Info.plist:
<key>VMOptions</key>
<string>-Xms128m -Xmx512m -XX:MaxPermSize=250m -ea -Xbootclasspath/a:../lib/boot.jar -Djavax.net.ssl.keyStore=/Users/user/myfile.p12 -Djavax.net.ssl.keyStoreType=PKCS12 -Djavax.net.ssl.keyStorePassword=******** -Djavax.net.ssl.trustStore=/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/security/cacerts -Dsun.security.ssl.allowUnsafeRenegotiation=true</string>
Please sign in to leave a comment.
My IT guy and I solved it.
IDEA executes /usr/bin/mvn.
In my home directory, I had a .mavenrc file which contained Java parameters to my certs. This works just fine because the command-line execution picks up the .mavenrc. This doesn't work in IDEA.
Solution:
- Create the file ~/.MacOSX/environment.plist
- Open the file with Property List Editor
- Add the following key/value pair: MAVEN_OPTS/-Djavax.net.ssl.keyStore=/Users/user/myfile.p12 -Djavax.net.ssl.keyStoreType=PKCS12 -Djavax.net.ssl.keyStorePassword=******** -Djavax.net.ssl.trustStore=/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/security/cacerts -Dsun.security.ssl.allowUnsafeRenegotiation=true
- reboot
Now Maven can do SSL handshakes.