Issue
I need to build git clone --depth 1 --branch v5.2.0 https://github.com/rabbitmq/rabbitmq-java-client.git from sources, but when I try "mvn install" I got following error:
[ERROR] Failed to execute goal org.codehaus.gmaven:groovy-maven-plugin:2.0:execute (generate-amqp-sources) on project amqp-client: Execution generate-amqp-sources of goal org.codehaus.gmaven:groovy-maven-plugin:2.0:execute failed: org.apache.maven.plugin.MojoExecutionException: Failed to generate /home/katya/tmp_work/rabbitmq-java-client/target/generated-sources/src/main/java/com/rabbitmq/client/AMQP.java with command: python /home/katya/tmp_work/rabbitmq-java-client/codegen.py header /home/katya/tmp_work/rabbitmq-java-client/deps/rabbitmq_codegen/amqp-rabbitmq-0.9.1.json /home/katya/tmp_work/rabbitmq-java-client/target/generated-sources/src/main/java/com/rabbitmq/client/AMQP.java -> [Help 1]
My environment is :
mvn --version
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true
Apache Maven 3.8.1 (05c21c65bdfed0f71a2f2ada8b84da59348c4c5d)
Maven home: /home/katya/MAVEN
Java version: 11.0.2, vendor: Oracle Corporation, runtime: /home/katya/java
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "5.10.0-kali9-amd64", arch: "amd64", family: "unix"
Could you help me to fix this error?
Solution
Have a look at the Building from Source section in the project's readme. They require you to run:
git clone [email protected]:rabbitmq/rabbitmq-java-client.git
cd rabbitmq-java-client
make deps
./mvnw clean package -Dmaven.test.skip -P '!setup-test-cluster'
You probably just ran mvn clean package
without fetching the deps.
Answered By - Moritz