opendevstack / opendevstack/ods-core
Default jdk is not set in edpBox
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 53
- Forks
- 34
- Avg merge
- 3h 26m
- Merged PRs (30d)
- 1
Description
Describe the bug
The box has not set the environment variable JAVA_HOME.
As a result, gradle fails to compile sometimes.
To Reproduce
Try to compile ods-document-generation-svc or ods-provisioning-app in a Box.
Expected behavior
Compilation should not fail. Variable needs to be set.
Screenshots
N/A
Affected version (please complete the following information):
- OpenDevStack [4.x, master]
Log Output (ensure to remove any confidential information like tokens, project names, etc.
23:47:08 amazon-ebs: + ./gradlew -i dependencies
23:47:08 amazon-ebs: Picked up JAVA_TOOL_OPTIONS: -XX:+UnlockExperimentalVMOptions -Dsun.zip.disableMemoryMapping=true
23:47:08 amazon-ebs: Initialized native services in: /home/jenkins/.gradle/native
23:47:08 amazon-ebs: Removing 0 daemon stop events from registry
23:47:08 amazon-ebs: Starting a Gradle Daemon (subsequent builds will be faster)
23:47:08 amazon-ebs: Starting process 'Gradle build daemon'. Working directory: /home/jenkins/.gradle/daemon/5.4.1 Command: /usr/lib/jvm/java-11-openjdk-11.0.15.0.9-2.el7_9.x86_64/bin/java --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.lang.invoke=ALL-UNNAMED --add-opens java.prefs/java.util.prefs=ALL-UNNAMED -XX:MaxMetaspaceSize=256m -XX:+HeapDumpOnOutOfMemoryError -Xms256m -Xmx512m -Dfile.encoding=US-ASCII -Duser.country=US -Duser.language=en -Duser.variant -cp /home/jenkins/.gradle/wrapper/dists/gradle-5.4.1-bin/e75iq110yv9r9wt1a6619x2xm/gradle-5.4.1/lib/gradle-launcher-5.4.1.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 5.4.1
23:47:08 amazon-ebs: Successfully started process 'Gradle build daemon'
23:47:08 amazon-ebs: An attempt to start the daemon took 3.198 secs.
23:47:08 amazon-ebs: The client will now receive all logging from the daemon (pid: 376). The daemon log file: /home/jenkins/.gradle/daemon/5.4.1/daemon-376.out.log
23:47:08 amazon-ebs: Starting build in new daemon [memory: 519.0 MB]
23:47:08 amazon-ebs: Closing daemon's stdin at end of input.
23:47:08 amazon-ebs: The daemon will no longer process any standard input.
23:47:08 amazon-ebs: Using 1 worker leases.
23:47:08 amazon-ebs: Starting Build
23:47:08 amazon-ebs:
23:47:08 amazon-ebs: > Configure project :buildSrc
23:47:08 amazon-ebs: Evaluating project ':buildSrc' using build file '/tmp/workspace/unitt-cd/unitt-cd-run-unitt-docgen-unitt-experimental/buildSrc/build.gradle'.
23:47:08 amazon-ebs: Compiling build file '/tmp/workspace/unitt-cd/unitt-cd-run-unitt-docgen-unitt-experimental/buildSrc/build.gradle' using SubsetScriptTransformer.
23:47:08 amazon-ebs: Compiling build file '/tmp/workspace/unitt-cd/unitt-cd-run-unitt-docgen-unitt-experimental/buildSrc/build.gradle' using BuildScriptTransformer.
23:47:08 amazon-ebs: using nexus repositories
23:47:08 amazon-ebs: Selected primary task 'build' from project :
23:47:08 amazon-ebs: :buildSrc:compileJava (Thread[Daemon worker,5,main]) started.
23:47:08 amazon-ebs:
23:47:08 amazon-ebs: > Task :buildSrc:compileJava NO-SOURCE
23:47:08 amazon-ebs: file or directory '/tmp/workspace/unitt-cd/unitt-cd-run-unitt-docgen-unitt-experimental/buildSrc/src/main/java', not found
23:47:08 amazon-ebs: Skipping task ':buildSrc:compileJava' as it has no source files and no previous output files.
23:47:08 amazon-ebs: :buildSrc:compileJava (Thread[Daemon worker,5,main]) completed. Took 0.132 secs.
23:47:08 amazon-ebs: :buildSrc:compileGroovy (Thread[Daemon worker,5,main]) started.
23:47:08 amazon-ebs:
23:47:08 amazon-ebs: > Task :buildSrc:compileGroovy FAILED
23:47:08 amazon-ebs: :buildSrc:compileGroovy (Thread[Daemon worker,5,main]) completed. Took 0.077 secs.
23:47:08 amazon-ebs:
23:47:08 amazon-ebs: FAILURE: Build failed with an exception.
23:47:08 amazon-ebs:
23:47:08 amazon-ebs: * What went wrong:
23:47:08 amazon-ebs: Execution failed for task ':buildSrc:compileGroovy'.
23:47:08 amazon-ebs: > You must specify a URL for a Maven repository.
23:47:08 amazon-ebs:
23:47:08 amazon-ebs: * Try:
23:47:08 amazon-ebs: Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output. Run with --scan to get full insights.
23:47:08 amazon-ebs:
23:47:08 amazon-ebs: * Get more help at [https://help.gradle.org](https://help.gradle.org%1B[0m/)
23:47:08 amazon-ebs:
23:47:08 amazon-ebs: BUILD FAILED in 12s
Additional context
This problem is caused by not setting JAVA_HOME as expected by gradle.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the edpBox environment setup and the place where JAVA_HOME is configured; the issue does not name a file. Reproduce the problem by compiling ods-document-generation-svc or ods-provisioning-app in a Box, then verify that Gradle compilation succeeds with JAVA_HOME set.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system, infrastructure
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100