From d714963ba90e57545aa4bebe8b904d0997ce1540 Mon Sep 17 00:00:00 2001 From: Stefan Yonkov Date: Tue, 21 Apr 2026 16:27:59 +0300 Subject: [PATCH 1/9] add claude config --- CLAUDE.md | 85 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 CLAUDE.md diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 00000000..140c8830 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,85 @@ +# multiapps — MTA Model Library + +## Project Role + +This is the **multiapps** repository (`org.cloudfoundry.multiapps`). It is a shared Java +library providing model objects, YAML parsers, and validators for the SAP Multitarget +Application (MTA) specification. It serves as a foundational dependency for the +Cloud Foundry MultiApps Controller. + +## Security Boundary + +This is an **OPEN SOURCE** repository. Never introduce proprietary logic, credentials, +or internal company context into this codebase. + +## Tech Stack + +- **Java 25**, compiled with `maven-compiler-plugin` (source/target 25) +- **JUnit 5** (`junit-jupiter` 6.x) + **Mockito** for testing +- **Maven** multi-module build (parent POM: `multiapps-parent`) + +## Maven Modules + +| Module | Purpose | +|-------------------------|----------------------------------------------------------------| +| `multiapps-common` | Shared utilities: YAML handling (SnakeYAML), JSON (Jackson), XML binding (JAXB), commons | +| `multiapps-common-test` | Shared test utilities and helpers (JUnit/Mockito at compile scope) | +| `multiapps-mta` | MTA model objects, parsers, and validators (depends on `multiapps-common`) | +| `multiapps-coverage` | Aggregates JaCoCo coverage reports across all modules (POM-only) | + +## Build Profiles + +| Profile | Purpose | +|------------|------------------------------------------------------| +| `coverage` | Enables JaCoCo agent for code coverage collection | +| `sonar` | Runs SonarQube analysis (reports to sonarcloud.io) | +| `release` | Signs artifacts (GPG), attaches sources/javadoc, publishes to Maven Central via Sonatype | + +## Build & Test Commands + +```bash +# Full build with tests +mvn clean install + +# Run tests only +mvn test + +# Build, skip tests (for quick local iteration) +mvn clean install -DskipTests + +# Build a single module (e.g., multiapps-mta) +mvn clean install -pl multiapps-mta -am + +# Build with coverage +mvn clean verify -Pcoverage + +# Run SonarQube analysis (requires sonar token) +mvn clean verify -Pcoverage,sonar +``` + +## Formatting Rule + +Before completing any task or committing code, you **MUST** run: + +```bash +mvn spotless:apply +``` + +This ensures the codebase follows the standard formatting rules. The Eclipse formatter +configuration files are located in the `ide/` directory for IDE integration. + +## Dependency Notes + +- Downstream consumers reference this library via the `multiapps.version` property in + their POM files (e.g., `multiapps-controller/pom.xml`). +- When changing public API (model classes, validator interfaces), coordinate updates in + downstream repos before merging. +- Build order for cross-repo changes: `multiapps` -> `multiapps-controller`. + +## Key Libraries + +- **SnakeYAML** — YAML parsing for MTA descriptors +- **Jackson 3.x** — JSON serialization/deserialization +- **Immutables** — annotation-processed value objects (provided scope) +- **Semver4j** — semantic versioning for MTA schema version dispatch +- **Commons Compress** — archive handling for `.mtar` files From 449a34fe03017735f9d849a0d75c90c65e096f73 Mon Sep 17 00:00:00 2001 From: Stefan Yonkov Date: Mon, 4 May 2026 13:38:02 +0300 Subject: [PATCH 2/9] Add formatter for spotless --- ide/mta_formatter_java_eclipse_bridge.xml | 380 ++++++++++++++++++++++ pom.xml | 16 + 2 files changed, 396 insertions(+) create mode 100644 ide/mta_formatter_java_eclipse_bridge.xml diff --git a/ide/mta_formatter_java_eclipse_bridge.xml b/ide/mta_formatter_java_eclipse_bridge.xml new file mode 100644 index 00000000..858ad024 --- /dev/null +++ b/ide/mta_formatter_java_eclipse_bridge.xml @@ -0,0 +1,380 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pom.xml b/pom.xml index 9265222c..b355b22c 100644 --- a/pom.xml +++ b/pom.xml @@ -151,6 +151,22 @@ jacoco-maven-plugin 0.8.14 + + com.diffplug.spotless + spotless-maven-plugin + 3.4.0 + + + + https://raw.githubusercontent.com/cloudfoundry/multiapps/main/ide/mta_formatter_java_eclipse_bridge.xml + + + java|javax,,\\# + + + + + From 946703366d36784dc53fcb54559854fbb98641a3 Mon Sep 17 00:00:00 2001 From: Stefan Yonkov Date: Mon, 4 May 2026 15:46:32 +0300 Subject: [PATCH 3/9] add spotless plugin --- pom.xml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index b355b22c..7590bf14 100644 --- a/pom.xml +++ b/pom.xml @@ -156,14 +156,18 @@ spotless-maven-plugin 3.4.0 + + origin/master - https://raw.githubusercontent.com/cloudfoundry/multiapps/main/ide/mta_formatter_java_eclipse_bridge.xml + + https://raw.githubusercontent.com/cloudfoundry/multiapps/master/ide/mta_formatter_java_eclipse_bridge.xml + java|javax,,\\# - + From f05154d9ed56d8ccb2e66d35d299b043e4122610 Mon Sep 17 00:00:00 2001 From: Stefan Yonkov Date: Fri, 29 May 2026 09:32:51 +0300 Subject: [PATCH 4/9] Udate Junit version - PR comments --- CLAUDE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CLAUDE.md b/CLAUDE.md index 140c8830..c912d767 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -15,7 +15,7 @@ or internal company context into this codebase. ## Tech Stack - **Java 25**, compiled with `maven-compiler-plugin` (source/target 25) -- **JUnit 5** (`junit-jupiter` 6.x) + **Mockito** for testing +- **JUnit 6** (`junit-jupiter` 6.x) + **Mockito** for testing - **Maven** multi-module build (parent POM: `multiapps-parent`) ## Maven Modules From 1f972386ea37d29d7376d6ff22af448751dafa87 Mon Sep 17 00:00:00 2001 From: Stefan Yonkov Date: Fri, 29 May 2026 10:42:56 +0300 Subject: [PATCH 5/9] update formatter --- ide/mta_formatter_java_eclipse_bridge.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ide/mta_formatter_java_eclipse_bridge.xml b/ide/mta_formatter_java_eclipse_bridge.xml index 858ad024..22609dc2 100644 --- a/ide/mta_formatter_java_eclipse_bridge.xml +++ b/ide/mta_formatter_java_eclipse_bridge.xml @@ -270,7 +270,7 @@ - + @@ -323,7 +323,7 @@ - + @@ -334,7 +334,7 @@ - + From 653c96a455306bf118d1fd6bfdf47f4e650c3694 Mon Sep 17 00:00:00 2001 From: Stefan Yonkov Date: Fri, 29 May 2026 10:49:48 +0300 Subject: [PATCH 6/9] fix alignment_for_arguments_in_method_invocation to match IntelliJ --- ide/mta_formatter_java_eclipse_bridge.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ide/mta_formatter_java_eclipse_bridge.xml b/ide/mta_formatter_java_eclipse_bridge.xml index 22609dc2..e0f2b309 100644 --- a/ide/mta_formatter_java_eclipse_bridge.xml +++ b/ide/mta_formatter_java_eclipse_bridge.xml @@ -304,7 +304,7 @@ - + From 40ba9ed3b890d7aeaf8defdd6f94726a6087f152 Mon Sep 17 00:00:00 2001 From: Stefan Yonkov Date: Fri, 29 May 2026 10:53:27 +0300 Subject: [PATCH 7/9] revert alignment_for_arguments_in_method_invocation to 18 - column alignment is correct --- ide/mta_formatter_java_eclipse_bridge.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ide/mta_formatter_java_eclipse_bridge.xml b/ide/mta_formatter_java_eclipse_bridge.xml index e0f2b309..22609dc2 100644 --- a/ide/mta_formatter_java_eclipse_bridge.xml +++ b/ide/mta_formatter_java_eclipse_bridge.xml @@ -304,7 +304,7 @@ - + From 054f9cb3bad40892fa8c866b50a29e74ef946dd5 Mon Sep 17 00:00:00 2001 From: Stefan Yonkov Date: Fri, 29 May 2026 11:06:10 +0300 Subject: [PATCH 8/9] add blank_lines_between_import_groups=1 to align with original eclipse-formatter.xml --- ide/mta_formatter_java_eclipse_bridge.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/ide/mta_formatter_java_eclipse_bridge.xml b/ide/mta_formatter_java_eclipse_bridge.xml index 22609dc2..dc5dceb8 100644 --- a/ide/mta_formatter_java_eclipse_bridge.xml +++ b/ide/mta_formatter_java_eclipse_bridge.xml @@ -240,6 +240,7 @@ + From c9adfb8441354de4159315bec38f2f4809a45076 Mon Sep 17 00:00:00 2001 From: Stefan Yonkov Date: Fri, 29 May 2026 13:26:14 +0300 Subject: [PATCH 9/9] remove formatting --- CLAUDE.md | 11 ----------- pom.xml | 20 -------------------- 2 files changed, 31 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index c912d767..48ea2b28 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -57,17 +57,6 @@ mvn clean verify -Pcoverage mvn clean verify -Pcoverage,sonar ``` -## Formatting Rule - -Before completing any task or committing code, you **MUST** run: - -```bash -mvn spotless:apply -``` - -This ensures the codebase follows the standard formatting rules. The Eclipse formatter -configuration files are located in the `ide/` directory for IDE integration. - ## Dependency Notes - Downstream consumers reference this library via the `multiapps.version` property in diff --git a/pom.xml b/pom.xml index 7590bf14..9265222c 100644 --- a/pom.xml +++ b/pom.xml @@ -151,26 +151,6 @@ jacoco-maven-plugin 0.8.14 - - com.diffplug.spotless - spotless-maven-plugin - 3.4.0 - - - origin/master - - - - https://raw.githubusercontent.com/cloudfoundry/multiapps/master/ide/mta_formatter_java_eclipse_bridge.xml - - - - java|javax,,\\# - - - - -