Error that I am getting when trying to run mvn test
on google protobuf library.
[INFO] Executing tasks [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] An Ant BuildException has occured: Execute failed: java.io.IOException: Cannot run program "..\src\protoc": CreateProcess error=2, The system c annot find the file specified [INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch |
I did place protoc.exe in the src directory. As a side note this is running on windows machine.
Quick solution that I found was to edit the pom.xml file and modify the Ant tast into
<mkdir dir="target/generated-sources" /> <exec executable="./src/protoc.exe"> |
Hi,
It worked for me too. Changed the executable, in my case from mvn to mvn.bat
Thanks,
Ratish
10x
I wouldn’t have be able to do it, alone!
I was screaming into the monitor, already.
It’s not documented at all, how to compile this .jar thing:
So just use Maven in protobuf-2.4.1\java , but first put the protoc in protobuf-2.4.1\src.
Lifesaver! Thanks so much.
P.S. you will also need to change the reference to protoc.exe wherever you see
… in the .pom file, if you want to do other things (test etc).
Cheers 🙂
I have protoc.exe file in src folder.
And also I mentioned the path to protoc in pom.xml as “../src/protoc.exe”.
I am still getting the same error.
I am running in windows.
lie, doesn’t work at all. still gives the same error
I am sorry that you feel that way.
Its work man. Thank you so much. Lifesaver !!!