This is a Java engine used to launch Java apps on Nanobox.
To use the Java engine, specify java
as your engine
in your boxfile.yml.
run.config:
engine: java
When running a build, this engine compiles code by doing the following:
Maven (you can customize with the compile
option in the maven settings:
mvn -B -DskipTests=true clean install
Gradle (you can customize with the compile
option in the gradle settings):
gradle build
This engine exposes configuration options through the boxfile.yml, a yaml config file used to provision and configure your app's infrastructure when using Nanobox.
run.config:
engine.config:
# Java Settings
runtime: oracle-jdk8
# Maven Settings
maven_version: '3.3'
# Gradle Settings
gradle_version: '4.2'
# Node.js Settings
nodejs_runtime: nodejs-4.4
Java Settings
Maven Settings
Gradle Settings
Node.js Settings
The following setting allows you to define your Java runtime environment.
Specifies which Java runtime and version to use. The following runtimes are available:
- openjdk7
- openjdk8
- oracle-jdk8 (default)
- sun-jdk6
- sun-jdk7
- sun-jdk8
run.config:
engine.config:
runtime: openjdk8
The following setting allows you to configure Maven to your specific needs.
Defines which version of Maven to use. Available versions depend on which version of Java you're using.
- 3.0
- 3.1
- 3.2
- 3.0
- 3.1
- 3.2
- 3.3
- 3.0
- 3.1
- 3.2
- 3.3
run.config:
engine.config:
maven_version: '3.3'
Define a custom build command. Useful if you need to do something other than the default mvn -T 4.0C -B -DskipTests=true clean install
like mvn package
.
run.config:
engine.config:
maven_version: '3.3'
compile: 'mvn clean package'
If you want to use the Gradle build tool, you can configure which version you want to use. The following settings are valid:
Defines which version of Gradle to use from the distribution list.
run.config:
engine.config:
gradle_version: '4.2'
Define a custom build command. Useful if you need to do something other than the default gradle build
like gradle shadowJar
.
run.config:
engine.config:
gradle_version: '4.2'
compile: 'gradle shadowJar'
Many applications utilize Javascript tools in some way. This engine allows you to specify which Node.js runtime you'd like to use.
Specifies which Node.js runtime and version to use. You can view the available Node.js runtimes in the Node.js engine documentation.
run.config:
engine.config:
nodejs_runtime: nodejs-4.4
This is a Java engine provided by Nanobox. If you need help with this engine, you can reach out to us in the Nanobox Slack channel (access can be requested at slack.nanoapp.io). If you are running into an issue with the engine, feel free to create a new issue on this project.