You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2020/08/10 17:28:58 UTC

[GitHub] [hudi] wfhartford opened a new issue #1943: [SUPPORT] Gradle fails with dependency on org.apache.hudi:hudi-spark_2.12:0.5.3

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:
users@infra.apache.org



[GitHub] [hudi] bvaradar commented on issue #1943: [SUPPORT] Gradle fails with dependency on org.apache.hudi:hudi-spark_2.12:0.5.3

Posted by GitBox <gi...@apache.org>.
bvaradar commented on issue #1943:
URL: https://github.com/apache/hudi/issues/1943#issuecomment-691740550


   This is a valid issue and is currently assigned for next release with a tracking Jira. Closing the Github issue as we will track this in Jira.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [hudi] bvaradar closed issue #1943: [SUPPORT] Gradle fails with dependency on org.apache.hudi:hudi-spark_2.12:0.5.3

Posted by GitBox <gi...@apache.org>.
bvaradar closed issue #1943:
URL: https://github.com/apache/hudi/issues/1943


   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [hudi] wfhartford commented on issue #1943: [SUPPORT] Gradle fails with dependency on org.apache.hudi:hudi-spark_2.12:0.5.3

Posted by GitBox <gi...@apache.org>.
wfhartford commented on issue #1943:
URL: https://github.com/apache/hudi/issues/1943#issuecomment-675861588


   I believe that is the command I used to build HUDI. The issue does not come from the fact that I built from source. The linked repository exhibits the issue and relies only the the published artifacts. I included the details about building from scratch so that you could understand my motivation for using the non-bundled JAR, and to describe my workaround. I apologies if that was unclear.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [hudi] vinothchandar commented on issue #1943: [SUPPORT] Gradle fails with dependency on org.apache.hudi:hudi-spark_2.12:0.5.3

Posted by GitBox <gi...@apache.org>.
vinothchandar commented on issue #1943:
URL: https://github.com/apache/hudi/issues/1943#issuecomment-675751011


   Thanks for reporting this @wfhartford ! cc @bvaradar @bhasudha this is being fixed in 0.6.0. 


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [hudi] bhasudha commented on issue #1943: [SUPPORT] Gradle fails with dependency on org.apache.hudi:hudi-spark_2.12:0.5.3

Posted by GitBox <gi...@apache.org>.
bhasudha commented on issue #1943:
URL: https://github.com/apache/hudi/issues/1943#issuecomment-675787730


   @wfhartford I am doubting the issue is coming from how you built Hudi for scala 2.12.  Can you confirm if this is how you are building Hudi from source with Scala 2.12 ?  - `mvn clean package -DskipTests -DskipITs -Dscala-2.12`  ( [Instructions here ](https://github.com/apache/hudi#build-with-scala-212))   ( assuming you are changing the pom file for Kotlin version). The default profile is 2.11 unless specified. I am suspecting that why you see the issues. 


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [hudi] bhasudha commented on issue #1943: [SUPPORT] Gradle fails with dependency on org.apache.hudi:hudi-spark_2.12:0.5.3

Posted by GitBox <gi...@apache.org>.
bhasudha commented on issue #1943:
URL: https://github.com/apache/hudi/issues/1943#issuecomment-675970485


   @wfhartford  I was able to reproduce this based on your steps. It seems like the [pom](https://repo1.maven.org/maven2/org/apache/hudi/hudi-spark_2.12/0.5.3/hudi-spark_2.12-0.5.3.pom) of maven artifact itself is published with the dynamic variables like '${scala.binary.version}' like you had mentioned. When building hudi using mvn from source this variable gets substituted with 2.11 or 2.12 depending on the profile chose while building. I believe this is not happening in the same effect in Gradle. I saw some posts pointing to same behavior - https://stackoverflow.com/questions/49992061/gradle-unable-to-resolve-maven-profile-dependency
   
   @bvaradar @vinothchandar do you think it makes sense to publish the poms with these variables substituted  when publishing to maven central?


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [hudi] bhasudha commented on issue #1943: [SUPPORT] Gradle fails with dependency on org.apache.hudi:hudi-spark_2.12:0.5.3

Posted by GitBox <gi...@apache.org>.
bhasudha commented on issue #1943:
URL: https://github.com/apache/hudi/issues/1943#issuecomment-676600839


   @wfhartford  I created a jira ticket here to track this - https://issues.apache.org/jira/browse/HUDI-1202. If you have cycles to fix this please let me know :)


----------------------------------------------------------------
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:
users@infra.apache.org