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-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-application |
HTTP Response | A Spring Boot CLI web application |
web-application |
HTTP Response | A web application that uses Spring MVC and Servlet 3 |
All applications output the following content:
java.lang:type=Runtime/ClassPathSystem.getenv()java.lang:type=Runtime/InputArgumentsSystem.getProperties()All web application output the following additional content:
This project is built with Gradle. To build the artifacts, install Play and Grails 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.
$ claude mcp add java-test-applications \
-- python -m otcore.mcp_server <graph>