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://git.eclipse.org/gitroot/virgo/org.eclipse.virgo.samples.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
$ ./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
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. (
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
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