fix: cross-Boot-version autoconfiguration and CI-friendly version resolution

- OrdoJdbcAutoConfiguration: use string-based @AutoConfigureAfter(name = ...)
  to reference both Spring Boot 3.x and 4.x DataSource/Flyway autoconfiguration
  classes, since Boot 4 relocated these to dedicated modules.
- flatten-maven-plugin: switch flattenMode from resolveCiFriendliesOnly to
  defaults so inter-module dependency versions are fully resolved (not just
  the project's own <version>) when installed, fixing dependency resolution
  for external consumers.
- Align sibling-module dependency versions to use \ consistently.
- Ignore generated .flattened-pom.xml files.
This commit is contained in:
0264408
2026-09-10 10:26:59 +08:00
parent c782e6cdc3
commit c524c74289
9 changed files with 64 additions and 19 deletions
+40 -1
View File
@@ -6,7 +6,7 @@
<groupId>com.jetlumen</groupId>
<artifactId>ordo</artifactId>
<version>1.0-SNAPSHOT</version>
<version>${revision}</version>
<packaging>pom</packaging>
@@ -22,6 +22,7 @@
</modules>
<properties>
<revision>0.0.1-SNAPSHOT</revision>
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -63,6 +64,44 @@
<artifactId>maven-surefire-plugin</artifactId>
<version>3.5.2</version>
</plugin>
<plugin>
<!--
Resolves ${revision} and inter-module dependency versions before the
POM is installed/deployed, so consumers outside this reactor (e.g.
rhizome) get concrete versions instead of unresolved placeholders.
flattenMode=resolveCiFriendliesOnly only resolves the revision/sha1/
changelist properties inside <version>/<parent><version> and leaves
everything else (including <dependency><version>${revision}</version>)
untouched - that mode is NOT sufficient here. "defaults" performs full
dependency resolution (pulling exact versions from dependencyManagement
and interpolating all properties), producing a self-contained pom for
each module with no leftover placeholders.
-->
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<version>1.6.0</version>
<configuration>
<updatePomFile>true</updatePomFile>
<flattenMode>defaults</flattenMode>
</configuration>
<executions>
<execution>
<id>flatten</id>
<phase>process-resources</phase>
<goals>
<goal>flatten</goal>
</goals>
</execution>
<execution>
<id>flatten.clean</id>
<phase>clean</phase>
<goals>
<goal>clean</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>