【问题标题】:Building smart-home-dashboard source code fails构建智能家居仪表板源代码失败
【发布时间】:2019-10-22 09:44:14
【问题描述】:

我正在以下 URL 处继续执行 README.md 过程,但在编译时,我收到以下错误消息并且无法继续。 https://github.com/actions-on-google/smart-home-dashboard

[ERROR] Failed to execute goal
org.xolstice.maven.plugins:protobuf-maven-plugin:0.5.0:compile
(default) on project dashboard: An error occurred while invoking
protoc.: Error while executing process. Cannot run program
"C:\test\target\protoc-plugins\protoc-3.5.1-1-windows-x86_64.exe":
CreateProcess error=206, The filename or extension is too long ->
[Help 1]

我把源代码放在C盘附近,但是没有解决。 如果有人知道如何解决,请告诉我如何解决?


OS:Windows 10

Result of command line:

C:\test>mvn compile

[INFO] Scanning for projects...

[WARNING]

[WARNING] Some problems were encountered while building the effective
model for com.google.homegraph:dashboard:war:0.1.0-SNAPSHOT

[WARNING]
'dependencies.dependency.(groupId:artifactId:type:classifier)' must be
unique: com.googlecode.objectify:objectify:jar -> duplicate
declaration of version 5.1.22 @ line 164, column 15

[WARNING] 'build.plugins.plugin.(groupId:artifactId)' must be unique
but found duplicate declaration of plugin
org.apache.maven.plugins:maven-war-plugin @ line 304, column 13

[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] Detecting the operating system and CPU architecture

[INFO]
------------------------------------------------------------------------

[INFO] os.detected.name: windows

[INFO] os.detected.arch: x86_64

[INFO] os.detected.version: 10.0

[INFO] os.detected.version.major: 10

[INFO] os.detected.version.minor: 0

[INFO] os.detected.classifier: windows-x86_64

[WARNING] The project
com.google.homegraph:dashboard:war:0.1.0-SNAPSHOT uses prerequisites
which is  only intended for maven-plugin projects but not for non
maven-plugin projects. For such purposes you should use the
maven-enforcer-plugin. See
https://maven.apache.org/enforcer/enforcer-rules/requireMavenVersion.html

[INFO]

[INFO] -------------------< com.google.homegraph:dashboard >-------------------

[INFO] Building dashboard 0.1.0-SNAPSHOT

[INFO] --------------------------------[ war ]---------------------------------

[INFO]

[INFO] --- protobuf-maven-plugin:0.5.0:compile (default) @ dashboard ---

[INFO] Compiling 1579 proto file(s) to
C:\test\target\generated-sources\protobuf\java

[INFO]
------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO]
------------------------------------------------------------------------

[INFO] Total time:  1.583 s

[INFO] Finished at: 2019-10-22T18:03:49+09:00

[INFO]
------------------------------------------------------------------------

[ERROR] Failed to execute goal
org.xolstice.maven.plugins:protobuf-maven-plugin:0.5.0:compile
(default) on project dashboard: An error occurred while invoking
protoc.: Error while executing process. Cannot run program
"C:\test\target\protoc-plugins\protoc-3.5.1-1-windows-x86_64.exe":
CreateProcess error=206, The filename or extension is too long ->
[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

【问题讨论】:

  • 尝试将 protobuf 插件版本更改为 0.6.1。 github link on this issue 您也可以阅读上面的几行,其中描述了您面临的相同问题。希望这可以解决您的问题,否则您可以使用提供的链接上方的几个 cmets 中提到的长路径工具。
  • 感谢您的评论。我将protobuf插件版本更改为0.6.1,但我没有解决。我还看到了关于长路径工具的 cmets,但不幸的是我不知道如何使用该工具。
  • 您是否针对类似搜索检查了错误消息? This one seems to list a few workarounds.

标签: java maven actions-on-google google-smart-home


【解决方案1】:

对不起,看来我的程序有误。

我不必手动执行README.md 中的“从源代码构建”字段, 我在这一步复制了额外的文件。 它是在工作开始时编译时自动添加的。 终于可以在下面的环境下编译了。

OS:Linux (CentOS7)
maven version:3.3.9 (I matched it to the version written in `pom.xml`.)

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2016-07-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2010-09-13
    • 1970-01-01
    相关资源
    最近更新 更多