Authoritative template:
openclaw-spring-boot-starter/pom.xml(2.7.x,commit b091ee4)
Organization extensions: §6 at the end; complete template:assets/pom-template.xml
Capability Boundaries
✅ Strong Suits
- POM structure iron rules — element order + three-section properties + three metadata sections + complete build/profiles
- Ten-branch matrix — one source tree adapts to ten lines of Spring Boot 2.3~4.1
- Release workflow — tag → Central → SNAPSHOT rolling → parent version verification
- Quality gates — JaCoCo BUNDLE LINE ≥ 90% haltOnFailure
- JDK compatibility rules — java.version=8 forbids 1.8, JDK 21 compiles all lines
❌ Out of Scope
- Pure Java component/SDK (no Spring dependency) → use
java-component-patterns - The component's own business logic implementation → only constrains the project structure
The mistakes LLMs make most often
| # | Mistake | Correct approach |
|---|---|---|
| 1 | properties flattened, not classified or sorted | Three-section: Basic → Third-Party → Maven Plugin, natural sorting within each section |
| 2 | Deleting licenses/scm/developers | Keep and standardize(required for Central publishing), with Chinese comments for each section |
| 3 | java.version write 1.8 |
write 8(compiler 3.15.0 reports an error for --release 1.8 ) |
| 4 | surefire argLine missing ${argLine} |
must ${argLine} -Xmx1024m -Dfile.encoding=UTF-8(JaCoCo injection point) |
| 5 | Treating okhttp/commons-io as default dependencies | Only the integrated component is a business dependency; the SB four-piece set + integrated component + lombok (as needed) + test |
| 6 | Project has no lombok but retains annotationProcessorPaths | No lombok → delete it together with the compiler annotation path block |
| 7 | jacoco check does not set haltOnFailure | <haltOnFailure>true + BUNDLE LINE ≥ 0.90 |
| 8 | Compiling target 8 with JDK 26 | export JAVA_HOME=$(/usr/libexec/java_home -v 21) |
| 9 | Thinking the model must be changed under Maven 4 | M4 is compatible with model 4.0.0 (zero changes); only new features (session scope, etc.) require upgrading to 4.1.0 (buildable only with M4, see references/maven4.md for details) |
Core quick reference
Element order (iron rules)
parent → 坐标 → name/description/url
→ licenses → scm → developers (Central 必需元数据)
→ properties(三段式) → dependencyManagement → dependencies
→ distributionManagement → build(pluginManagement+plugins)→ profiles
Three-section properties
① 基础(自然排序): java.version / maven.compiler.source+target / 两 encoding
② <!-- Third-Party Dependencies --> : 被集成组件版本
③ <!-- Maven Plugin Dependencies --> : 完整 22 插件版本
Ten-branch matrix (see references/version-matrix.md for the complete 2.1 table)
| Branch | SB parent | JDK |
|---|---|---|
| 2.3.x | 2.3.12.RELEASE | 8 |
| 2.7.x | 2.7.18 | 8 |
| 3.0.x~3.5.x | 3.0.13/3.1.12/3.2.12/3.3.13/3.4.13/3.5.16 | 17 |
| 4.0.x / 4.1.x | 4.0.7 / 4.1.0 | 21 |
Version format:{line}.x.{yyyyMMdd}-SNAPSHOT ↔ tag {line}.x.{yyyyMMdd}; monthly rolling 20260630→20260730.
Source/test trio
- Source:
XxxAutoConfiguration+XxxProperties(@ConfigurationProperties) +XxxTemplate - Test:
XxxAutoConfigurationTest(ApplicationContextRunner) +XxxPropertiesTest+ template test
Create/verify checklist (8 steps)
Copy assets/pom-template.xml → replace placeholders → fill in parent/java.version according to the branch matrix → verify the three-section properties → source trio → test trio → mvn clean verify passes → create ten branches. For the complete walkthrough and item-by-item checklist, see examples/create-new-starter.md。
References (load as needed)
| File | When to read |
|---|---|
| references/pom-structure.md | When writing/modifying a pom: detailed element order, full three-section examples, build 11-plugin configuration table, complete profiles structure |
| references/version-matrix.md | For branching/releasing: ten-branch full table, 4-step tag release, SNAPSHOT rolling mapping, SB parent verification, JDK compatibility rules table |
| references/maven4.md | When building with Maven 4: M3/M4 differences, running JDK 17+, maven.version baseline and enforcer range, consumer POM, wrapper migration, CI dual-track |
| examples/create-new-starter.md | Complete 8-step walkthrough for creating a starter from scratch (including acceptance criteria) |
| examples/maven4-migration.md | When migrating to Maven 4: dual-track enforcer, wrapper switch, M4+JDK21 verification release 8, consumer POM check, CI dual-track, upgrade model to 4.1.0 as needed |
| assets/pom-template.xml | Maven 3 / model 4.0.0 template (M3/M4 dual-track, XML validation passed) |
| assets/pom-template-maven4.xml | Maven 4 / model 4.1.0 template (enforcer [4.0.0,), session scope example; buildable only with M4) |
When to use this skill vs java-component-patterns
要发布的东西是什么?
├── xxx-spring-boot-starter(整合某组件到 Spring Boot)→ 本 skill
└── 独立 Java 库/SDK(无 Spring 依赖,无 parent)→ java-component-patterns
依赖顺序: 组件先发正式版 → starter 再发
easy4j organization extension
- groupId
io.github.easy4j; repository packages.aliyun.com (release2624322-release-6F6h6R/ snapshot2624322-snapshot-3EoOv3) - Internal SDK line 1:1 mapping: starter 2.3.x←SDK feature/1.0.x … starter 4.1.x←feature/4.1.x
- @author:
<a href="https://github.com/loong10k">Loong Wan</a>; English Javadoc - Paradigm references: okhttp3 (testing) / openclaw (comments and POM authority) / hermes (concise testing)