0

My Environment:

  • JAVA - 1.8.0_161
  • MAVEN - 3.5.3

I am consistently facing issues while running simple tasks (like clean here) using Maven 3 with Java 8.

# mvn clean
..
..
[ERROR] Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its 
dependencies could not be resolved: Failed to read artifact descriptor for   
org.apache.maven.plugins:maven-clean-plugin:jar:2.5: Could not transfer 
artifact org.apache.maven.plugins:maven-clean-plugin:pom:2.5 from/to 
central-no-ssl (https://repo.maven.apache.org/maven2): Received fatal alert: 
access_denied

When I turn on the debug flag, I can find errors being caused due to SSL Handshake while maven tries to download the clean plugin POM from the REPO using HTTPS

Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Could not 
transfer artifact org.apache.maven.plugins:maven-clean-plugin:pom:2.5 
from/to central-no-ssl (https://repo.maven.apache.org/maven2): Received 
fatal alert: access_denied
..
..
..
Caused by: javax.net.ssl.SSLHandshakeException: Received fatal alert: 
access_denied
    at sun.security.ssl.Alerts.getSSLException (Alerts.java:192)
    at sun.security.ssl.Alerts.getSSLException (Alerts.java:154)
    at sun.security.ssl.SSLSocketImpl.recvAlert (SSLSocketImpl.java:2033)
    at sun.security.ssl.SSLSocketImpl.readRecord (SSLSocketImpl.java:1135)
    at sun.security.ssl.SSLSocketImpl.performInitialHandshake 
    (SSLSocketImpl.java:1385)

When I try overriding the default REPO url to HTTP instead of HTTPS by changing it in .m2/settings.xml, the problem changes from that of SSL to the URL being banned by fortinet firewall. However, I can access the same REPO url via my browser.

Has anybody faced and fixed the SSL issue with MAVEN and JAVA 8 ?

piy26
  • 1,574
  • 11
  • 21

1 Answers1

0

In your pom.xml provide in the java source for java 1.8 for maven compile plugin and try running mvn clean compile

Adnan Khan
  • 861
  • 5
  • 5