开发者社区> 问答> 正文

使用Maven构建jar程序报错?报错

运行环境   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

展开
收起
爱吃鱼的程序员 2020-06-22 18:06:05 614 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    代码目录结构贴一下谢谢,已经找到原因了,非常感谢请问是怎么解决的?回复<aclass='referer'target='_blank'>@easymbol:是/protoc_home/src下吧如果是这个错误的话,是你的protoc.exe这个文件的位置放错了,仔细看看位置假如你的开端文件夹是protoc_home的话,那么protoc.exe是存放在/protoc_home/java/src的根目录下,这样才能生成感谢 <imgsrc="http://www.oschina.net/js/ke/plugins/emoticons/images/81.gif"alt=""/>

    2020-06-22 18:06:23
    赞同 展开评论 打赏
问答分类:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载

相关镜像