在我的pom.xml中,我有如下的google protobuf插件声明:
<plugin>
<groupId>com.google.protobuf.tools</groupId>
<artifactId>maven-protoc-plugin</artifactId>
<version>0.3.1</version>
<configuration>
<protocExecutable>protoc</protocExecutable>
<protoSourceRoot>${project.basedir}/src/main/protobuf/</protoSourceRoot>
<languageSpecifications>
<LanguageSpecification>
<language>JAVA</language>
<outputDirectory>${project.basedir}/src/main/java</outputDirectory>
</LanguageSpecification>
</languageSpecifications>
</configuration>
<executions>
<execution>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
</plugin>但是我的eclipse显示了以下错误:
protoc did not exit cleanly. Review output for more information. (com.google.protobuf.tools:maven-protoc-plugin:0.3.1:compile:default:generate-sources)如何解决这个问题?谢谢
发布于 2013-08-02 20:19:21
例如,使用"Maven install“来运行您的项目。然后检查控制台输出。在我的例子中,这很简单:
/bin/sh: protoc: command not found.这意味着eclipse找不到protoc。您应该将path添加到PATH变量中。在Mac上,我将protoc的路径添加到/etc/launchd.conf。或者,您可以安装protoclipse并在Eclipse中设置path。
https://stackoverflow.com/questions/17008964
复制相似问题