使用Maven构建jar程序报错

easymbol 发布于 2013/07/24 17:39
阅读 710
收藏 0

运行环境   win7 X86

我想构建一个protocol buffer的jar包出来,但是在运行的时候出现了这个异常,请问如何解决呢,先在此谢过了。

错误信息:

[INFO] Executing tasks
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 40.670s
[INFO] Finished at: Wed Jul 24 17:32:39 CST 2013
[INFO] Final Memory: 7M/18M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.3:
run (generate-sources) on project protobuf-java: An Ant BuildException has occur
ed: Execute failed: java.io.IOException: Cannot run program "..\src\protoc": Cre
ateProcess error=2, ????????? -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[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 rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionE
xception

加载中
0
杨延庆
杨延庆
代码目录结构贴一下
easymbol
easymbol
谢谢,已经找到原因了,非常感谢
0
y
yangming0322
请问是怎么解决的?
哪来的怪人
哪来的怪人
回复 @easymbol : 是/protoc_home/src下吧
easymbol
easymbol
如果是这个错误的话,是你的protoc.exe这个文件的位置放错了,仔细看看位置 假如你的开端文件夹是protoc_home的话,那么protoc.exe是存放在/protoc_home/java/src的根目录下,这样才能生成
返回顶部
顶部