Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default jdk is not set in edpBox #1157

Open
victorpablosceruelo opened this issue Jun 23, 2022 · 0 comments
Open

Default jdk is not set in edpBox #1157

victorpablosceruelo opened this issue Jun 23, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@victorpablosceruelo
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant