Java Maven deployment

Clever Cloud offers you to run your Java Maven projects. You can deploy this kind of project without changing your code, but running it on Clever Cloud needs some configuration files, to add parameters like your targeted container for instance.

Note : like other runtimes, Java application need listen on


Maven is essentially a project management and comprehension tool and as such provides a way to help with managing:

  • Builds
  • Documentation
  • Reporting
  • Dependencies
  • SCMs
  • Releases
  • Distribution

About Cargo

To run your app, you can, for example, use plugins like cargo (Find it here). Your application must be set to listen on the port 8080.

Create an application

Refer to the page Deploy an application on Clever Cloud.

Necessary information

The clevercloud/maven.json (maven.json file in clevercloud folder which is at the root of you application) file must contain the goal field to indicate how to start your application:

    "deploy": {
      "goal": "yourgoal"

An example of what can be found as a goal value is:

" -Dexec.mainClass=\"com.example.Main\" assembly:jar-with-dependencies exec:java"

Optional configuration

The full configuration can look like the following:

  "build": {
    "type": "<string>",
    "goal": "<string>"
  "deploy": {
    "goal": "<string>"

You can use the following properties:

Usage Field Description
Optional build -> type can be "maven", "gradle" or "ant"
Optional build -> goal is the target you want to use to build your project
Required deploy -> goal the goal/target and options you want to execute to deploy/run you project

Deploy on Clever Cloud

Application deployment on Clever Cloud is via Git. Follow these steps to deploy your application.

Specifying a profile

If you need to specify a maven profile (either for the build or the deploy goal, you can add it in the goal section:

"-Pmyprofile package"
Edit me on GitHub