A collection of applications used for testing the Java buildpack.
Name | Description |
---|---|
grails-application |
A Grails application, deployed as a WAR |
groovy-application |
An application started with groovy |
java-main-application |
A Spring Boot application started with java -jar |
play-application |
A Play Framework application, deployed as a dist |
ratpack-application |
A Ratpack application, deployed as a distZip |
spring-boot-cli-application |
A Spring Boot CLI application, deployed with spring grab |
spring-boot-cli-jar-application |
A Spring Boot CLI application, deployed with spring jar |
web-application |
A Spring MVC application using Servlet 3 |
web-servlet-2-application |
A Spring MVC application using Servlet 2 |
All applications support the following REST operations:
URI | Description |
---|---|
/ |
The health of the application |
/class-path |
The classpath of the application |
/environment-variables |
The environment variables available to the application |
/input-arguments |
The list of JVM input arguments for the application |
/system-properties |
The system properties available to the application |
/datasource/check-access |
The ability of the application to access a RDBMS |
/datasource/url |
The URL of the application's DataSource |
/redis/check-access |
The ability of the application to access Redis |
/redis/url |
The URL of the application's Redis |
/mongodb/check-access |
The ability of the application to access MongoDB |
/mongodb/url |
The URL of the application's MongoDB |
/rabbit/check-access |
The ability of the application to access RabbitMQ |
/rabbit/url |
The URL of the application's RabbitMQ |
This project is built with JDK 7 and Gradle. To build the artifacts, install JDK 7, Play, and Grails, install Spring Boot by following these instructions, and then run:
./gradlew
Since this project downloads its dependencies from the internet, building behing a proxy requires some extra effort. In order configure gradle properly, use the following system properties. More information can be found here.
./gradlew -Dhttp.proxyHost=<HOST> -Dhttp.proxyPort=<PORT>
Each test application contains a manifest.yml
file which allows the built application to be deployed to Cloud Foundry by simply issuing:
cf push
To avoid clashing with the URLs of other applications, you should specify your own subdomain for the application (unless the test application does not need a subdomain).
Failure testing is supported for each of the above applications by setting a suitable environment variable.
If the environment variable FAIL_INIT is set, the application will fail to initialize:
cf set-env <application name> FAIL_INIT true
If the environment variable FAIL_OOM is set, the application will repeatedly exhaust the heap until the JVM is killed:
cf set-env <application name> FAIL_OOM true
To run the tests, do the following:
./gradlew
Pull requests are welcome; see the contributor guidelines for details.
The Tomcat Builder is released under version 2.0 of the Apache License.