This is an automated email from the ASF dual-hosted git repository.
vinishjail97 pushed a commit to branch branch-0.4
in repository https://gitbox.apache.org/repos/asf/incubator-xtable.git
The following commit(s) were added to refs/heads/branch-0.4 by this push:
new 93b3006c [864] Make the source release build with mvn package (#868)
93b3006c is described below
commit 93b3006c7136594696ceaaf157bc597fcfa27feb
Author: Vinish Reddy <[email protected]>
AuthorDate: Wed Jul 29 03:46:52 2026 +0530
[864] Make the source release build with mvn package (#868)
* [864] Build the source release with mvn package (Quarkus workspace
discovery)
The quarkus-maven-plugin bootstraps xtable-service to generate code, so it
resolves the module's dependencies with Quarkus' own bootstrap resolver
rather
than through the reactor. That resolver discovers the workspace from the raw
poms without interpolating properties, so the module declaring
xtable-core_${scala.binary.version} is never matched against the
xtable-core_2.12 dependency and resolution falls back to the remote
repositories, where the artifact only exists once a release is published.
Building an unpublished source release with `mvn package` therefore fails:
Failed to bootstrap application in TEST mode: Failed to resolve
dependencies
for org.apache.xtable:xtable-service:jar:0.4.0-incubating: The following
artifacts could not be resolved: org.apache.xtable:xtable-core_2.12:jar:
0.4.0-incubating (absent), org.apache.xtable:xtable-core_2.12:jar:tests:
0.4.0-incubating (absent)
Enable quarkus.bootstrap.effective-model-builder so workspace discovery uses
the effective model and resolves the property. Quarkus reads it as a system
property only, so it is set in .mvn/maven.config, which ships in the source
release tarball, instead of as a pom property.
Every build path in CI runs `mvn install`, which publishes xtable-core to
the
local repository and lets Quarkus' repository fallback succeed, hiding the
failure. Add a job that builds with `mvn package` after removing locally
installed XTable artifacts so the reactor is the only place they can come
from.
* [864] Address review feedback
Shorten the quarkus-maven-plugin comment and link the Quarkus maven tooling
guide instead of restating it.
Fold the package-only check into the existing build job and limit it to
`-pl xtable-service -am` rather than running a second full build of every
module on every push and pull request. Verified that the narrower reactor
still fails without .mvn/maven.config and succeeds with it.
* [864] Add the ASF license header to .mvn/maven.config
The spotless format for **/*.config and **/*.properties requires the text
license header, the same as .mvn/wrapper/maven-wrapper.properties carries.
Maven ignores the comment lines, so the property is still applied.
* [864] Disable the build cache for the source build check
The maven-build-cache-extension is active in CI and can serve a module from
a
previous build instead of building it, which would let the check pass
without
ever resolving xtable-core from the reactor. Turn it off for that step so
the
verification cannot silently stop verifying anything.
* [864] Move the source build check into its own workflow
Running it as a step in the Maven CI Build job meant a failure aborted that
job before any tests ran, and the check could not be told apart from an
ordinary build failure or required on its own. Give it a workflow instead,
so
it reports as its own check and runs in parallel with the rest of CI.
The job configures no dependency cache, disables the build cache extension
and
clears XTable artifacts from the local repository, so nothing can supply a
previously built XTable artifact and the reactor is the only source for
them.
---
.github/workflows/source-build-check.yml | 59 ++++++++++++++++++++++++++++++++
.mvn/maven.config | 17 +++++++++
xtable-service/pom.xml | 7 ++++
3 files changed, 83 insertions(+)
diff --git a/.github/workflows/source-build-check.yml
b/.github/workflows/source-build-check.yml
new file mode 100644
index 00000000..33eaa424
--- /dev/null
+++ b/.github/workflows/source-build-check.yml
@@ -0,0 +1,59 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+name: Source Build Check
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: ${{ !contains(github.ref, 'main') }}
+
+on:
+ push:
+ branches:
+ - "main"
+ - "branch-0.4"
+
+ pull_request:
+ branches:
+ - "main"
+ - "branch-0.4"
+
+jobs:
+ # Whoever builds the source release runs `mvn package` without a prior
+ # `mvn install`, so every inter-module dependency has to resolve from the
+ # reactor. This job reproduces that, and it only does so while nothing can
+ # supply a previously built XTable artifact, hence no `cache: maven` here,
+ # the build cache extension disabled, and the local repository cleared of
+ # XTable artifacts. Adding any form of caching to this job would let it pass
+ # against a source release that does not build.
+ package:
+ name: Build xtable-service without installed XTable artifacts
+ runs-on: ubuntu-latest
+ timeout-minutes: 30
+ steps:
+ - uses: actions/checkout@v6
+
+ - name: Set up JDK 11
+ uses: actions/setup-java@v5
+ with:
+ java-version: '11'
+ distribution: 'temurin'
+
+ - name: Build with package only
+ run: |
+ rm -rf ~/.m2/repository/org/apache/xtable
+ ./mvnw clean package -pl xtable-service -am -DskipTests -ntp -B \
+ -Dmaven.build.cache.enabled=false
diff --git a/.mvn/maven.config b/.mvn/maven.config
new file mode 100644
index 00000000..4fc39236
--- /dev/null
+++ b/.mvn/maven.config
@@ -0,0 +1,17 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-Dquarkus.bootstrap.effective-model-builder=true
diff --git a/xtable-service/pom.xml b/xtable-service/pom.xml
index 0ce142f9..bd9cee2c 100644
--- a/xtable-service/pom.xml
+++ b/xtable-service/pom.xml
@@ -250,6 +250,13 @@
</dependencies>
<build>
<plugins>
+ <!--
+ This plugin resolves the module's dependencies itself, and its
workspace discovery
+ only matches xtable-core_${scala.binary.version} against the
reactor with
+ quarkus.bootstrap.effective-model-builder enabled. It is a
system property, so it is
+ set in .mvn/maven.config rather than here.
+
https://quarkus.io/guides/maven-tooling#bootstrap-maven-properties
+ -->
<plugin>
<groupId>${quarkus.platform.group-id}</groupId>
<artifactId>quarkus-maven-plugin</artifactId>