How do I Configure Maven under my cloudjiffy environment

Maven is a tool for compiling and managing Java projects. At CloudJiffyCloud PaaS, it’s provisioned out-of-box to cover all the main stages of your Java application lifecycle - from building & deploying till their pushing onto production.

Herewith, all the adjustable Maven server settings can be set and/or changed with:
 
  • configuration files
  • environment variables

Maven Configuration Files

The main Maven build node configuration files can be located within the following server directories:

 

Folder Path
PROJECTS /var/lib/jelastic/PROJECTS
conf /opt/maven/conf
hooks /var/lib/jelastic/hooks
latest /usr/java/latest
keys /var/lib/jelastic/keys
vcs /var/lib/jelastic/vcs

 

PROJECTS

The PROJECTS folder is used for storing files of the unpacked project that were added to, built and deployed via Maven node.





conf

The conf directory contains the following files:

  • settings.xml - contains the main Maven configurations
  • toolchains.xml - allows to set which JDK (or other tool) should be used by embedded plugins during the project build
  • variables.conf - is used to set your custom variables, to configure memory settings, etc

 


keys

The keys directory is used as a location for uploading private keys which are needed for your application.

Just generate your key, save it as a simple file and upload to the keys folder. Now, you can use it for different cases (e.g. for authentication between nodes) by simply stating the appropriate /var/lib/jelastic/keys/{key} path.




latest

The latest folder contains all Java project files, where you can edit the required settings, upload additional libraries, tools, binaries, etc.




Maven-Specific Variables

In addition to the configuration files, Maven build node can be managed through providing (or adjusting) some of the environment variables, integrated specifically for this stack template:


1. Click the Additionally button next to your Maven node and navigate to the Variables section.




2. In the opened window, you’ll see the list of default variables for the stack, which can be adjusted up to your needs.

 



Below, the Maven-specific variables are listed:

  • MAVEN_OPTS - allows to define values for the most essential Java server options, e.g. -Xmx-Xms-Xmn, etc
  • MAVEN_RUN_ARG - specifies additional Maven command-line parameters, which should be set for all Maven projects (for example, to define the number of process threads)
  • MAVEN_RUN_ARG_{project} - sets additional parameters for a particular project; herewith, note that the {project} name should be stated with underscores "_" instead of spaces and dashes

In this way, with CloudJiffy PaaS you can take a full control over the Maven build node and configure it as required according to your Java project specifics.

 


Was this article helpful?

mood_bad Dislike 0
mood Like 0
visibility Views: 10655