Vikas Kumar
Vikas Kumar

Reputation: 1

Apache Ranger Build Error : Failed to create assembly: Error creating assembly archive schema-registry-plugin: Problem creating jar

Trying to build Apache Ranger 2.4.0 release on Ubuntu 20.04 with Java 1.8. I am getting the error while running the maven command mvn -Pall -DskipTests=false clean compile package install on the root of the directory:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.6:single (default) on project ranger-distro: Failed to create assem
bly: Error creating assembly archive schema-registry-plugin: Problem creating jar: jar:file:/home/swapnendu_b/apache-ranger-2.4.0/distro/target/ran
ger-distro-2.4.0.jar!/META-INF/maven/org.apache.ranger/ranger-distro/pom.properties: JAR entry META-INF/maven/org.apache.ranger/ranger-distro/pom.p
roperties not found in /home/swapnendu_b/apache-ranger-2.4.0/distro/target/ranger-distro-2.4.0.jar -> [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 :ranger-distro

enter image description here

I have also tried updating the maven-assembly-plugin version in the root pom.xml file to latest 3.6.0. But still getting the same error.

Upvotes: 0

Views: 216

Answers (1)

LuisGomez24
LuisGomez24

Reputation: 1

This happened to our team when compiling the files from GitHub repository. We found this JIRA ticket related to the error.

You need to change the maven-assembly-plugin version to 3.1.0 in the pom.xml file:

<groupId>org.apache.ranger</groupId>
<artifactId>ranger</artifactId>
<version>3.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>ranger</name>
<description>Security for Enforcing Enterprise Policies</description>
<properties>
    ...
    <assembly.plugin.version>[CHANGE TO 3.1.0]</assembly.plugin.version>
    ...
</properties>

You should recompile Ranger and that will solve the issue.

Upvotes: 0

Related Questions