解决异常:Failed to execute goal org.xolstice.maven.plugins:protobuf-maven-plugin...
AI 摘要鱼粮不足,AI 今天先歇着 · 正文在下面
异常
在使用 protobuf 进行编译时报错:[ERROR] Failed to execute goal org.xolstice.maven.plugins:protobuf-maven-plugin:0.6.1:compile (default) on project provider: Unable to resolve artifact: Missing

解决
由于我的电脑是 Mac M1,处理器是 arm64 的,貌似不适配 arm 处理器,这是我原来的配置:
xml
<protocArtifact>com.google.protobuf:protoc:3.7.1:exe:${os.detected.classifier}</protocArtifact>
我们改为指定使用 x86_64 的版本即可
xml
<protocArtifact>com.google.protobuf:protoc:3.7.1:exe:osx-x86_64</protocArtifact>
评论
0 条—
还没有评论,来说第一句