apache / rocketmq-mqtt

Apache rocketmq
https://rocketmq.apache.org/
Apache License 2.0
181 stars 63 forks source link

[Doc] Protoc-gen-java not available on Apple M1/M2 #261

Closed YxAc closed 4 months ago

YxAc commented 5 months ago

What would you like to be improved?

When compiling according to Build Requirements, The following problems may occur on Apple M1/M2, causing the build to fail.

[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  19.620 s
[INFO] Finished at: 2024-05-05T22:38:27+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.xolstice.maven.plugins:protobuf-maven-plugin:0.5.0:compile (default) on project mqtt-common: Missing:
[ERROR] ----------
[ERROR] 1) com.google.protobuf:protoc:exe:osx-aarch_64:3.8.0
[ERROR] 
[ERROR]   Try downloading the file manually from the project website.
[ERROR] 
[ERROR]   Then, install it using the command: 
[ERROR]       mvn install:install-file -DgroupId=com.google.protobuf -DartifactId=protoc -Dversion=3.8.0 -Dclassifier=osx-aarch_64 -Dpackaging=exe -Dfile=/path/to/file
[ERROR] 
[ERROR]   Alternatively, if you host your own repository you can deploy the file there: 
[ERROR]       mvn deploy:deploy-file -DgroupId=com.google.protobuf -DartifactId=protoc -Dversion=3.8.0 -Dclassifier=osx-aarch_64 -Dpackaging=exe -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
[ERROR] 
[ERROR]   Path to dependency: 
[ERROR]     1) org.apache.rocketmq:mqtt-common:jar:1.0.2-SNAPSHOT
[ERROR]     2) com.google.protobuf:protoc:exe:osx-aarch_64:3.8.0
[ERROR] 
[ERROR] ----------
[ERROR] 1 required artifact is missing.
[ERROR] 

How should we improve?

Supplement the description of README, specifying the maven environment variable by -D or configure profile in m2/settings.xml