0

I'm proceeding with the README.md procedure at the following URL, but when compiling, I get the following error message and cannot proceed. 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]

I put the source code near the C drive, but it didn't solve. If anyone knows how to solve it, Would you tell me how to solve?


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
ToniCorinne
  • 503
  • 3
  • 12
gaku
  • 11
  • 1
  • try changing the protobuf plugin version to 0.6.1. [github link on this issue](https://github.com/xolstice/protobuf-maven-plugin/issues/5#issuecomment-425777293) You can read few lines above too which describes the same issue you are facing. Hope this resolves your issue else you can use long path tool mentioned in the few comments above the provided link. – ialam Oct 22 '19 at 10:57
  • Thanks for your comment.I changed the protobuf plugin version to 0.6.1, But I didn't solve. I also saw comments about the long path tool, but unfortunately I don't know what to do with that tool. – gaku Oct 22 '19 at 12:17
  • Have you checked the error message against similar searches? [This one seems to list a few workarounds.](https://stackoverflow.com/questions/10519558/createprocess-error-206-the-filename-or-extension-is-too-long-when-running-main) – Nick Felker Oct 23 '19 at 17:22

1 Answers1

0

I'm sorry, it seems my procedure was wrong.

I didn't have to do manually the "Build from source" field in README.md, I copied extra files in this step. It was automatically added when compiling at the beginning of the work. Finally, I was able to compile in the following environment.

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