mercedes-benz / sechub

SecHub provides a central API to test software with different security tools.
https://mercedes-benz.github.io/sechub/
MIT License
259 stars 61 forks source link

Unable to use SecHub with OpenJDK 11 #187

Closed Jeeppler closed 4 years ago

Jeeppler commented 4 years ago

Java SE 11 is a long term release (LTS) version. Debian 10 Buster includes only OpenJDK 11. CentOS 8, Fedora 31 and Ubuntu 20.04 and 18.04 include both OpenJDK 8 and 11.

Using OpenJDK 11 the following error will occur:

./gradlew ensureLocalhostCertificate
Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details

FAILURE: Build failed with an exception.

* Where:
Build file '/home/sechub/build.gradle' line: 35

* What went wrong:
A problem occurred evaluating root project 'sechub'.
> No .git directory found!

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 9s

The .git folder was in the directory /home/sechub/.

Line 35 in the build.gradle file would is:

ext {
    git = org.ajoberstar.grgit.Grgit.open() // necessary for version calculation
}

I was able to reproduce the issue under:

for all using OpenJDK 11 from the package sources.

Jeeppler commented 4 years ago

Maybe, the issue is related to: https://github.com/ajoberstar/grgit/issues/269

Jeeppler commented 4 years ago

The first version of grgit to support Java 11 is version 3.10.

Version 3.0+ changed the reference of the grgit package from org.ajoberstar:grgit:<version> to org.ajoberstar.grgit:grgit-core:<version> or org.ajoberstar.grgit:grgit-gradle:<version>.