GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - cloudfoundry/java-test-applications: Applications used for testing the Java buildpack

BranchesTags
Open more actions menu

Latest commit

 

History

390 Commits
390 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
ci
ci
 
 
core
core
 
 
dist-zip-application
dist-zip-application
 
 
ejb-application
ejb-application
 
 
executable-war-application-boot3
executable-war-application-boot3
 
 
executable-war-application
executable-war-application
 
 
gradle/wrapper
gradle/wrapper
 
 
groovy-application
groovy-application
 
 
java-main-application-boot3
java-main-application-boot3
 
 
java-main-application
java-main-application
 
 
java-task-application
java-task-application
 
 
main-class-war-application
main-class-war-application
 
 
simple-java-application
simple-java-application
 
 
spring-common
spring-common
 
 
web-application
web-application
 
 
.gitignore
.gitignore
 
 
.java-version
.java-version
 
 
LICENSE
LICENSE
 
 
NOTICE
NOTICE
 
 
README.md
README.md
 
 
RELEASE.md
RELEASE.md
 
 
build.gradle
build.gradle
 
 
gradle.properties
gradle.properties
 
 
gradlew
gradlew
 
 
gradlew.bat
gradlew.bat
 
 
java-test-applications.iml
java-test-applications.iml
 
 
settings.gradle
settings.gradle
 
 

Repository files navigation

Java Test Applications

A collection of applications used for testing the Java buildpack.

Applications

Spring Boot 4.1 (Java 21) — multi-module build

Name Description
dist-zip-application A Spring Boot 4.1 application, deployed as a distZip
ejb-application A Jakarta EE 10 EJB application
groovy-application A Spring Boot 4.1 application started with groovy
java-main-application A Spring Boot 4.1 application started with java -jar
java-task-application A Spring Boot 4.1 CF task application. Tests Spring Boot Start-Class detection and JBP_CONFIG_JAVA_MAIN class override. Push with instances: 0, run via cf run-task
web-application A Spring MVC 4.1 application (Servlet 6 / WAR)
executable-war-application A Spring Boot 4.1 executable WAR (bootWar, WarLauncher)
main-class-war-application A non-Boot WAR with a Main-Class manifest entry that starts a tiny HTTP server on $PORT

Spring Boot 3.5 (Java 17) — standalone projects

Name Description
simple-java-application A dependency-free JDK HttpServer app started with java -jar, runs on Java 8 and up, starts in under a second; serves GET /, /input-arguments, /system-properties, /environment-variables, /class-path
java-main-application-boot3 A Spring Boot 3.5 application started with java -jar
executable-war-application-boot3 A Spring Boot 3.5 executable WAR (bootWar, WarLauncher), serves GET /

Standalone projects have their own build.gradle and Gradle wrapper and are not included in the root multi-module build. Build them from their own directory.

Output Content

⚠️ These applications are for CI/integration testing only. Endpoints such as /spring-env, /environment-variables, and /system-properties can expose sensitive runtime values (credentials, service bindings, system properties). Never deploy to production or shared environments.

All applications support the following REST operations:

URI Description
GET / The health of the application
GET /active-profiles The active Spring profiles (e.g. ["cloud"] when java-cfenv is active)
GET /class-path The JVM system classpath (boot loader only — see /loaded-jars for full picture)
GET /environment-variables The environment variables available to the application
GET /input-arguments The list of JVM input arguments for the application
GET /loaded-jars All jars loaded by the full classloader chain including BOOT-INF/lib/
POST /out-of-memory The URL to trigger an out of memory error
GET /request-headers The http request headers of the current request
GET /security-providers The system security providers available to the application
GET /spring-env?key=<property> A single Spring Environment property value (404 if absent)
GET /system-properties The system properties available to the application

java-main-application-boot3 exposes only GET / (health).

Building

Prerequisites

  • JDK 21 for the multi-module build (Spring Boot 4.1 modules)
  • JDK 17 for standalone Spring Boot 3.5 projects

Note: This applies to the root multi-module build (Gradle 9.6.1 / ASM 9.9, supports Java 21–26). java-main-application-boot3 is a standalone project with its own Gradle wrapper — check its wrapper version separately. Java 27+ requires a newer Gradle release. Java 21 is recommended — it matches the project toolchain. To pin the daemon, add org.gradle.java.home=/path/to/java21 in a local (uncommitted) gradle.properties.

Multi-module build (Spring Boot 4.1)

./gradlew

Standalone projects (Spring Boot 3.5)

cd java-main-application-boot3
./gradlew bootJar

Building Behind a Proxy

Since this project downloads its dependencies from the internet, building behind a proxy requires some extra effort. Configure Gradle with the following system properties (more information here):

./gradlew -Dhttp.proxyHost=<HOST> -Dhttp.proxyPort=<PORT>

Deploying to Cloud Foundry

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

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

Running Tests

To run the tests, do the following:

./gradlew

License

The project is released under version 2.0 of the Apache License.

About

Applications used for testing the Java buildpack

Resources

Readme
Apache-2.0 license

Security policy

Security policy
Activity
Custom properties

Stars

33 stars

Watchers

20 watching

Forks

59 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.