Question

I'm testing out Spring Boot and was trying to upload a Spring Boot JAR to CloudBees using the JVM Runtime Container.

The preferred packaging for Spring Boot apps is a JAR file that can be run with the "java -jar" command line option.

I was unable to upload one of these JARs to RUN@Cloud and ended up creating a ZIP file containing the various JARs and setting classpath, etc. This required me to create a custom build script for CloudBees rather than a post processor that just uploaded the JAR as built by the Spring Boot Gradle Plugin.

It would be nice if RUN@Cloud, the "bees" command and documentation were updated to provide support for single-jar apps that are started with "java -jar", is there a way I can do this?

Was it helpful?

Solution

You can upload a jar with the java stack but you still need to specify the class and classpath (http://developer.cloudbees.com/bin/view/RUN/Java+Container). The java container does not currently use "java -jar"

Example:

bees app:deploy -t java -R java_version=1.7         
 -R class=org.springframework.boot.loader.JarLauncher app.jar

An example repo:

https://github.com/msgilligan/springboot-cloudbees-hello

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top