chore: introduce the pom.xml structure#2307
Conversation
|
triceo
left a comment
There was a problem hiding this comment.
Had to submit the PR (non-draft), so that I can post comments.
I do not comment on the structure inside of the model/ directory - those are your choices. My comments apply on the boundaries, and where your choices proliferate to the top-level.
| @@ -0,0 +1 @@ | |||
| -Dai.timefold.sdk.model.processing.disabled No newline at end of file | |||
There was a problem hiding this comment.
Is this always taken into account automatically, or do there need to be CI changes? README changes? Developer workflow changes?
| <!-- Together with the revision property enables overriding the project version in the CI --> | ||
| <plugin> | ||
| <groupId>org.codehaus.mojo</groupId> | ||
| <artifactId>flatten-maven-plugin</artifactId> |
There was a problem hiding this comment.
What exactly does this do? What is flattened? In what way is the project affected?
| <relativePath>../build/build-parent/pom.xml</relativePath> | ||
| </parent> | ||
|
|
||
| <artifactId>timefold-solver-rest</artifactId> |
There was a problem hiding this comment.
I would consider appending the "model" tag somewhere. timefold-solver-model-rest, for example. Other submodules work like this as well - all Quarkus modules say "quarkus" etc.
| <version>${revision}</version> | ||
| <relativePath>../build/build-parent/pom.xml</relativePath> | ||
| </parent> | ||
| <artifactId>timefold-solver-maps</artifactId> |
There was a problem hiding this comment.
My comment about the "model" tag applies here as well.
I see the logic of just having a "maps" model for "Timefold Solver", but that's kinda lying to people; this will not work with pure Solver, will it? This should IMO be timefold-solver-model-maps.
Similarly for other modules. Won't keep repeating myself anymore.
| <relativePath>../../build/build-parent/pom.xml</relativePath> | ||
| </parent> | ||
|
|
||
| <artifactId>timefold-solver-model</artifactId> |
There was a problem hiding this comment.
I do not understand this structure.
This appear to be some kind of top-level structure, but it is hidden deep within model/facade/sdk?
| </parent> | ||
|
|
||
| <groupId>ai.timefold.solver.tools</groupId> | ||
| <artifactId>timefold-maven-plugin</artifactId> |
There was a problem hiding this comment.
This is probably the one exception to the "model" tag recommendation. I can see how this is a "Timefold Maven Plugin", not "Timefold Solver Model Maven Plugin".
| <version>${version.ai.timefold.solver}</version> | ||
| </dependency> | ||
|
|
||
| <!-- Model artifacts --> |
There was a problem hiding this comment.
That is a boatload of artifacts. Do we have any way of checking (both now and going forward) that this list is exhaustive?
| <relativePath>../pom.xml</relativePath> | ||
| </parent> | ||
|
|
||
| <artifactId>timefold-solver-model-root-parent</artifactId> |
There was a problem hiding this comment.
I propose we create a sub-group here. ai.timefold.solver.model
I was never a friend of large flat structures, and this structure is now becoming as large as they get.
As a benefit, it will allow us to clearly say that packages with this groupId are preview, as opposed to having to painstakingly enumerate them somewhere.
| <name>(Preview) Timefold Solver Model Maps API</name> | ||
|
|
||
| <dependencies> | ||
| <dependency> |
There was a problem hiding this comment.
Your formatting appears inconsistent. Some of your POMs have 2 spaces, some 4. Let's use 2 as the solver does, or rather tries to do.
There was a problem hiding this comment.
Pull request overview
This PR introduces a Maven pom.xml structure to support an SDK/model sub-tree and switches the build to CI-friendly versions via ${revision} (with flattening), aligning module parent versions across the repository.
Changes:
- Replaced hardcoded
999-SNAPSHOTparent versions with${revision}across existing modules. - Added
${revision}+flatten-maven-pluginconfiguration to the root build and introduced a newmodel/multi-module subtree. - Extended the solver BOM to include the new model artifacts and added default Maven config to disable model processing.
Reviewed changes
Copilot reviewed 63 out of 63 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/pom.xml | Switch parent version to ${revision}. |
| tools/migration/pom.xml | Switch parent version to ${revision}. |
| tools/benchmark/pom.xml | Switch parent version to ${revision}. |
| tools/benchmark-aggregator/pom.xml | Switch parent version to ${revision}. |
| spring-integration/spring-boot-starter/pom.xml | Switch parent version to ${revision}. |
| spring-integration/spring-boot-integration-test/pom.xml | Switch parent version to ${revision}. |
| spring-integration/spring-boot-autoconfigure/pom.xml | Switch parent version to ${revision}. |
| spring-integration/pom.xml | Switch parent version to ${revision}. |
| quarkus-integration/quarkus/runtime/pom.xml | Switch parent version to ${revision}. |
| quarkus-integration/quarkus/reflection-integration-test/pom.xml | Switch parent version to ${revision}. |
| quarkus-integration/quarkus/pom.xml | Switch parent version to ${revision}. |
| quarkus-integration/quarkus/integration-test/pom.xml | Switch parent version to ${revision}. |
| quarkus-integration/quarkus/devui-integration-test/pom.xml | Switch parent version to ${revision}. |
| quarkus-integration/quarkus/deployment/pom.xml | Switch parent version to ${revision}. |
| quarkus-integration/quarkus-jackson/runtime/pom.xml | Switch parent version to ${revision}. |
| quarkus-integration/quarkus-jackson/pom.xml | Switch parent version to ${revision}. |
| quarkus-integration/quarkus-jackson/integration-test/pom.xml | Switch parent version to ${revision}. |
| quarkus-integration/quarkus-jackson/deployment/pom.xml | Switch parent version to ${revision}. |
| quarkus-integration/quarkus-benchmark/runtime/pom.xml | Switch parent version to ${revision}. |
| quarkus-integration/quarkus-benchmark/pom.xml | Switch parent version to ${revision}. |
| quarkus-integration/quarkus-benchmark/integration-test/pom.xml | Switch parent version to ${revision}. |
| quarkus-integration/quarkus-benchmark/deployment/pom.xml | Switch parent version to ${revision}. |
| quarkus-integration/pom.xml | Switch parent version to ${revision}. |
| pom.xml | Introduce ${revision}, configure flatten-maven-plugin, add model module. |
| persistence/pom.xml | Switch parent version to ${revision}. |
| persistence/jpa/pom.xml | Switch parent version to ${revision}. |
| persistence/jaxb/pom.xml | Switch parent version to ${revision}. |
| persistence/jackson/pom.xml | Switch parent version to ${revision}. |
| model/tools/maven-plugin/pom.xml | Add new Maven plugin module POM for model tooling. |
| model/test/pom.xml | Add new model test-support module POM. |
| model/test-model/pom.xml | Add new test model module POM (profile-driven module). |
| model/solver-worker/pom.xml | Add new solver worker module POM. |
| model/rest/pom.xml | Add new REST module POM for model SDK. |
| model/rest-definition/pom.xml | Add new REST types/definitions module POM. |
| model/quarkus/runtime/pom.xml | Add new Quarkus extension runtime module POM. |
| model/quarkus/pom.xml | Add new Quarkus extension parent aggregator POM. |
| model/quarkus/integration-tests/pom.xml | Add new Quarkus integration-tests module POM. |
| model/quarkus/deployment/pom.xml | Add new Quarkus extension deployment module POM. |
| model/pom.xml | Add model root parent/aggregator POM (includes flatten + distributionManagement). |
| model/model-defaults/pom.xml | Add model defaults module POM. |
| model/maps/service-test/pom.xml | Add maps service test module POM. |
| model/maps/service-rest/pom.xml | Add maps service REST module POM. |
| model/maps/service-integration/pom.xml | Add maps service integration module POM. |
| model/maps/service-client/pom.xml | Add maps service client module POM. |
| model/maps/pom.xml | Add maps integration aggregator POM. |
| model/maps/haversine/pom.xml | Add haversine module POM. |
| model/maps/api/pom.xml | Add maps API module POM. |
| model/json/pom.xml | Add JSON integration module POM. |
| model/jackson/pom.xml | Add Jackson integration module POM. |
| model/facade/sdk/pom.xml | Add SDK facade dependency-aggregator POM (no maps). |
| model/facade/sdk-with-maps/pom.xml | Add SDK facade dependency-aggregator POM (with maps). |
| model/facade/sdk-model-parent/pom.xml | Add SDK model parent POM with profiles/plugins for model builds. |
| model/facade/sdk-model-base-parent/pom.xml | Add SDK model base parent POM (dependency management + enterprise profile). |
| model/definition/pom.xml | Add model definition module POM. |
| model/build/config/pom.xml | Add model config module POM. |
| model/build/build-support/pom.xml | Add model build-support module POM. |
| model/build/build-parent/pom.xml | Add model build-parent POM (dependencies/plugins management for model subtree). |
| docs/pom.xml | Switch parent version to ${revision}. |
| core/pom.xml | Switch parent version to ${revision}. |
| build/ide-config/pom.xml | Switch parent version to ${revision}. |
| build/build-parent/pom.xml | Switch parent version to ${revision}. |
| build/bom/pom.xml | Add model artifacts (and plugin) to solver BOM. |
| .mvn/maven.config | Add default system property to disable model processing. |
| <dependency> | ||
| <groupId> com.fasterxml.jackson.core</groupId> | ||
| <artifactId>jackson-databind</artifactId> | ||
| </dependency> |
| <prerequisites> | ||
| <maven>${maven.version}</maven> | ||
| </prerequisites> |
| <ai.timefold.model.native.image.path>${project.build.directory}/${project.build.finalName}-runner | ||
| </ai.timefold.model.native.image.path> | ||
| <ai.timefold.model.descriptor.groupId>${project.groupId}</ai.timefold.model.descriptor.groupId> | ||
| <ai.timefold.model.descriptor.artifactId>${project.artifactId}-descriptor</ai.timefold.model.descriptor.artifactId> | ||
| <ai.timefold.model.descriptor.classifier>${model.api.version}</ai.timefold.model.descriptor.classifier> | ||
| <ai.timefold.model.descriptor.version>${project.version}</ai.timefold.model.descriptor.version> | ||
| <ai.timefold.model.descriptor.file>${project.build.directory}/model-descriptor.zip | ||
| </ai.timefold.model.descriptor.file> | ||
| <ai.timefold.model.descriptor.repository.id>github</ai.timefold.model.descriptor.repository.id> | ||
| <ai.timefold.model.descriptor.repository.url>https://maven.pkg.github.com/timefoldai/${project.artifactId} | ||
| </ai.timefold.model.descriptor.repository.url> | ||
| <ai.timefold.model.benchmark.package>ai/timefold/model/*/benchmark/**</ai.timefold.model.benchmark.package> | ||
|
|
||
| <!-- base images for JVM and native model containers --> | ||
| <ai.timefold.model.base-jvm-image>eclipse-temurin:25-jre-ubi10-minimal</ai.timefold.model.base-jvm-image> | ||
| <ai.timefold.model.builder-native-image>quay.io/quarkus/ubi10-quarkus-mandrel-builder-image:jdk-25 | ||
| </ai.timefold.model.builder-native-image> | ||
| <ai.timefold.model.base-native-image>redhat/ubi10-minimal</ai.timefold.model.base-native-image> | ||
|
|
||
| <ai.timefold.sdk.enterprise.skipTools>true</ai.timefold.sdk.enterprise.skipTools> | ||
|
|
||
| <ai.timefold.model.container.integration-tests.env-file-dir>${project.build.directory}/generated-config | ||
| </ai.timefold.model.container.integration-tests.env-file-dir> | ||
| <ai.timefold.model.container.integration-tests.env-file-name>container-integration-tests.env | ||
| </ai.timefold.model.container.integration-tests.env-file-name> | ||
| <ai.timefold.model.container.integration-tests.env-file> | ||
| ${ai.timefold.model.container.integration-tests.env-file-dir}/${ai.timefold.model.container.integration-tests.env-file-name} | ||
| </ai.timefold.model.container.integration-tests.env-file> |
| <name>ai.timefold.sdk.model.processing.disabled</name> | ||
| <value>!true</value> |
| @@ -0,0 +1 @@ | |||
| -Dai.timefold.sdk.model.processing.disabled No newline at end of file | |||
| <distributionManagement> | ||
| <repository> | ||
| <id>github</id> | ||
| <name>Timefold Github Packages</name> |
| <!-- maven plugin --> | ||
| <dependency> | ||
| <groupId>ai.timefold.solver.tools</groupId> | ||
| <artifactId>timefold-maven-plugin</artifactId> | ||
| <version>${version.ai.timefold.solver}</version> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>ai.timefold.solver.tools</groupId> | ||
| <artifactId>timefold-maven-plugin</artifactId> | ||
| <version>${version.ai.timefold.solver}</version> |



To illustrate the inclusion of the SDK.
Enterprise Solver: https://github.com/TimefoldAI/timefold-solver-enterprise/pull/538
This PR will only get merge with the full content later.