Maven Configuration
Maven Build Node Configuration
Maven is used to compile and manage Java projects through the main stages of the application lifecycle, including build, deployment, and production delivery. Maven build-node settings can be managed through configuration files and stack-specific environment variables.
Maven Configuration Files
The Maven build node exposes the following main configuration directories:
| Folder | Path | Purpose |
|---|---|---|
| PROJECTS | /var/lib/jelastic/PROJECTS | Stores unpacked Maven project files. |
| conf | /opt/maven/conf | Contains Maven configuration files. |
| hooks | /var/lib/jelastic/hooks | Stores scripts executed before or after build and deployment operations. |
| latest | /usr/java/latest | Contains JDK libraries, tools, and binaries. |
| keys | /var/lib/jelastic/keys | Stores private keys required by applications or node-to-node authentication. |
| vcs | /var/lib/jelastic/vcs | Contains project property files with VCS configuration details. |
PROJECTS Folder
The PROJECTS folder stores unpacked files for projects that were added, built, and deployed through the Maven node.

conf Folder
The conf directory contains the main Maven configuration files:
settings.xml— contains the primary Maven configuration.toolchains.xml— defines which JDK or other tool should be used by embedded plugins during project builds.variables.conf— stores custom variables and memory-related settings.

hooks Folder
The hooks folder stores custom scripts that should run before or after application build and deployment operations.

keys Folder
The keys directory is used for uploading private keys needed by an application. After uploading a key file, reference it with:
Key path
/var/lib/jelastic/keys/{key}

latest Folder
The latest folder contains JDK libraries, tools, binaries, and related files. Existing files can be edited, and additional files can be uploaded when required.

vcs Folder
The vcs directory contains {project_name}.properties files with project configuration information. These files can be opened for inspection but are not editable.

Maven-Specific Variables
Click Additionally beside the Maven node and open the Variables section to review and adjust the stack variables.

| Variable | Purpose |
|---|---|
MAVEN_OPTS | Defines essential Java server options such as -Xmx, -Xms, and -Xmn. |
MAVEN_RUN_ARGS | Sets additional Maven command-line parameters for all projects, such as the number of process threads. |
MAVEN_RUN_ARGS_{project} | Sets additional parameters for one project. Replace spaces and dashes in the project name with underscores. |
MAVEN_DEPLOY_ARTIFACT | Defines the artifact that should be deployed for all projects. |
MAVEN_DEPLOY_ARTIFACT_{project} | Defines the artifact for one project and has higher priority than MAVEN_DEPLOY_ARTIFACT. |

Expected Result
The Maven build node is configured through its exposed directories, files, hooks, keys, JDK resources, VCS metadata, and Maven-specific environment variables.
Important Notes
- The VCS project property files are view-only.
- Store private keys in
/var/lib/jelastic/keysand protect access to them. - Project-specific variable names must use underscores instead of spaces and dashes.
- Project-specific deploy-artifact variables override the global deploy-artifact variable.
- Review Maven and deployment logs after changing build options.
