usnistgov / swid-tools

https://pages.nist.gov/swid-tools/
Other
13 stars 10 forks source link

Java 10 appears to interpret classpath as unrecognized protocol #1

Closed ajnelson-nist closed 2 years ago

ajnelson-nist commented 5 years ago

I have the SWID Autotools repository using Travis now. I tried a build (build record here, let me know if you need access permissions) that used macOS and Ubuntu to run swidval against a small tag, and the macOS side failed, seemingly because a classpath is accidentally being interpreted as a protocol.

Java versions (per Build system information from the Travis logs):

Relevant build log snippets:

Steps to reproduce:

ajnelson-nist commented 5 years ago

I encountered this issue again and forgot that I'd already posted a bug report.

I found openjdk8 and oraclejdk8 would succeed, but other JDKs (all major-version 10+) would fail.

Here is the last build log that shows these fail states: https://travis-ci.com/usnistgov/private_swid_autotools/builds/109374519

The four lines following "DEBUG:check-swidval.mk" show the output of java -version, and classpath protocol problem is dumped immediately after those lines.

I think it would help this repository to use a CI framework to catch issues like this. Ideally, the following as a .travis.yml file would pass:

language: java

os:
  - linux
  - osx

dist:
  - trusty
  - xenial

osximage:
  - xcode9.3
  - xcode10.2

jdk:
  # Currently builds:
  - openjdk8
  - oraclejdk8
  # Should also build, but currently fails:
  - openjdk10
  - openjdk11
  - oraclejdk11

script:
  - #(the commands to run the build)

(That clean syntax is currently wishful. I keep finding that the matrix needs to be manually unrolled, like in the above build's config, to get all the combinations.)

ajnelson-nist commented 3 years ago

As a reminder of the relevance of this issue, which I ran into again recently: The Ubuntu package default-jre installs Java 11 by default.

ajnelson-nist commented 2 years ago

Thanks!