Hi,

Install protoc from
http://code.google.com/p/protobuf/downloads/detail?name=protoc-2.4.1-win32.zipand
ensure that protoc is on your path. If you need to specify the path
explicitly modify the pom file under
protobuf-codec-json<https://github.com/sijuv/protobuf-codec/tree/master/protobuf-codec-json>and
protobuf-codec-xml
to 
<https://github.com/sijuv/protobuf-codec/tree/master/protobuf-codec-json>point
to the protoc path.

Regards,
Siju


On Mon, Jul 25, 2011 at 8:21 PM, lasse <l...@schouw.me> wrote:

> I get a missing reference to protoc when I try to compile the
> protobuf-codec project usiong marven.
> How do I tell the build project where I have protoc.exe installed?
>
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-antrun-plugin:1.3:run (generate-sources) on
> project protobuf-codec-json: An Ant BuildException has occured: Execute 
> *failed:
> java.io.IOException: Cannot run program "protoc"* (in directory
> "Q:\dev\3rdParty\build\protobuf-codec\protobuf-codec-json"): CreateProcess
> error=2, The system cannot find the file specified -> [Help 1]
>
> Full build log:
> [INFO] Scanning for projects...
> [WARNING]
> [WARNING] Some problems were encountered while building the effective model
> for protobuf:protobuf-codec-json:jar:1.1
> [WARNING] 'build.plugins.plugin.(groupId:artifactId)' must be unique but
> found duplicate declaration of plugin
> org.apache.maven.plugins:maven-antrun-plugin @ line 48, column 12
> [WARNING]
> [WARNING] Some problems were encountered while building the effective model
> for protobuf:protobuf-codec-xml:jar:1.1
> [WARNING] 'build.plugins.plugin.(groupId:artifactId)' must be unique but
> found duplicate declaration of plugin
> org.apache.maven.plugins:maven-antrun-plugin @ line 53, column 12
> [WARNING]
> [WARNING] It is highly recommended to fix these problems because they
> threaten the stability of your build.
> [WARNING]
> [WARNING] For this reason, future Maven versions might no longer support
> building such malformed projects.
> [WARNING]
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Reactor Build Order:
> [INFO]
> [INFO] Protobuf codec parent pom
> [INFO] core classes for the codec
> [INFO] json codec
> [INFO] protobuf-codec-xml
> [INFO]
>
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Building Protobuf codec parent pom 1.1
> [INFO]
> ------------------------------------------------------------------------
> [INFO]
> [INFO] --- maven-install-plugin:2.3.1:install (default-install) @
> protobuf-codec ---
> [INFO] Installing Q:\dev\3rdParty\build\protobuf-codec\pom.xml to
> C:\Users\r266953\.m2\repository\protobuf\protobuf-codec\1.1\protobuf-codec-1.1.pom
> [INFO]
>
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Building core classes for the codec 1.1
> [INFO]
> ------------------------------------------------------------------------
> [INFO]
> [INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @
> protobuf-codec-core ---
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] skip non existing resourceDirectory
> Q:\dev\3rdParty\build\protobuf-codec\protobuf-codec-core\src\main\resources
> [INFO]
> [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @
> protobuf-codec-core ---
> [INFO] Nothing to compile - all classes are up to date
> [INFO]
> [INFO] --- maven-resources-plugin:2.4.3:testResources
> (default-testResources) @ protobuf-codec-core ---
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] skip non existing resourceDirectory
> Q:\dev\3rdParty\build\protobuf-codec\protobuf-codec-core\src\test\resources
> [INFO]
> [INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @
> protobuf-codec-core ---
> [INFO] No sources to compile
> [INFO]
> [INFO] --- maven-surefire-plugin:2.7.2:test (default-test) @
> protobuf-codec-core ---
> [INFO] No tests to run.
> [INFO] Surefire report directory:
> Q:\dev\3rdParty\build\protobuf-codec\protobuf-codec-core\target\surefire-reports
>
> -------------------------------------------------------
>  T E S T S
> -------------------------------------------------------
> There are no tests to run.
>
> Results :
>
> Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
>
> [INFO]
> [INFO] --- maven-jar-plugin:2.3.1:jar (default-jar) @ protobuf-codec-core
> ---
> [INFO]
> [INFO] --- maven-install-plugin:2.3.1:install (default-install) @
> protobuf-codec-core ---
> [INFO] Installing
> Q:\dev\3rdParty\build\protobuf-codec\protobuf-codec-core\target\protobuf-codec-core-1.1.jar
> to
> C:\Users\r266953\.m2\repository\protobuf\protobuf-codec-core\1.1\protobuf-codec-core-1.1.jar
> [INFO] Installing
> Q:\dev\3rdParty\build\protobuf-codec\protobuf-codec-core\pom.xml to
> C:\Users\r266953\.m2\repository\protobuf\protobuf-codec-core\1.1\protobuf-codec-core-1.1.pom
> [INFO]
>
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Building json codec 1.1
> [INFO]
> ------------------------------------------------------------------------
> [INFO]
> [INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @
> protobuf-codec-json ---
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] skip non existing resourceDirectory
> Q:\dev\3rdParty\build\protobuf-codec\protobuf-codec-json\src\main\resources
> [INFO]
> [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @
> protobuf-codec-json ---
> [INFO] Nothing to compile - all classes are up to date
> [INFO]
> [INFO] --- maven-resources-plugin:2.4.3:testResources
> (default-testResources) @ protobuf-codec-json ---
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] Copying 2 resources
> [INFO]
> [INFO] --- maven-antrun-plugin:1.3:run (generate-sources) @
> protobuf-codec-json ---
> [INFO] Executing tasks
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Reactor Summary:
> [INFO]
> [INFO] Protobuf codec parent pom ......................... SUCCESS [0.579s]
> [INFO] core classes for the codec ........................ SUCCESS [2.142s]
> [INFO] json codec ........................................ FAILURE [0.189s]
> [INFO] protobuf-codec-xml ................................ SKIPPED
> [INFO]
> ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 3.039s
> [INFO] Finished at: Mon Jul 25 15:46:29 BST 2011
> [INFO] Final Memory: 6M/107M
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-antrun-plugin:1.3:run (generate-sources) on
> project protobuf-codec-json: An Ant BuildException has occured: Execute
> failed: java.io.IOException: Cannot run program "protoc" (in directory
> "Q:\dev\3rdParty\build\protobuf-codec\protobuf-codec-json"): CreateProcess
> error=2, The system cannot find the file specified -> [Help 1]
> [ERROR]
> [ERROR] To see the full stack trace of the errors, re-run Maven with the -e
> switch.
> [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 read the following articles:
> [ERROR] [Help 1]
> http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
> [ERROR]
> [ERROR] After correcting the problems, you can resume the build with the
> command
> [ERROR]   mvn <goals> -rf :protobuf-codec-json
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Protocol Buffers" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/protobuf/-/u6pDnjFW5TUJ.
> To post to this group, send email to protobuf@googlegroups.com.
> To unsubscribe from this group, send email to
> protobuf+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/protobuf?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to protobuf@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.

Reply via email to