Deploying a Golo project on CleverCloud
golo new rigolo --type maven
- I will use SparkJava
slf4j-simple
spark-core
- Currently, I'm using version
3.2.0-M6
of Golo
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.21</version>
</dependency>
<dependency>
<groupId>com.sparkjava</groupId>
<artifactId>spark-core</artifactId>
<version>2.5</version>
</dependency>
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>1.1.1</version>
</dependency>
⚠️ When using a -SNAPSHOT version of Golo you may have issues resolving artifacts from public repositories.
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<golo.version>3.2.0-M6</golo.version>
</properties>
-
add a
clevercloud
directory -
inside
clevercloud
directory, add ajar.json
file:{ "build": { "type": "maven", "goal": "package" }, "deploy": { "jarName": "target/rigolo-0.0.1-SNAPSHOT-jar-with-dependencies.jar" } }
change values if needed
Now you can publish your project on
- create an application from your repository
- choose the kind of application:
Java + JAR
- your application has to listen on port
8080
(you'll reach it on the port80
with your browser)
That's all
See it in action: