About Codenvy Build

A build system provides a mechanism to compile files, create packages and artefacts, run unit tests, resolve dependencies, and gain access to external libraries. Codenvy’s core build system is based upon Maven. In the future, we will be opening up Codenvy to support other build systems. Codenvy is linked to Maven central to access centralized libraries, and also runs a local Nexus that stores libraries for use by our customers. With Maven you can create sophisticated compilation and packaging sequences, access external libraries, and load your own local libraries. This section teaches you what is needed to make use of Maven with your projects.

Getting Started With Maven

Maven is a popular build manager for Java projects similar to Apache Ant. Maven also supports Ruby, C#, Scala, and other languages, and uses pom.xml file to describe the project, the configuration of plugins, its dependencies on other external modules and libraries, the packaging (for example, war or jar for Java) etc. You can find a more detailed description of Maven’s pom.xml file at Maven website and general info at


Check out Publishing JAR Projects and Managing Project Dependencies section of this manual to learn how to publish own Java Libraries and configure pom.xml files to use them in your projects.

Configuring Project Dependencies

You can use popular Java libraries in your projects, by adding relevant dependencies to a project’s pom.xml file, making necessary import statements and adding relevant strings to project’s class file. Below is an example of using a popular commons.lang library from Nexus Central.

  • a supported commons-lang library has been found on Nexus Central


  • open an existing Spring project or create a new one, and add a new dependency to its pom.xml file


  • save the project and update dependency at Project > Update Dependency
  • open Java class file, in our case and add a new import statement and string


(info) You can call code autocomplete feature and choose one of the many available string values, like user name or user time zone (user country has been chosen in the above screenshot)


  • Save the project and run the app from Run > Run Application menu
  • Enter name in the box and check out the results


The app returned info on the entered name and user country.

Surefire Reports

Codenvy users can access Maven’s surefire reports right from the Output Tab. If a build fails because of a failed test, you will find relevant information in the Output panel with the link to surefire reports.


Reports in txt and xml extensions are available.

The txt report focuses on code lines that caused test failures.

Test set: hello.SayHelloTest
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.022 sec - FAILURE!
testSayHello(hello.SayHelloTest)  Time elapsed: 0.008 sec - FAILURE!
	at junit.framework.Assert.assertTrue(
	at junit.framework.Assert.assertTrue(
	at hello.SayHelloTest.testSayHello(

Here’s a short video with an example of a failed build and a closer look at surefire reports

Add a Local Library

If you need to use a library that is not in Maven’s central repository, it is possible to manually add a local JAR file to your project:

  • add the following to your project’s pom.xml file
  • add a dependency for your library to pom.xml file, something like
  • create folder in project root – /repo/info/aduna/commons/aduna-commons-text/2.7.0/ which is a standard structure of maven repository where folders under the repo folder are named as group ID elements, artifact ID and version respectively, and upload your local jar there

Up ↑