blackducksoftware / hub-detect

This is now deprecated. Please see synopsys-detect.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Respect JAVA_HOME in hub-detect.sh

elmuerte opened this issue · comments

hub-detect.sh assumes the java in the path is a Java 8 or later.

Our build nodes are set up with multiple Java versions, with Java 6 as the system default. So hub-detect.sh fails because of the Java 8 dependency. Changing the system default isn't desired.
If hub-detect.sh would respect JAVA_HOME or allow explicit definition of the java executable via an environment variable we could set up the post build task to use an alternative Java version.

Is there a reason you aren't using https://github.com/jenkinsci/blackduck-detect-plugin ? It would use the version of Java configured in the Job

We are evaluating blackduck hub, using hub-detect.sh was part of the instructions to create a analysis the sales people could upload to the their hub to show the functionality based on our software.

I would highly recommend if you are going to be using Detect in Jenkins that you use the plugin instead of the shell script

Closed the issue, since there has been no other response

The suggestion seems too far from the original ask. I can suggest a work-around of putting ${javahomenative}/bin in front of the PATH (using a POSIX format such as /cygdrive/c/jdk8 in javahomenative if using Cygwin).
PATH="${javahomenative}/bin:${PATH}" bash hub-detect.sh --...