protobuf java运行时安装

时间:2017-06-27 19:05:06

标签: windows protocol-buffers protoc

我正在尝试在Windows上为Protocol Buffers构建Java运行时库。我已经下载并安装了protoc的二进制发行版:protoc-3.3.0-win32。我从https://github.com/google/protobuf下载了protobuf-master。并尝试使用Maven构建Java运行时库。我从D:\ protobuf-master \ java

运行mvn test

当我运行mvn test时发生了这些错误。

`[INFO] Results:
 [INFO]
 [ERROR] Errors:
 [ERROR]   MapTest.testPut:1248 ╗ IllegalArgument
 [ERROR]   MapTest.testPutForUnknownEnumValues:494 ╗ IllegalArgument
 [INFO]
 [ERROR] Tests run: 908, Failures: 0, Errors: 2, Skipped: 0
 [INFO]
 [INFO] --------------------------------------------------------------------
 ----
 [INFO] Reactor Summary:
 [INFO]
 [INFO] Protocol Buffers [Parent] .......................... SUCCESS [  
 0.000 s]
 [INFO] Protocol Buffers [Core] ............................ FAILURE [01:23 
 min]
 [INFO] Protocol Buffers [Util] ............................ SKIPPED
 [INFO] --------------------------------------------------------------------
 ----
 [INFO] BUILD FAILURE
 [INFO] --------------------------------------------------------------------
 ----
 [INFO] Total time: 01:24 min
 [INFO] Finished at: 2017-06-27T20:40:21+02:00
 [INFO] Final Memory: 32M/720M
 [INFO] --------------------------------------------------------------------
 ----
 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-
 plugin:2.20:test (default-test) on project protobuf-java: There are test 
 failures.
 [ERROR]
 [ERROR] Please refer to D:\protobuf-master\java\core\target\surefire-
 reports for the individual test results.
 [ERROR] Please refer to dump files (if any exist) [date]-jvmRun[N].dump, 
 [date].dumpstream and [date]-jvmRun[N].dumpstream.
 [ERROR] -> [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/MojoFailureException
 [ERROR]
 [ERROR] After correcting the problems, you can resume the build with the 
 command
 [ERROR]   mvn <goals> -rf :protobuf-java`

1 个答案:

答案 0 :(得分:0)

在3.3.0之后行为发生了变化,因此要么checkout v3.3.0,要么编译更新版本的protoc。 Commit