Maven fails to build after ozone ufs upgrade to 1.0.0
See original GitHub issueAlluxio Version: 2.4.0
Describe the bug
After merging the PR to bump ozone ufs version (https://github.com/Alluxio/alluxio/pull/12226), the following maven command hangs:
mvn -T 4C clean install -Dmaven.javadoc.skip=true -DskipTests -Dlicense.skip=true -Dcheckstyle.skip=true -Dfindbugs.skip=true -P'\''!ufs-hadoop-1.2,!ufs-hadoop-2.2,!ufs-hadoop-2.6'\''
When I run jstack on the process, the one running thread approximately has the following stacktrace:
"BuilderThread 17" #60 prio=5 os_prio=0 tid=0x00007fcea0106800 nid=0xbaa runnable [0x00007fcdb9c2a000]
java.lang.Thread.State: RUNNABLE
at org.jdom2.Element.isAncestor(Element.java:1052)
at org.jdom2.ContentList.checkPreConditions(ContentList.java:222)
at org.jdom2.ContentList.add(ContentList.java:244)
at org.jdom2.Element.addContent(Element.java:950)
at org.apache.maven.plugins.shade.pom.MavenJDOMWriter.insertAtPreferredLocation(MavenJDOMWriter.java:292)
at org.apache.maven.plugins.shade.pom.MavenJDOMWriter.iterateExclusion(MavenJDOMWriter.java:488)
at org.apache.maven.plugins.shade.pom.MavenJDOMWriter.updateDependency(MavenJDOMWriter.java:1335)
at org.apache.maven.plugins.shade.pom.MavenJDOMWriter.iterateDependency(MavenJDOMWriter.java:386)
at org.apache.maven.plugins.shade.pom.MavenJDOMWriter.updateModel(MavenJDOMWriter.java:1623)
at org.apache.maven.plugins.shade.pom.MavenJDOMWriter.write(MavenJDOMWriter.java:2156)
at org.apache.maven.plugins.shade.pom.PomWriter.write(PomWriter.java:75)
at org.apache.maven.plugins.shade.mojo.ShadeMojo.rewriteDependencyReducedPomIfWeHaveReduction(ShadeMojo.java:1049)
at org.apache.maven.plugins.shade.mojo.ShadeMojo.createDependencyReducedPom(ShadeMojo.java:978)
at org.apache.maven.plugins.shade.mojo.ShadeMojo.execute(ShadeMojo.java:538)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call(MultiThreadedBuilder.java:200)
at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call(MultiThreadedBuilder.java:196)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
This seems to be an issue with the maven shading plugin. Looking up at org.apache.maven.plugins.shade.pom.MavenJDOMWriter.insertAtPreferredLocation(MavenJDOMWriter.java:292)
, I found that other people have encountered a similar issue:
- https://stackoverflow.com/questions/52221326/maven-shade-plugin-failed-to-execute-goal
- but it seems like our plugin version is sufficiently up to date
- https://github.com/apache/spark/pull/23061
- this seems to avoid the issue by removing parallelism, but this would drastically slow down our builds
To Reproduce See above mvn command
Expected behavior Maven command completes
Urgency Offending PR has been reverted to avoid build issues (https://github.com/Alluxio/alluxio/pull/12337)
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (9 by maintainers)
Top GitHub Comments
@apc999 The dependency reduced pom is relevant when published so I think @maobaolong ’s proposed solution is the best of both worlds.
This issue has been fixed by #12367