sabato 30 giugno 2018

Protocol violations Pojects JDK 7 based and Public Nexus Indexes

In a very hot day of June a my collegue told me:

"Marco, I added some new dependecies to core project"

I thought "Here is it! At the first attempt won't comlie", I joked BUT

After a GIT pull the core project didn't compile.

The error was "failing in dependecy download -> procol violation"

Many public repositories changed the configuraion for HTTPS supporting only TLS 1.2.

We use:

NetBeans 8.1 powered by Oracle JDK 1.7 as Development Environment

It was claer the source of problem, the Oracle JDK doesn't support TLS 1.2 easily. My advice is to read this oracle blogs that introduce the topic.

The resolution was to change the jdk used to start netbeans. In our scenarion the change was from 1.7 to 1.8

In order to modify the jdk I accessed to directory:

<netbeans-inst-dir>/etc/

and edited the file netbeans.conf changing the proprty: netbeans_jdkhome

If you have problem on JDK configuration of your project, my advice is to add the old jsk as platform (not default) and configure it for every project in which the old JDK is mandatory.

Bye Folks,