Skip to content

[WIP][SPARK-51224][BUILD] Test Maven 4 #51230

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1359,3 +1359,9 @@ jobs:
cd ui-test
npm install --save-dev
node --experimental-vm-modules node_modules/.bin/jest

maven-test:
permissions:
packages: write
name: Run
uses: ./.github/workflows/maven_test.yml
2 changes: 1 addition & 1 deletion build/mvn
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ install_mvn() {
fi
if [ $(version $MVN_DETECTED_VERSION) -ne $(version $MVN_VERSION) ]; then
local MVN_TARBALL="apache-maven-${MVN_VERSION}-bin.tar.gz"
local FILE_PATH="maven/maven-3/${MVN_VERSION}/binaries/${MVN_TARBALL}"
local FILE_PATH="maven/maven-${MVN_VERSION:0:1}/${MVN_VERSION}/binaries/${MVN_TARBALL}"
local APACHE_MIRROR=${APACHE_MIRROR:-'https://www.apache.org/dyn/closer.lua'}
local MIRROR_URL_QUERY="?action=download"

Expand Down
6 changes: 3 additions & 3 deletions dev/test-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ HADOOP_HIVE_PROFILES=(
)

MVN_EXEC_PLUGIN_VERSION=$(build/mvn help:evaluate \
-Dexpression=exec-maven-plugin.version -q -DforceStdout | grep -E "[0-9]+\.[0-9]+\.[0-9]+")
-Dexpression=exec-maven-plugin.version -q -DforceStdout | grep -o -E "[0-9]+\.[0-9]+\.[0-9]+")

# We'll switch the version to a temp. one, publish POMs using that new version, then switch back to
# the old version. We need to do this because the `dependency:build-classpath` task needs to
Expand All @@ -52,9 +52,9 @@ OLD_VERSION=$($MVN -q \
--non-recursive \
org.codehaus.mojo:exec-maven-plugin:${MVN_EXEC_PLUGIN_VERSION}:exec | grep -E '[0-9]+\.[0-9]+\.[0-9]+')
# dependency:get for guava and jetty-io are workaround for SPARK-37302.
GUAVA_VERSION=$(build/mvn help:evaluate -Dexpression=guava.version -q -DforceStdout | grep -E "^[0-9\.]+")
GUAVA_VERSION=$(build/mvn help:evaluate -Dexpression=guava.version -q -DforceStdout | grep -o -E "[0-9][0-9a-zA-Z\.\-]+")
build/mvn dependency:get -Dartifact=com.google.guava:guava:${GUAVA_VERSION} -q
JETTY_VERSION=$(build/mvn help:evaluate -Dexpression=jetty.version -q -DforceStdout | grep -E "[0-9]+\.[0-9]+\.[0-9]+")
JETTY_VERSION=$(build/mvn help:evaluate -Dexpression=jetty.version -q -DforceStdout | grep -o -E "[0-9]+\.[0-9]+\.[0-9]+")
build/mvn dependency:get -Dartifact=org.eclipse.jetty:jetty-io:${JETTY_VERSION} -q
if [ $? != 0 ]; then
echo -e "Error while getting version string from Maven:\n$OLD_VERSION"
Expand Down
18 changes: 6 additions & 12 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>17</java.version>
<maven.compiler.release>${java.version}</maven.compiler.release>
<maven.version>3.9.10</maven.version>
<maven.version>4.0.0-rc-4</maven.version>
<exec-maven-plugin.version>3.5.0</exec-maven-plugin.version>
<sbt.project.name>spark</sbt.project.name>
<asm.version>9.8</asm.version>
Expand Down Expand Up @@ -2953,7 +2953,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>3.4.1</version>
<version>3.5.0</version>
<configuration>
<filesets>
<fileset>
Expand Down Expand Up @@ -3475,20 +3475,14 @@
-->
<profile>
<id>snapshots-and-staging</id>
<properties>
<!-- override point for ASF staging/snapshot repos -->
<asf.staging>https://repository.apache.org/content/groups/staging/</asf.staging>
<asf.snapshots>https://repository.apache.org/content/repositories/snapshots/</asf.snapshots>
</properties>

<pluginRepositories>
<pluginRepository>
<id>ASF Staging</id>
<url>${asf.staging}</url>
<url>https://repository.apache.org/content/groups/staging/</url>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

address

[ERROR]   The project org.apache.spark:spark-parent_2.13:pom:4.1.0-SNAPSHOT (/Users/chengpan/Projects/apache-spark/pom.xml) has 4 errors
[ERROR]     'profiles.profile[snapshots-and-staging].repositories.repository.[ASF Staging].url' contains an unsupported expression (only expressions starting with 'project.basedir' or 'project.rootDirectory' are supported). @ org.apache.spark:spark-parent_2.13:4.1.0-SNAPSHOT, file:///Users/chengpan/Projects/apache-spark/pom.xml, line 3520, column 11
[ERROR]     'profiles.profile[snapshots-and-staging].repositories.repository.[ASF Snapshots].url' contains an unsupported expression (only expressions starting with 'project.basedir' or 'project.rootDirectory' are supported). @ org.apache.spark:spark-parent_2.13:4.1.0-SNAPSHOT, file:///Users/chengpan/Projects/apache-spark/pom.xml, line 3524, column 11
[ERROR]     'profiles.profile[snapshots-and-staging].pluginRepositories.pluginRepository.[ASF Staging].url' contains an unsupported expression (only expressions starting with 'project.basedir' or 'project.rootDirectory' are supported). @ org.apache.spark:spark-parent_2.13:4.1.0-SNAPSHOT, file:///Users/chengpan/Projects/apache-spark/pom.xml, line 3503, column 11
[ERROR]     'profiles.profile[snapshots-and-staging].pluginRepositories.pluginRepository.[ASF Snapshots].url' contains an unsupported expression (only expressions starting with 'project.basedir' or 'project.rootDirectory' are supported). @ org.apache.spark:spark-parent_2.13:4.1.0-SNAPSHOT, file:///Users/chengpan/Projects/apache-spark/pom.xml, line 3507, column 11

</pluginRepository>
<pluginRepository>
<id>ASF Snapshots</id>
<url>${asf.snapshots}</url>
<url>https://repository.apache.org/content/repositories/snapshots/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
Expand All @@ -3501,11 +3495,11 @@
<repositories>
<repository>
<id>ASF Staging</id>
<url>${asf.staging}</url>
<url>https://repository.apache.org/content/groups/staging/</url>
</repository>
<repository>
<id>ASF Snapshots</id>
<url>${asf.snapshots}</url>
<url>https://repository.apache.org/content/repositories/snapshots/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
Expand Down