wfhartford opened a new issue #1943: URL: https://github.com/apache/hudi/issues/1943
Using the `hudi-spark_2.12` artifact as a dependency in gradle fails with the following error: ``` inconsistent module metadata found. Descriptor: org.apache.hudi:hudi-spark_2.11:0.5.3 Errors: bad module name: expected='hudi-spark_2.12' found='hudi-spark_2.11' ``` The `pom.xml` file for `hudi-spark_2.12` has an artifactId element containing `hudi-spark_${scala.binary.version}`. Looking at the parent pom file, we find that the property `scala.binary.version` has a value of `2.11`. I believe that this is the source of the error. Gradle seems to be checking that the artifact ID in the pom file matches the artifact that it was trying to download, and finds an inconsistency. Maven does not seem to mind this inconsistency. **To Reproduce** Steps to reproduce the behavior: 1. Clone this git repository: https://github.com/wfhartford/gradle-hudi-inconsistent-metadata 2. Notice the very basic `build.gradle` file with a single dependency: `org.apache.hudi:hudi-spark_2.12:0.5.3`, 3. Build the project with `./gradlew build`, 4. The build fails with the error message above. **Expected behavior** Gradle downloads the HUDI dependency and builds the project. **Environment Description** * Hudi version : 0.5.3 * Spark version : N/A * Hive version : N/A * Hadoop version : N/A * Storage (HDFS/S3/GCS..) : N/A * Running on Docker? (yes/no) : No **Additional context** I would like to use the non-bundled artifact because the bundled artifact `org.apache.hudi:hudi-spark-bundle_2.12:0.5.3` bundles in old versions of the kotlin standard library, which conflict with the up-to-date version I need in my project. I've worked around this issue by building HUDI from source and editing the main pom.xml file to use the version of kotlin which matches my project. **Full output from `./gradlew build`** ``` > Task :compileJava FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':compileJava'. > Could not resolve all files for configuration ':compileClasspath'. > Could not resolve org.apache.hudi:hudi-spark_2.12:0.5.3. Required by: project : > Could not resolve org.apache.hudi:hudi-spark_2.12:0.5.3. > inconsistent module metadata found. Descriptor: org.apache.hudi:hudi-spark_2.11:0.5.3 Errors: bad module name: expected='hudi-spark_2.12' found='hudi-spark_2.11' * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. * Get more help at https://help.gradle.org Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0. Use '--warning-mode all' to show the individual deprecation warnings. See https://docs.gradle.org/6.5.1/userguide/command_line_interface.html#sec:command_line_warnings BUILD FAILED in 953ms 1 actionable task: 1 executed ``` ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org