Resolve ranger-examples-distro module compile error
When compile ranger with below command:
mvn -DskipTests clean compile package install assembly:assembly
Throws create assembly failed:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.6:single (default) on project ranger-examples-distro: Failed to create assembly: Error creating assembly archive sampleapp: You must set at least one file. -> [Help 1]
I wanted to say thanks for putting this out there @PrivateLi , I hit the exact same problem and your patch got me to a successful mvn package step.
I did see this note in the readme, looks like they don't take Github PRs yet.
Why you don't merge it guys? It resolved my problem.
While trying to build the Apache Ranger 2.4.0 on Ubuntu 20.04, Using Java 1.8, I came across this issue. Not sure, whether this issue is related to maven or Ranger. It is failing on **Apache Ranger Distribution ** step. I am attaching the screenshot for reference.
[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
This is not an issue that needs to be merged, it happens when there is a mismatch in main Ranger version specified in ranger/pom.xml and distro/pom.xml or ranger-examples/pom.xml, this causes unable to identify right project parent directory causing file path or no such file exception issue.
Actually, I was getting this issue. I didn't mean to merge it. Thanks for the clarification though. Will try with your fix.