From 2c4aca6d6971fa57e4cf089f9f1d409f43673fa4 Mon Sep 17 00:00:00 2001 From: Peter Paul Bakker Date: Sat, 20 Jun 2026 14:23:00 +0000 Subject: [PATCH 1/5] fix: emit task process type in release YAML for cf run-task support Ruby buildpack v4 declares both web and task in default_process_types. Go buildpack only declared web, causing cf run-task to fail with "command presence FAILED" when no --command is given. Add task process type with same command as web, matching Ruby behaviour. Add docs for CF task usage including PropertiesLauncher pattern. Closes #1323 --- docs/container-java_main.md | 4 +++ docs/container-spring_boot.md | 19 ++++++++++++++ src/java/finalize/finalize.go | 3 ++- src/java/finalize/finalize_test.go | 42 +++++++++++++++++++++++++++++- 4 files changed, 66 insertions(+), 2 deletions(-) diff --git a/docs/container-java_main.md b/docs/container-java_main.md index f2bcfc92bd..0cec151abd 100644 --- a/docs/container-java_main.md +++ b/docs/container-java_main.md @@ -25,6 +25,10 @@ If the application uses Spring, [Spring profiles][] can be specified by setting If `java_main_class` is set to one of Spring Boot's launchers (`JarLauncher`, `PropertiesLauncher` or `WarLauncher`), the Java Main Container sets `SERVER_PORT=$PORT` so that the application binds to the CF-assigned port. +## CF Tasks + +The buildpack emits both `web` and `task` process types with the same command so `cf run-task` works without `--command`. When `java_main_class` is set to `PropertiesLauncher`, per-task class overrides are possible at runtime via `-Dloader.main` in `JAVA_OPTS`. + ## Configuration For general information on configuring the buildpack, including how to specify configuration values through environment variables, refer to [Configuration and Extension][]. diff --git a/docs/container-spring_boot.md b/docs/container-spring_boot.md index 25d019bb65..e805967652 100644 --- a/docs/container-spring_boot.md +++ b/docs/container-spring_boot.md @@ -17,6 +17,25 @@ The container expects to run the application creating by running [`gradle distZi If the application uses Spring, [Spring profiles][] can be specified by setting the [`SPRING_PROFILES_ACTIVE`][] environment variable. This is automatically detected and used by Spring. The Spring Auto-reconfiguration Framework will specify the `cloud` profile in addition to any others. +## CF Tasks + +The buildpack includes a `task` process type in the release output using the same command as `web`, so `cf run-task` works without an explicit `--command`. + +To run a task with a **different main class** (batch job, migration, etc.), switch to Spring Boot's `PropertiesLauncher` at staging time: + +```yaml +env: + JBP_CONFIG_JAVA_MAIN: '{java_main_class: "org.springframework.boot.loader.launch.PropertiesLauncher"}' +``` + +Then pass the task-specific class at run time: + +```bash +cf run-task my-app -e JAVA_OPTS="-Dloader.main=com.example.BatchJob" +``` + +`-Dloader.main` is read by Spring Boot's `PropertiesLauncher` — the buildpack passes it through as a JVM system property. `JBP_CONFIG_JAVA_MAIN` is a staging-time setting; `-Dloader.main` is a per-task runtime override. + ## Configuration The Spring Boot Container cannot be configured. diff --git a/src/java/finalize/finalize.go b/src/java/finalize/finalize.go index 16b50598f8..eabbd85044 100644 --- a/src/java/finalize/finalize.go +++ b/src/java/finalize/finalize.go @@ -283,7 +283,8 @@ func (f *Finalizer) writeReleaseYaml(container containers.Container) error { yamlContent := fmt.Sprintf(`--- default_process_types: web: '%s' -`, fullCommand) + task: '%s' +`, fullCommand, fullCommand) if err := os.WriteFile(releaseYamlPath, []byte(yamlContent), 0644); err != nil { return fmt.Errorf("failed to write release YAML: %w", err) diff --git a/src/java/finalize/finalize_test.go b/src/java/finalize/finalize_test.go index d756f2c8d0..2914a87a28 100644 --- a/src/java/finalize/finalize_test.go +++ b/src/java/finalize/finalize_test.go @@ -5,6 +5,7 @@ import ( "github.com/golang/mock/gomock" "os" "path/filepath" + "strings" "time" "github.com/cloudfoundry/java-buildpack/src/java/finalize" @@ -99,7 +100,7 @@ dependencies: [] // Create META-INF/MANIFEST.MF with corresponding content of a Spring Boot app manifestFile := filepath.Join(buildDir, "META-INF", "MANIFEST.MF") - Expect(os.WriteFile(manifestFile, []byte("Spring-Boot-Version: 3.x.x"), 0644)).To(Succeed()) + Expect(os.WriteFile(manifestFile, []byte("Spring-Boot-Version: 4.x.x"), 0644)).To(Succeed()) finalizer.JREName = "OpenJDK" finalizer.ContainerName = "Spring Boot" @@ -243,6 +244,45 @@ dependencies: [] }) }) + Describe("Release YAML", func() { + BeforeEach(func() { + os.Setenv("JBP_CONFIG_JAVA_MAIN", "{java_main_class: com.example.App}") + finalizer.JREName = "OpenJDK" + finalizer.ContainerName = "Java Main" + }) + + AfterEach(func() { + os.Unsetenv("JBP_CONFIG_JAVA_MAIN") + }) + + It("includes both web and task process types with the same command", func() { + Expect(finalize.Run(finalizer)).To(Succeed()) + releaseYAML := filepath.Join(buildDir, "tmp", "java-buildpack-release-step.yml") + content, err := os.ReadFile(releaseYAML) + Expect(err).NotTo(HaveOccurred()) + Expect(string(content)).To(ContainSubstring("web:")) + Expect(string(content)).To(ContainSubstring("task:")) + }) + + It("web and task commands are identical", func() { + Expect(finalize.Run(finalizer)).To(Succeed()) + releaseYAML := filepath.Join(buildDir, "tmp", "java-buildpack-release-step.yml") + content, err := os.ReadFile(releaseYAML) + Expect(err).NotTo(HaveOccurred()) + lines := make(map[string]string) + for _, line := range strings.Split(string(content), "\n") { + line = strings.TrimSpace(line) + if strings.HasPrefix(line, "web:") { + lines["web"] = strings.TrimPrefix(line, "web:") + } + if strings.HasPrefix(line, "task:") { + lines["task"] = strings.TrimPrefix(line, "task:") + } + } + Expect(lines["web"]).To(Equal(lines["task"])) + }) + }) + Describe("javaexec launcher installation", func() { It("installs launcher from buildpack bin/ for packaged buildpack usage", func() { // Default path: /bin/javaexec already written in BeforeEach. From 604af580e465f74c3b25d0d419fd36516f63363a Mon Sep 17 00:00:00 2001 From: Peter Paul Bakker Date: Sun, 21 Jun 2026 18:02:58 +0000 Subject: [PATCH 2/5] fix(tests+docs): improve release YAML test robustness and CF task docs - Replace fragile YAML string-splitting test with regexp-based assertion - Combine two separate finalize.Run() calls into one test - Simplify CF task section in spring_boot doc: remove misplaced PropertiesLauncher example, add cross-reference to java_main doc - Expand CF task section in java_main doc: add PropertiesLauncher pattern with correct --env flag (CF CLI v7+) --- docs/container-java_main.md | 17 ++++++++++++++- docs/container-spring_boot.md | 16 +++++--------- src/java/finalize/finalize_test.go | 35 +++++++++++------------------- 3 files changed, 34 insertions(+), 34 deletions(-) diff --git a/docs/container-java_main.md b/docs/container-java_main.md index 0cec151abd..fa0a943461 100644 --- a/docs/container-java_main.md +++ b/docs/container-java_main.md @@ -27,7 +27,22 @@ If `java_main_class` is set to one of Spring Boot's launchers (`JarLauncher`, `P ## CF Tasks -The buildpack emits both `web` and `task` process types with the same command so `cf run-task` works without `--command`. When `java_main_class` is set to `PropertiesLauncher`, per-task class overrides are possible at runtime via `-Dloader.main` in `JAVA_OPTS`. +The buildpack emits both `web` and `task` process types with the same command so `cf run-task` works without `--command`. + +To run a task with a different main class (batch job, migration, etc.), set `java_main_class` to Spring Boot's `PropertiesLauncher` at staging time: + +```yaml +env: + JBP_CONFIG_JAVA_MAIN: '{java_main_class: "org.springframework.boot.loader.launch.PropertiesLauncher"}' +``` + +Then override the main class per task at run time (requires CF CLI v7+): + +```bash +cf run-task my-app --env JAVA_OPTS="-Dloader.main=com.example.BatchJob" +``` + +`-Dloader.main` is a Spring Boot `PropertiesLauncher` system property -- the buildpack passes it through to the JVM unchanged. `JBP_CONFIG_JAVA_MAIN` is a staging-time setting that applies to both `web` and `task`; `-Dloader.main` is a per-task runtime override. ## Configuration For general information on configuring the buildpack, including how to specify configuration values through environment variables, refer to [Configuration and Extension][]. diff --git a/docs/container-spring_boot.md b/docs/container-spring_boot.md index e805967652..17c8833acf 100644 --- a/docs/container-spring_boot.md +++ b/docs/container-spring_boot.md @@ -21,20 +21,14 @@ If the application uses Spring, [Spring profiles][] can be specified by setting The buildpack includes a `task` process type in the release output using the same command as `web`, so `cf run-task` works without an explicit `--command`. -To run a task with a **different main class** (batch job, migration, etc.), switch to Spring Boot's `PropertiesLauncher` at staging time: - -```yaml -env: - JBP_CONFIG_JAVA_MAIN: '{java_main_class: "org.springframework.boot.loader.launch.PropertiesLauncher"}' -``` - -Then pass the task-specific class at run time: - ```bash -cf run-task my-app -e JAVA_OPTS="-Dloader.main=com.example.BatchJob" +cf run-task my-app # uses the task process type command +cf run-task my-app --command "..." # explicit override ``` -`-Dloader.main` is read by Spring Boot's `PropertiesLauncher` — the buildpack passes it through as a JVM system property. `JBP_CONFIG_JAVA_MAIN` is a staging-time setting; `-Dloader.main` is a per-task runtime override. +To run a task with a different main class (batch job, migration, etc.), see [Java Main Container - CF Tasks][java-main-tasks]. + +[java-main-tasks]: container-java_main.md#cf-tasks ## Configuration The Spring Boot Container cannot be configured. diff --git a/src/java/finalize/finalize_test.go b/src/java/finalize/finalize_test.go index 2914a87a28..87bbe2403f 100644 --- a/src/java/finalize/finalize_test.go +++ b/src/java/finalize/finalize_test.go @@ -5,7 +5,7 @@ import ( "github.com/golang/mock/gomock" "os" "path/filepath" - "strings" + "regexp" "time" "github.com/cloudfoundry/java-buildpack/src/java/finalize" @@ -255,31 +255,22 @@ dependencies: [] os.Unsetenv("JBP_CONFIG_JAVA_MAIN") }) - It("includes both web and task process types with the same command", func() { + It("emits web and task process types with identical commands", func() { Expect(finalize.Run(finalizer)).To(Succeed()) - releaseYAML := filepath.Join(buildDir, "tmp", "java-buildpack-release-step.yml") - content, err := os.ReadFile(releaseYAML) + content, err := os.ReadFile(filepath.Join(buildDir, "tmp", "java-buildpack-release-step.yml")) Expect(err).NotTo(HaveOccurred()) - Expect(string(content)).To(ContainSubstring("web:")) - Expect(string(content)).To(ContainSubstring("task:")) - }) - It("web and task commands are identical", func() { - Expect(finalize.Run(finalizer)).To(Succeed()) - releaseYAML := filepath.Join(buildDir, "tmp", "java-buildpack-release-step.yml") - content, err := os.ReadFile(releaseYAML) - Expect(err).NotTo(HaveOccurred()) - lines := make(map[string]string) - for _, line := range strings.Split(string(content), "\n") { - line = strings.TrimSpace(line) - if strings.HasPrefix(line, "web:") { - lines["web"] = strings.TrimPrefix(line, "web:") - } - if strings.HasPrefix(line, "task:") { - lines["task"] = strings.TrimPrefix(line, "task:") - } + re := regexp.MustCompile(`(?m)^\s+(web|task):\s+'(.+)'$`) + matches := re.FindAllStringSubmatch(string(content), -1) + Expect(matches).To(HaveLen(2), "expected both web and task process types") + + commands := map[string]string{} + for _, m := range matches { + commands[m[1]] = m[2] } - Expect(lines["web"]).To(Equal(lines["task"])) + Expect(commands).To(HaveKey("web")) + Expect(commands).To(HaveKey("task")) + Expect(commands["web"]).To(Equal(commands["task"])) }) }) From 94a28d81d8a8c840da09e2de3726eeaf4d94983f Mon Sep 17 00:00:00 2001 From: Peter Paul Bakker Date: Sun, 21 Jun 2026 18:15:49 +0000 Subject: [PATCH 3/5] docs: fix stale Ruby/rake references in integration README and debugging guide - Replace `bundle exec rake package` with `./scripts/package.sh` - Remove Ruby install requirement from local debugging section - Replace `ruby -e yaml` YAML parser with `grep -oP` in release command examples --- docs/debugging-the-buildpack.md | 6 +++--- src/integration/README.md | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/debugging-the-buildpack.md b/docs/debugging-the-buildpack.md index 425386f990..ff494838cf 100644 --- a/docs/debugging-the-buildpack.md +++ b/docs/debugging-the-buildpack.md @@ -86,7 +86,7 @@ Sometimes logging just isn't going to cut it for debugging. There are times when ### Requirements -The buildpack API consists of three bash scripts. This means that if you've got a Unix like environment with Ruby installed at an appropriate level, a filesystem that looks like what Cloud Foundry will present to the buildpack and a local copy of your buildpack, you can run the bash scripts locally. +The buildpack API consists of bash scripts. This means that if you've got a Unix like environment with a filesystem that looks like what Cloud Foundry will present to the buildpack and a local copy of your buildpack, you can run the bash scripts locally. ### Example invocation @@ -110,7 +110,7 @@ $ $BUILDPACK_ROOT/bin/compile . $TMPDIR -----> Downloading Play Framework Auto Reconfiguration 1.4.0_RELEASE from https://java-buildpack.cloudfoundry.org/auto-reconfiguration/auto-reconfiguration-1.4.0_RELEASE.jar (found in cache) -----> Downloading Spring Auto Reconfiguration 1.4.0_RELEASE from https://java-buildpack.cloudfoundry.org/auto-reconfiguration/auto-reconfiguration-1.4.0_RELEASE.jar (found in cache) -$ $BUILDPACK_ROOT/bin/release . | ruby -e "require \"yaml\"; puts YAML.load(STDIN.read)[\"default_process_types\"][\"web\"]" +$ $BUILDPACK_ROOT/bin/release . | grep -oP "(?<=web: ').*(?=')" PATH=$PWD/.java-buildpack/open_jdk_jre/bin:$PATH JAVA_HOME=$PWD/.java-buildpack/open_jdk_jre $PWD/play-application-1.0.0.BUILD-SNAPSHOT/bin/play-application -J-Djava.io.tmpdir=$TMPDIR -J-XX:MaxPermSize=64M -J-XX:PermSize=64M -J-javaagent:$PWD/.java-buildpack/app_dynamics_agent/javaagent.jar -J-Dappdynamics.agent.applicationName='' -J-Dappdynamics.agent.tierName='Cloud Foundry' -J-Dappdynamics.agent.nodeName=$(expr "$VCAP_APPLICATION" : '.*instance_id[": ]*"\([a-z0-9]\+\)".*') -J-Dappdynamics.agent.accountAccessKey=[REDACTED] -J-Dappdynamics.agent.accountName=[REDACTED] -J-Dappdynamics.controller.hostName=[REDACTED] -J-Dappdynamics.controller.port=443 -J-Dappdynamics.controller.ssl.enabled=true -J-Dhttp.port=$PORT ``` @@ -131,7 +131,7 @@ Running the different stages of the buildpack lifecycle can be made simpler with ```bash $ alias detect='$BUILDPACK_ROOT/bin/detect .' $ alias compile='$BUILDPACK_ROOT/bin/compile . $TMPDIR' -$ alias release='$BUILDPACK_ROOT/bin/release . | ruby -e "require \"yaml\"; puts YAML.load(STDIN.read)[\"default_process_types\"][\"web\"]" | sed "s| exec||"' +$ alias release='$BUILDPACK_ROOT/bin/release . | grep -oP "(?<=web: ').*(?=')" | sed "s| exec||"' ``` [d]: extending-logging.md#configuration diff --git a/src/integration/README.md b/src/integration/README.md index e4580ba095..c9945cefcf 100644 --- a/src/integration/README.md +++ b/src/integration/README.md @@ -24,10 +24,10 @@ Switchblade is a Go-based integration testing framework that supports both Cloud First, create a buildpack zip file: ```bash -bundle exec rake package +./scripts/package.sh ``` -This will create a file like `java-buildpack-v4.x.x.zip` in the project root. +This will create `build/buildpack.zip` in the project root. ### Run Integration Tests From 68b1cbcce5b5359108b0349ab7e37c3f4f2d7a66 Mon Sep 17 00:00:00 2001 From: Peter Paul Bakker Date: Sun, 21 Jun 2026 18:36:08 +0000 Subject: [PATCH 4/5] fix: address Copilot review comments on CF task PR - sort imports stdlib-first in finalize_test.go per gofmt convention - add test: YAML single-quote escaping (TDD, fails before fix) - escape single quotes in release YAML command; YAML single-quoted scalars require ' doubled as '' or the scalar terminates early - replace grep -oP (PCRE, not available on macOS/BSD grep) with portable sed in debugging guide - replace broken single-quoted alias for release() with a shell function; single quotes cannot nest inside single-quoted strings --- docs/debugging-the-buildpack.md | 4 ++-- src/java/finalize/finalize.go | 3 ++- src/java/finalize/finalize_test.go | 19 +++++++++++++++++-- 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/docs/debugging-the-buildpack.md b/docs/debugging-the-buildpack.md index ff494838cf..2143962ff0 100644 --- a/docs/debugging-the-buildpack.md +++ b/docs/debugging-the-buildpack.md @@ -110,7 +110,7 @@ $ $BUILDPACK_ROOT/bin/compile . $TMPDIR -----> Downloading Play Framework Auto Reconfiguration 1.4.0_RELEASE from https://java-buildpack.cloudfoundry.org/auto-reconfiguration/auto-reconfiguration-1.4.0_RELEASE.jar (found in cache) -----> Downloading Spring Auto Reconfiguration 1.4.0_RELEASE from https://java-buildpack.cloudfoundry.org/auto-reconfiguration/auto-reconfiguration-1.4.0_RELEASE.jar (found in cache) -$ $BUILDPACK_ROOT/bin/release . | grep -oP "(?<=web: ').*(?=')" +$ $BUILDPACK_ROOT/bin/release . | sed -n "s/^ web: '\\(.*\\)'$/\\1/p" PATH=$PWD/.java-buildpack/open_jdk_jre/bin:$PATH JAVA_HOME=$PWD/.java-buildpack/open_jdk_jre $PWD/play-application-1.0.0.BUILD-SNAPSHOT/bin/play-application -J-Djava.io.tmpdir=$TMPDIR -J-XX:MaxPermSize=64M -J-XX:PermSize=64M -J-javaagent:$PWD/.java-buildpack/app_dynamics_agent/javaagent.jar -J-Dappdynamics.agent.applicationName='' -J-Dappdynamics.agent.tierName='Cloud Foundry' -J-Dappdynamics.agent.nodeName=$(expr "$VCAP_APPLICATION" : '.*instance_id[": ]*"\([a-z0-9]\+\)".*') -J-Dappdynamics.agent.accountAccessKey=[REDACTED] -J-Dappdynamics.agent.accountName=[REDACTED] -J-Dappdynamics.controller.hostName=[REDACTED] -J-Dappdynamics.controller.port=443 -J-Dappdynamics.controller.ssl.enabled=true -J-Dhttp.port=$PORT ``` @@ -131,7 +131,7 @@ Running the different stages of the buildpack lifecycle can be made simpler with ```bash $ alias detect='$BUILDPACK_ROOT/bin/detect .' $ alias compile='$BUILDPACK_ROOT/bin/compile . $TMPDIR' -$ alias release='$BUILDPACK_ROOT/bin/release . | grep -oP "(?<=web: ').*(?=')" | sed "s| exec||"' +$ release() { $BUILDPACK_ROOT/bin/release . | sed -n "s/^ web: '\\(.*\\)'$/\\1/p" | sed "s| exec||"; } ``` [d]: extending-logging.md#configuration diff --git a/src/java/finalize/finalize.go b/src/java/finalize/finalize.go index eabbd85044..264f5aabae 100644 --- a/src/java/finalize/finalize.go +++ b/src/java/finalize/finalize.go @@ -280,11 +280,12 @@ func (f *Finalizer) writeReleaseYaml(container containers.Container) error { } releaseYamlPath := filepath.Join(tmpDir, "java-buildpack-release-step.yml") + escapedCommand := strings.ReplaceAll(fullCommand, "'", "''") yamlContent := fmt.Sprintf(`--- default_process_types: web: '%s' task: '%s' -`, fullCommand, fullCommand) +`, escapedCommand, escapedCommand) if err := os.WriteFile(releaseYamlPath, []byte(yamlContent), 0644); err != nil { return fmt.Errorf("failed to write release YAML: %w", err) diff --git a/src/java/finalize/finalize_test.go b/src/java/finalize/finalize_test.go index 87bbe2403f..56eb34e5b9 100644 --- a/src/java/finalize/finalize_test.go +++ b/src/java/finalize/finalize_test.go @@ -1,17 +1,18 @@ package finalize_test import ( - "github.com/cloudfoundry/java-buildpack/src/internal/mocks" - "github.com/golang/mock/gomock" "os" "path/filepath" "regexp" "time" + "github.com/cloudfoundry/java-buildpack/src/internal/mocks" "github.com/cloudfoundry/java-buildpack/src/java/finalize" "github.com/cloudfoundry/libbuildpack" + "github.com/golang/mock/gomock" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" + "gopkg.in/yaml.v2" ) var _ = Describe("Finalize", func() { @@ -272,6 +273,20 @@ dependencies: [] Expect(commands).To(HaveKey("task")) Expect(commands["web"]).To(Equal(commands["task"])) }) + + It("escapes single quotes in commands so release YAML is valid", func() { + os.Setenv("JBP_CONFIG_JAVA_MAIN", `{java_main_class: com.example.App, arguments: "--message=it's alive"}`) + Expect(finalize.Run(finalizer)).To(Succeed()) + content, err := os.ReadFile(filepath.Join(buildDir, "tmp", "java-buildpack-release-step.yml")) + Expect(err).NotTo(HaveOccurred()) + + var parsed struct { + DefaultProcessTypes map[string]string `yaml:"default_process_types"` + } + Expect(yaml.Unmarshal(content, &parsed)).To(Succeed(), "release YAML must be valid") + Expect(parsed.DefaultProcessTypes["web"]).To(ContainSubstring("it's alive")) + Expect(parsed.DefaultProcessTypes["task"]).To(ContainSubstring("it's alive")) + }) }) Describe("javaexec launcher installation", func() { From 7615f2371f0578fcf8922444c6aac986d2f23f93 Mon Sep 17 00:00:00 2001 From: Peter Paul Bakker Date: Sun, 21 Jun 2026 18:55:24 +0000 Subject: [PATCH 5/5] docs: unescape YAML single quotes and strip exec prefix in debug commands sed extraction outputs YAML-escaped '' verbatim; add s/''/'/g unescape. Replace broken s| exec|| (matched nothing for javaexec commands) with s/exec // which removes first occurrence, handling both bare `exec $DEPS_DIR/...` and memcalc prefix `... && exec $DEPS_DIR/...`. Combine both substitutions into one sed call. --- docs/debugging-the-buildpack.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/debugging-the-buildpack.md b/docs/debugging-the-buildpack.md index 2143962ff0..93ccd76187 100644 --- a/docs/debugging-the-buildpack.md +++ b/docs/debugging-the-buildpack.md @@ -110,7 +110,7 @@ $ $BUILDPACK_ROOT/bin/compile . $TMPDIR -----> Downloading Play Framework Auto Reconfiguration 1.4.0_RELEASE from https://java-buildpack.cloudfoundry.org/auto-reconfiguration/auto-reconfiguration-1.4.0_RELEASE.jar (found in cache) -----> Downloading Spring Auto Reconfiguration 1.4.0_RELEASE from https://java-buildpack.cloudfoundry.org/auto-reconfiguration/auto-reconfiguration-1.4.0_RELEASE.jar (found in cache) -$ $BUILDPACK_ROOT/bin/release . | sed -n "s/^ web: '\\(.*\\)'$/\\1/p" +$ $BUILDPACK_ROOT/bin/release . | sed -n "s/^ web: '\\(.*\\)'$/\\1/p" | sed "s/''/'/g; s/exec //" PATH=$PWD/.java-buildpack/open_jdk_jre/bin:$PATH JAVA_HOME=$PWD/.java-buildpack/open_jdk_jre $PWD/play-application-1.0.0.BUILD-SNAPSHOT/bin/play-application -J-Djava.io.tmpdir=$TMPDIR -J-XX:MaxPermSize=64M -J-XX:PermSize=64M -J-javaagent:$PWD/.java-buildpack/app_dynamics_agent/javaagent.jar -J-Dappdynamics.agent.applicationName='' -J-Dappdynamics.agent.tierName='Cloud Foundry' -J-Dappdynamics.agent.nodeName=$(expr "$VCAP_APPLICATION" : '.*instance_id[": ]*"\([a-z0-9]\+\)".*') -J-Dappdynamics.agent.accountAccessKey=[REDACTED] -J-Dappdynamics.agent.accountName=[REDACTED] -J-Dappdynamics.controller.hostName=[REDACTED] -J-Dappdynamics.controller.port=443 -J-Dappdynamics.controller.ssl.enabled=true -J-Dhttp.port=$PORT ``` @@ -131,7 +131,7 @@ Running the different stages of the buildpack lifecycle can be made simpler with ```bash $ alias detect='$BUILDPACK_ROOT/bin/detect .' $ alias compile='$BUILDPACK_ROOT/bin/compile . $TMPDIR' -$ release() { $BUILDPACK_ROOT/bin/release . | sed -n "s/^ web: '\\(.*\\)'$/\\1/p" | sed "s| exec||"; } +$ release() { $BUILDPACK_ROOT/bin/release . | sed -n "s/^ web: '\\(.*\\)'$/\\1/p" | sed "s/''/'/g; s/exec //"; } ``` [d]: extending-logging.md#configuration