NVIDIA / spark-rapids

Spark RAPIDS plugin - accelerate Apache Spark with GPUs
https://nvidia.github.io/spark-rapids
Apache License 2.0
822 stars 235 forks source link

[BUG] enforcer:enforce rules are executed too late #11740

Open gerashegalov opened 1 day ago

gerashegalov commented 1 day ago

Describe the bug When executing spark400 sql-plugin compile with Scala 2.12 the build breaks with missing spark400 classifier

12:40:17,304 [ERROR]    com.nvidia:rapids-4-spark-sql-plugin-api_2.12:jar:spark400:24.12.0-SNAPSHOT was not found in https://oss.sonatype.org/content/repositories/snapshots during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of snapshots-repo has elapsed or updates are forced

Steps/Code to reproduce bug

JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 mvn compile -pl sql-plugin  -Dbuildver=400 

Expected behavior It should trigger enforcer failure which currently only happens if you add -am to the command above

$ JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 mvn compile -pl sql-plugin  -Dbuildver=400 -am

12:44:45,828 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:3.5.0:enforce (enforce-maven) on project rapids-4-spark-parent_2.12: 
12:44:45,828 [ERROR] Rule 3: org.apache.maven.enforcer.rules.property.RequireProperty failed with message:
12:44:45,828 [ERROR] Spark 4.0.0 is only supported for Scala 2.13

Environment details (please complete the following information)

Additional context Add any other context about the problem here.