0

I am using Java 6 in IBM Rational Software Architect for WebSphere Eclipse and while maven install getting below error: ERROR] Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.3.1:install (default-install) on project parent: Execution default-install of goal org.apache.maven.plugins:maven-install-plugin:2.3.1:install failed: Plugin org.apache.maven.plugins:maven-install-plugin:2.3.1 or one of its dependencies could not be resolved: Failed to collect dependencies for org.apache.maven.plugins:maven-install-plugin:jar:2.3.1 (): Failed to read artifact descriptor for org.apache.maven:maven-plugin-api:jar:2.0.6: Could not transfer artifact org.apache:apache:pom:3 from/to central (https://repo.maven.apache.org/maven2): Received fatal alert: protocol_version to https://repo.maven.apache.org/maven2/org/apache/apache/3/apache-3.pom -> [Help 1]

I tried setting VM arguments -Dhttps.protocols=TLSv1.2 and -Djdk.tls.client.protocols=TLSv1.2 but error persists.Hitting https://repo.maven.apache.org/maven2 in browser directly it opens. If I update link to http://repo.maven.apache.org/maven2 i.e. http one it says https is required. Please let me know if anything is missing.

  • The arguments https.protocols=TLSv1.2 are for JDK7 not that I know they work for JDK6 (neither for IBM Java 6; I have my doubts). Really need to go for JDK6 ? – khmarbaise Apr 16 '20 at 21:50
  • Yes JDK6 is used by my client in Project and can't change that for now. – shweta karanje Apr 16 '20 at 21:58
  • 1
    I'm not sure if this will work for IBM JDK 6 or not, but I ran into the same problem with IBM JDK 8 and was able to work around it by setting `-Dcom.ibm.jsse2.overrideDefaultTLS=true` – Andy Guibert Apr 16 '20 at 22:05
  • Andy did u add Dcom.ibm.jsse2.overrideDefaultTLS=true in VM argument? – shweta karanje Apr 16 '20 at 22:22
  • Some earlier discussion, no certain resolution, though, at: https://stackoverflow.com/q/46208771/796761 (And the workaround to force Maven to use http no longer works. It's https-only now.) – dbreaux Apr 17 '20 at 12:37
  • You can take a look into toolchains and run your Maven build with JDK7+ and run compiling with IBM JDK 6 and running tests also with IBM JDK 6 .. https://maven.apache.org/guides/mini/guide-using-toolchains.html This will solve your download problem and running your tests/compiling with the correct JDK. – khmarbaise Apr 17 '20 at 14:08

1 Answers1

0

I got solution that Maven don't support HTTP any long so we need to use insecure url : http://insecure.repo1.maven.org/maven2/ in pom.