A collection of applications used for testing the Java buildpack.
Name | Output Destination | Description |
---|---|---|
grails-application |
HTTP Response | A Grails application created by issuing grails create-app |
groovy-application |
System.out |
An application started with groovy . Since this application does not service web requests, you can select none for its subdomain and domain when you deploy it to Cloud Foundry. |
java-main-application |
System.out |
An application started with java -jar . Since this application does not service web requests, you can select none for its subdomain and domain when you deploy it to Cloud Foundry. |
java-main-with-web-inf-application |
System.out |
An application started with java -jar . Since this application does not service web requests, you can select none for its subdomain and domain when you deploy it to Cloud Foundry. |
play-application |
HTTP Response | A Play application created by issuing play new play-application |
spring-boot-cli-application |
HTTP Response | A Spring Boot CLI web application |
web-application |
HTTP Response | A web application that uses Spring MVC and Servlet 3 |
web-servlet-2-application |
HTTP Response | A web application that uses Spring MVC and Servlet 2 |
All applications support the following REST operations:
URI | HTTP request | Description |
---|---|---|
/ |
GET | The health of the application |
/class-path |
GET | A list of JARs on the application classpath |
/datasource-check-access |
GET | The ability of the application to access the database |
/datasource-url |
GET | The URL of the application's DataSource |
/environment-variables |
GET | A map of environment variable names to values |
/input-arguments |
GET | A list of JVM input arguments |
/system-properties |
GET | A map of system property names to values |
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
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.