Skip to content
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

[ERROR] Metadata copy process failed with code: 1 is thrown when using native:metadata-copy in a multi-module Maven project #650

Open
linghengqian opened this issue Dec 6, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@linghengqian
Copy link
Contributor

Describe the bug
A clear and concise description of what the bug is.
Make sure that you have read the documentation and that you are using the latest plugin version.

  • [ERROR] Metadata copy process failed with code: 1 is thrown when using native:metadata-copy in a multi-module Maven project.
[INFO] --- native:0.10.4:metadata-copy (default-cli) @ hive-server2-jdbc-driver-uber ---
[DEBUG] Loading mojo org.graalvm.buildtools:native-maven-plugin:0.10.4:metadata-copy from plugin realm ClassRealm[plugin>org.graalvm.buildtools:native-maven-plugin:0.10.4--107866145, parent: jdk.internal.loader.ClassLoaders$AppClassLoader@2626b418]
[DEBUG] Configuring mojo execution 'org.graalvm.buildtools:native-maven-plugin:0.10.4:metadata-copy:default-cli' with basic configurator -->
[DEBUG]   (f) enabled = true
[DEBUG]   (f) defaultMode = Conditional
[DEBUG]   (s) conditional = {userCodeFilterPath=/home/linghengqian/TwinklingLiftWorks/git/public/hive-server2-jdbc-driver/native-image-filter/user-code-filter.json, parallel=true, extraFilterPath=/home/linghengqian/TwinklingLiftWorks/git/public/hive-server2-jdbc-driver/native-image-filter/extra-filter.json}
[DEBUG]   (f) modes = org.graalvm.buildtools.maven.config.agent.ModesConfiguration@b548f51
[DEBUG]   (s) disabledStages = [main]
[DEBUG]   (s) merge = false
[DEBUG]   (s) outputDirectory = /home/linghengqian/TwinklingLiftWorks/git/public/hive-server2-jdbc-driver/generated-reachability-metadata/
[DEBUG]   (f) metadataCopy = org.graalvm.buildtools.maven.config.agent.MetadataCopyConfiguration@71f4aeb6
[DEBUG]   (f) agentConfiguration = org.graalvm.buildtools.maven.config.agent.AgentConfiguration@56976b8b
[DEBUG]   (f) project = MavenProject: io.github.linghengqian:hive-server2-jdbc-driver-uber:1.7.0-SNAPSHOT @ /home/linghengqian/TwinklingLiftWorks/git/public/hive-server2-jdbc-driver/hive-server2-jdbc-driver-uber/pom.xml
[DEBUG]   (f) session = org.apache.maven.execution.MavenSession@21bd20ee
[DEBUG] -- end configuration --
[INFO] Copying files from: test
[ERROR] Metadata copy process failed with code: 1

To Reproduce

  • Take Ubuntu WSL 22.04.4 as an example.
  • It is assumed that Git is configured, and SDKMAN! and Docker Engine are installed.
git clone -b add-agent [email protected]:linghengqian/hive-server2-jdbc-driver.git 
cd ./hive-server2-jdbc-driver/
sdk install java 22.0.2-graalce
sdk use java 22.0.2-graalce
./mvnw -PgenerateMetadata -DskipNativeTests clean test native:metadata-copy

Expected behavior
A clear and concise description of what you expected to happen.

  • There should be no exception.

Logs

Click me to view the complete Log🦕🐟🐳🐬🐡🦑🦞🐊🐿️🦔🦣
$ ./mvnw -PgenerateMetadata -DskipNativeTests clean test native:metadata-copy
[INFO] Scanning for projects...
[INFO] Found GraalVM installation from JAVA_HOME variable.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO] 
[INFO] io.github.linghengqian:hive-parent                                 [pom]
[INFO] hive-server2-jdbc-driver-thin                                      [jar]
[INFO] hive-server2-jdbc-driver-uber                                      [jar]
[INFO] 
[INFO] -----------------< io.github.linghengqian:hive-parent >-----------------
[INFO] Building io.github.linghengqian:hive-parent 1.7.0-SNAPSHOT         [1/3]
[INFO]   from pom.xml
[INFO] --------------------------------[ pom ]---------------------------------
[INFO] 
[INFO] --- clean:3.2.0:clean (default-clean) @ hive-parent ---
[INFO] 
[INFO] --- native:0.10.4:metadata-copy (default-cli) @ hive-parent ---
[WARNING] Cannot find source directory /home/linghengqian/TwinklingLiftWorks/git/public/hive-server2-jdbc-driver/target/native/agent-output/test for metadata copy. Please check if you configured agent properly and it generates all necessary directories. If you want to skipp copy from some source, please configure metadataCopy with disable stage you want to skipp.
[INFO] Metadata copy process finished.
[INFO] 
[INFO] --------< io.github.linghengqian:hive-server2-jdbc-driver-thin >--------
[INFO] Building hive-server2-jdbc-driver-thin 1.7.0-SNAPSHOT              [2/3]
[INFO]   from hive-server2-jdbc-driver-thin/pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[WARNING] 2 problems were encountered while building the effective model for org.apache.yetus:audience-annotations:jar:0.5.0 during dependency collection step for project (use -X to see details)
[INFO] 
[INFO] --- clean:3.2.0:clean (default-clean) @ hive-server2-jdbc-driver-thin ---
[INFO] Deleting /home/linghengqian/TwinklingLiftWorks/git/public/hive-server2-jdbc-driver/hive-server2-jdbc-driver-thin/target
[INFO] 
[INFO] --- resources:3.3.1:resources (default-resources) @ hive-server2-jdbc-driver-thin ---
[INFO] Copying 7 resources from src/main/resources to target/classes
[INFO] 
[INFO] --- compiler:3.13.0:compile (default-compile) @ hive-server2-jdbc-driver-thin ---
[INFO] No sources to compile
[INFO] 
[INFO] --- resources:3.3.1:testResources (default-testResources) @ hive-server2-jdbc-driver-thin ---
[INFO] skip non existing resourceDirectory /home/linghengqian/TwinklingLiftWorks/git/public/hive-server2-jdbc-driver/hive-server2-jdbc-driver-thin/src/test/resources
[INFO] 
[INFO] --- compiler:3.13.0:testCompile (default-testCompile) @ hive-server2-jdbc-driver-thin ---
[INFO] Recompiling the module because of changed source code.
[INFO] Compiling 4 source files with javac [debug release 8] to target/test-classes
[WARNING] 源值 8 已过时,将在未来发行版中删除
[WARNING] 目标值 8 已过时,将在未来发行版中删除
[WARNING] 要隐藏有关已过时选项的警告, 请使用 -Xlint:-options。
[INFO] 
[INFO] --- surefire:3.5.0:test (default-test) @ hive-server2-jdbc-driver-thin ---
[WARNING]  Parameter 'systemProperties' is deprecated: Use systemPropertyVariables instead.
[INFO] Using auto detected provider org.apache.maven.surefire.junitplatform.JUnitPlatformProvider
[INFO] 
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running io.github.linghengqian.hive.server2.jdbc.driver.thin.ClassExistTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.276 s -- in io.github.linghengqian.hive.server2.jdbc.driver.thin.ClassExistTest
[INFO] Running io.github.linghengqian.hive.server2.jdbc.driver.thin.StandaloneMetastoreTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 36.40 s -- in io.github.linghengqian.hive.server2.jdbc.driver.thin.StandaloneMetastoreTest
[INFO] Running io.github.linghengqian.hive.server2.jdbc.driver.thin.ZookeeperServiceDiscoveryTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 66.04 s -- in io.github.linghengqian.hive.server2.jdbc.driver.thin.ZookeeperServiceDiscoveryTest
[INFO] Running io.github.linghengqian.hive.server2.jdbc.driver.thin.ThinTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 21.95 s -- in io.github.linghengqian.hive.server2.jdbc.driver.thin.ThinTest
[INFO] 
[INFO] Results:
[INFO] 
[INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] 
[INFO] --- native:0.10.4:merge-agent-files (test-native) @ hive-server2-jdbc-driver-thin ---
[INFO] Merging agent 1 files into /home/linghengqian/TwinklingLiftWorks/git/public/hive-server2-jdbc-driver/hive-server2-jdbc-driver-thin/target/native/agent-output/test
[INFO] 
[INFO] --- native:0.10.4:test (test-native) @ hive-server2-jdbc-driver-thin ---
[INFO] Skipping native-image tests (parameter 'skipTests' or 'skipNativeTests' is true).
[INFO] 
[INFO] --- native:0.10.4:metadata-copy (default-cli) @ hive-server2-jdbc-driver-thin ---
[INFO] Copying files from: test
[INFO] Found GraalVM installation from JAVA_HOME variable.
[INFO] Metadata copy process finished.
[INFO] 
[INFO] --------< io.github.linghengqian:hive-server2-jdbc-driver-uber >--------
[INFO] Building hive-server2-jdbc-driver-uber 1.7.0-SNAPSHOT              [3/3]
[INFO]   from hive-server2-jdbc-driver-uber/pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- clean:3.2.0:clean (default-clean) @ hive-server2-jdbc-driver-uber ---
[INFO] Deleting /home/linghengqian/TwinklingLiftWorks/git/public/hive-server2-jdbc-driver/hive-server2-jdbc-driver-uber/target
[INFO] 
[INFO] --- resources:3.3.1:resources (default-resources) @ hive-server2-jdbc-driver-uber ---
[INFO] Copying 7 resources from src/main/resources to target/classes
[INFO] 
[INFO] --- compiler:3.13.0:compile (default-compile) @ hive-server2-jdbc-driver-uber ---
[INFO] No sources to compile
[INFO] 
[INFO] --- resources:3.3.1:testResources (default-testResources) @ hive-server2-jdbc-driver-uber ---
[INFO] skip non existing resourceDirectory /home/linghengqian/TwinklingLiftWorks/git/public/hive-server2-jdbc-driver/hive-server2-jdbc-driver-uber/src/test/resources
[INFO] 
[INFO] --- compiler:3.13.0:testCompile (default-testCompile) @ hive-server2-jdbc-driver-uber ---
[INFO] Recompiling the module because of changed source code.
[INFO] Compiling 4 source files with javac [debug release 8] to target/test-classes
[WARNING] 源值 8 已过时,将在未来发行版中删除
[WARNING] 目标值 8 已过时,将在未来发行版中删除
[WARNING] 要隐藏有关已过时选项的警告, 请使用 -Xlint:-options。
[INFO] 
[INFO] --- surefire:3.5.0:test (default-test) @ hive-server2-jdbc-driver-uber ---
[WARNING]  Parameter 'systemProperties' is deprecated: Use systemPropertyVariables instead.
[INFO] Using auto detected provider org.apache.maven.surefire.junitplatform.JUnitPlatformProvider
[INFO] 
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running io.github.linghengqian.hive.server2.jdbc.driver.uber.ClassExistTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.224 s -- in io.github.linghengqian.hive.server2.jdbc.driver.uber.ClassExistTest
[INFO] Running io.github.linghengqian.hive.server2.jdbc.driver.uber.StandaloneMetastoreTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 40.20 s -- in io.github.linghengqian.hive.server2.jdbc.driver.uber.StandaloneMetastoreTest
[INFO] Running io.github.linghengqian.hive.server2.jdbc.driver.uber.UberTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 27.25 s -- in io.github.linghengqian.hive.server2.jdbc.driver.uber.UberTest
[INFO] Running io.github.linghengqian.hive.server2.jdbc.driver.uber.ZookeeperServiceDiscoveryTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 72.16 s -- in io.github.linghengqian.hive.server2.jdbc.driver.uber.ZookeeperServiceDiscoveryTest
[INFO] 
[INFO] Results:
[INFO] 
[INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] 
[INFO] --- native:0.10.4:merge-agent-files (test-native) @ hive-server2-jdbc-driver-uber ---
[INFO] 
[INFO] --- native:0.10.4:test (test-native) @ hive-server2-jdbc-driver-uber ---
[INFO] Skipping native-image tests (parameter 'skipTests' or 'skipNativeTests' is true).
[INFO] 
[INFO] --- native:0.10.4:metadata-copy (default-cli) @ hive-server2-jdbc-driver-uber ---
[INFO] Copying files from: test
[ERROR] Metadata copy process failed with code: 1
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for io.github.linghengqian:hive-parent 1.7.0-SNAPSHOT:
[INFO] 
[INFO] io.github.linghengqian:hive-parent ................. SUCCESS [  0.121 s]
[INFO] hive-server2-jdbc-driver-thin ...................... SUCCESS [02:08 min]
[INFO] hive-server2-jdbc-driver-uber ...................... FAILURE [02:21 min]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  04:31 min
[INFO] Finished at: 2024-12-06T15:46:31+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.graalvm.buildtools:native-maven-plugin:0.10.4:metadata-copy (default-cli) on project hive-server2-jdbc-driver-uber: Metadata copy process failed. -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :hive-server2-jdbc-driver-uber

System Info (please complete the following information):

  • OS: [e.g. Windows] Ubuntu 22.04.4
  • GraalVM Version [e.g. 22.0 CE] GraalVM CE For JDK 22.0.2
  • Java Version [e.g. 17] 22.0.2
  • Plugin version [e.g. native-gradle-plugin:0.9.10] native-maven-plugin:0.10.4

Additional context
Add any other context about the problem here.

@linghengqian linghengqian added the bug Something isn't working label Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant