I'm running Bamboo OnDemand and by default, it tries to compile with Java 8. The odd thing is under the agent configuration, capabilities, JDK8 isn't even listed. Just 5, 6 and 7.
Anyway, I've got a plan that checks out the project from Git and tries to build it using gradlew. The compilation files because it's using JDK8. So how do I configure the agent to use specifically JDK7.
Thanks.
Thanks Rafael.
I ended up going with a different solution. Since I'm already using EBS to customize my elastic instance, I just added the following lines to the file /mnt/bamboo-ebs/profile-extras.sh
before making my snapshot.
export JAVA_HOME=/opt/jdk-7 export PATH=$PATH:$JAVA_HOME/bin
This seems to have solved my problem.
Hello Michael,
I haven't tested but you could try and create a plan variable by providing the path to the Java version you want to use and add this variable to your build file.
Please, refer to Bamboo variables documentation for further information.
Otherwise, it would be required to run an elastic agent and downgrade the java version used to run Bamboo, which is not recommended.
Those are the options you have.
—
Kind regards,
Rafael P. Sperafico
Atlassian Support
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Michael,
Thank you for your question.
Have you attempted on setting up the path to JDK?
compile.options.fork=true; compile.options.forkOptions.executable='path/to/javac'
If you find this answer useful, I would kindly ask you to accept it so the same will be visible to others who might be facing the same issue you have inquired.
Thank you for your understanding.
—
Kind regards,
Rafael P. Sperafico
Atlassian Support
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That requires me to change the gradle build file and to hardcode a path to javac. That type of info shouldn't be hardcoded in the build file in my opinion as it makes it harder to build in other environments (i.e. develop machines).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.