Virgo recipe "XYZ"

Virgo Homepage


This guide is inspired by "XYZ" from the Spring Guides.



Shopping list


Only Virgo Server for Apache Tomcat and Virgo Jetty Server are supported by the Virgo Tooling.


  • Original "XYZ"

  • TBD - additional ingredient A

  • TBD - additional ingredient B


Get the code

Clone the code from the Git repository: Sample Git repository:

$ cd ~/MyAwesomeProjectDirectory/
$ git clone git://
$ cd org.eclipse.virgo.samples
$ cd recipe-xyz

Once inside the source directory of this recipe - your are good to go.

Create the Custom Virgo Runtime

Create your own Virgo runtime with Gradle and Dockerizor:

$ ./gradlew :recipe-xyz-runtime dockerize

The custom Virgo Runtime is packaged as tar archive and available from the runtime build directory. Extract the runtime into some directory - let’s say into VIRGO_HOME.


You’ll need a Docker daemon running in order to create your custom Virgo runtime. For more information please refer to the Dockerizor documentation.

Create Eclipse Project Metadata

Create the Eclipse IDE metadata with:

$ ./gradlew eclipse

Prepare the Virgo Tooling

Download Eclipse IDE for Java EE Developers e.g. Eclipse Mars.2 (4.5.2).

Start your Eclipse IDE and add the Virgo Tooling to your Eclipse IDE.

Optionally add the Docker Tooling to your Eclipse IDE.

Import the code into your Eclipse IDE

Now you can menu:Import[Gradle > Gradle Project] into your IDE. The project folder is called recipe-xyz and lies directly in the "Sample Applications" folder you created previously with the Git clone command. (org.eclipse.virgo.samples).


Before you can drag’n’drop the project onto your freshly created Virgo Server you might have to execute menu:Virgo[Run Generation] of META-INF/MANIFEST.MF (via a right click on the project) within your Eclipse IDE.

Create new Virgo Server Runtime

Define a new server

Within the IDE menu:New[Server > EclipseRT > Virgo Runtime] and choose the directory of the previously installed Virgo server VIRGO_HOME.



Let’s taste


Dockerise the Application

We use Gradle and Dockerizor to build the application. Instead of running the sample within the Eclipse IDE you can build a Docker image:

$ ./gradlew dockerize

and run the application with:

$ docker run --rm -it --name xyz --publish 8080:8080 virgo-recipe/xyz-app