majian1998 opened a new issue, #6682:
URL: https://github.com/apache/paimon/issues/6682

   ### Search before asking
   
   - [x] I searched in the [issues](https://github.com/apache/paimon/issues) 
and found nothing similar.
   
   
   ### Paimon version
   
   Paimon 1.4-SNAPSHOT  
   
   ### Compute Engine
   
   Spark4.0
   
   ### Minimal reproduce step
   
    Create a Spark 4 + Scala 2.13 project and add:
   
      ```
      <dependency>
        <groupId>org.apache.paimon</groupId>
        <artifactId>paimon-spark-4.0_2.13</artifactId>
        <version>1.4-SNAPSHOT</version>
        <scope>provided</scope>
      </dependency>
   ```
   Run:
   ```
   mvn dependency:tree -Dincludes=org.apache.paimon:paimon-spark-4.0_2.13
   ```
   Observe that Maven tries to resolve:
   ```
   org.apache.paimon:paimon-spark4-common_2.12:1.4-SNAPSHOT
   org.apache.paimon:paimon-spark-common_2.12:1.4-SNAPSHOT
   org.apache.spark:spark-sql_2.12:4.0.1
   ```
   etc.
   even though the project is using Scala 2.13 and the repository only contains 
paimon-spark4-common_2.13.
   
   The same behavior can be observed when running:
   ```
   cd paimon-spark/paimon-spark-4.0
   mvn clean install
   ```
   without explicitly activating the spark4 profile: the build tries to resolve 
_2.12 Spark and Paimon Spark artifacts for the _2.13 module.
   
   ### What doesn't meet your expectations?
   
   paimon-spark-4.0_2.13 is expected to depend on Scala 2.13 artifacts 
(paimon-spark4-common_2.13, spark-sql_2.13, etc.) in a Spark 4 + Scala 2.13 
environment.
   Currently, the module inherits scala.binary.version=2.12 from paimon-parent 
(because the spark4 profile is not active), and its POM uses 
${scala.binary.version} in artifactIds. This leads Maven to resolve _2.12 
artifacts, which:
   Either do not exist in the repository (causing resolution errors), or
   Mix Scala 2.12 and 2.13 artifacts on the classpath.
   
   ### Anything else?
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [x] I'm willing to submit a PR!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to