Skip to content

docs(cf-env): add Spring Boot 4.x test coverage and improve docs#1341

Open
stokpop wants to merge 2 commits into
cloudfoundry:mainfrom
stokpop:fix/cf-env-spring-boot-4x
Open

docs(cf-env): add Spring Boot 4.x test coverage and improve docs#1341
stokpop wants to merge 2 commits into
cloudfoundry:mainfrom
stokpop:fix/cf-env-spring-boot-4x

Conversation

@stokpop

@stokpop stokpop commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR adds missing test coverage, improves docs, and fixes a misleading log line. No functional code changes to the cf-env detection or installation logic.

Changes

Tests

  • Add detection tests for Spring Boot 4.1 across all layouts (BOOT-INF/lib, lib/, WEB-INF/lib, META-INF/MANIFEST.MF)
  • Condense Spring Boot 3.x tests — layout variants now covered by 4.x tests

Docs (docs/framework-java-cfenv.md)

  • Update detection criterion to cover both SB 3.x and 4.x
  • Add version mapping table: SB 3.x → cfenv 3.x, SB 4.x → cfenv 4.x
  • Clarify cloud Spring profile is activated by the java-cfenv library at runtime, not the buildpack
  • Add JBP_CONFIG_JAVA_CF_ENV configuration section with enable/disable/unset examples and when to disable

Logging fix (src/java/supply/supply.go)

  • frameworkVersionSuffix now shows (default: X.Y.Z) instead of (X.Y.Z), making clear this is the manifest default version — not necessarily what gets installed (relevant for java-cfenv which selects 3.x or 4.x based on detected Spring Boot version)

Before:

Installing Java CF Env (3.5.1)

After:

Installing Java CF Env (default: 3.5.1)

Please review if complete or must be extended.

stokpop added 2 commits July 1, 2026 09:42
- Add detection tests for SB 4.0 and 4.1 (BOOT-INF/lib, lib/, WEB-INF/lib, MANIFEST.MF)
- Update detection criterion to cover both SB 3.x and 4.x
- Add version mapping table: SB 3.x → cfenv 3.x, SB 4.x → cfenv 4.x
- Clarify cloud profile is activated by the library at runtime, not the buildpack
- Add JBP_CONFIG_JAVA_CF_ENV configuration section with enable/disable examples
- Document when to disable (manual VCAP_SERVICES handling, unwanted cloud profile, conflicts)
… log

- frameworkVersionSuffix now shows '(default: X.Y.Z)' instead of '(X.Y.Z)'
  making clear this is the manifest default, not necessarily the installed version
- Reverts java-cfenv DependencyIdentifier back to 'java-cfenv' (no hack needed)
- Removes extra Info log from JavaCfEnvFramework.Supply()
Result: single 'Installing Java CF Env (default: 3.5.1)' line; actual
installed version visible from libbuildpack install line
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant