Closed thgbarros closed 5 years ago
Can you place the device.proto and homegraph.proto to the applicable directory structure src/main/proto/google/home/graph/v1
?
I thought that these files were to stay in src/main/proto
.
Now I have a new failure:
scenario@barros:~/Documents/smart-home-dashboard$ mvn clean package
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/usr/share/maven/lib/guice.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[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 165, 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 306, 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: linux
[INFO] os.detected.arch: x86_64
[INFO] os.detected.version: 4.18
[INFO] os.detected.version.major: 4
[INFO] os.detected.version.minor: 18
[INFO] os.detected.release: debian
[INFO] os.detected.release.like.debian: true
[INFO] os.detected.classifier: linux-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] --- maven-clean-plugin:2.5:clean (default-clean) @ dashboard ---
[INFO] Deleting /home/scenario/Documents/smart-home-dashboard/target
[INFO]
[INFO] --- protobuf-maven-plugin:0.5.0:compile (default) @ dashboard ---
[INFO] Compiling 4 proto file(s) to /home/scenario/Documents/smart-home-dashboard/target/generated-sources/protobuf/java
[INFO]
[INFO] --- protobuf-maven-plugin:0.5.0:compile-custom (default) @ dashboard ---
[INFO] Compiling 4 proto file(s) to /home/scenario/Documents/smart-home-dashboard/target/generated-sources/protobuf/grpc-java
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ dashboard ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Copying 4 resources
[INFO] Copying 4 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.3:compile (default-compile) @ dashboard ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 29 source files to /home/scenario/Documents/smart-home-dashboard/target/dashboard-0.1.0-SNAPSHOT/WEB-INF/classes
[INFO] -------------------------------------------------------------
[WARNING] COMPILATION WARNING :
[INFO] -------------------------------------------------------------
[WARNING] bootstrap class path not set in conjunction with -source 8
[INFO] 1 warning
[INFO] -------------------------------------------------------------
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /home/scenario/Documents/smart-home-dashboard/src/main/java/com/google/home/graph/v1/HomeGraphApiServiceGrpc.java:[29,14] duplicate class: com.google.home.graph.v1.HomeGraphApiServiceGrpc
[ERROR] /home/scenario/Documents/smart-home-dashboard/src/main/java/com/google/home/graph/v1/DeviceProto.java:[22,14] duplicate class: com.google.home.graph.v1.DeviceProto
[ERROR] /home/scenario/Documents/smart-home-dashboard/src/main/java/com/google/api/HttpRule.java:[202,15] duplicate class: com.google.api.HttpRule
[ERROR] /home/scenario/Documents/smart-home-dashboard/target/generated-sources/protobuf/java/com/google/api/HttpProto.java:[6,14] duplicate class: com.google.api.HttpProto
[ERROR] /home/scenario/Documents/smart-home-dashboard/src/main/java/com/google/api/CustomHttpPatternOrBuilder.java:[22,8] duplicate class: com.google.api.CustomHttpPatternOrBuilder
[ERROR] /home/scenario/Documents/smart-home-dashboard/target/generated-sources/protobuf/java/com/google/home/graph/v1/HomeGraphApiServiceProto.java:[6,14] duplicate class: com.google.home.graph.v1.HomeGraphApiServiceProto
[ERROR] /home/scenario/Documents/smart-home-dashboard/src/main/java/com/google/api/CustomHttpPattern.java:[29,15] duplicate class: com.google.api.CustomHttpPattern
[ERROR] /home/scenario/Documents/smart-home-dashboard/target/generated-sources/protobuf/java/com/google/api/HttpRuleOrBuilder.java:[6,8] duplicate class: com.google.api.HttpRuleOrBuilder
[ERROR] /home/scenario/Documents/smart-home-dashboard/src/main/java/com/google/api/Http.java:[31,15] duplicate class: com.google.api.Http
[ERROR] /home/scenario/Documents/smart-home-dashboard/src/main/java/com/google/api/AnnotationsProto.java:[22,14] duplicate class: com.google.api.AnnotationsProto
[ERROR] /home/scenario/Documents/smart-home-dashboard/src/main/java/com/google/api/HttpOrBuilder.java:[22,8] duplicate class: com.google.api.HttpOrBuilder
[ERROR] /home/scenario/Documents/smart-home-dashboard/target/generated-sources/protobuf/grpc-java/com/google/home/graph/v1/HomeGraphApiServiceGrpc.java:[26,18] cannot find symbol
symbol: class Generated
location: package javax.annotation
[INFO] 12 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.704 s
[INFO] Finished at: 2019-01-23T16:24:50-02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.3:compile (default-compile) on project dashboard: Compilation failure: Compilation failure:
[ERROR] /home/scenario/Documents/smart-home-dashboard/src/main/java/com/google/home/graph/v1/HomeGraphApiServiceGrpc.java:[29,14] duplicate class: com.google.home.graph.v1.HomeGraphApiServiceGrpc
[ERROR] /home/scenario/Documents/smart-home-dashboard/src/main/java/com/google/home/graph/v1/DeviceProto.java:[22,14] duplicate class: com.google.home.graph.v1.DeviceProto
[ERROR] /home/scenario/Documents/smart-home-dashboard/src/main/java/com/google/api/HttpRule.java:[202,15] duplicate class: com.google.api.HttpRule
[ERROR] /home/scenario/Documents/smart-home-dashboard/target/generated-sources/protobuf/java/com/google/api/HttpProto.java:[6,14] duplicate class: com.google.api.HttpProto
[ERROR] /home/scenario/Documents/smart-home-dashboard/src/main/java/com/google/api/CustomHttpPatternOrBuilder.java:[22,8] duplicate class: com.google.api.CustomHttpPatternOrBuilder
[ERROR] /home/scenario/Documents/smart-home-dashboard/target/generated-sources/protobuf/java/com/google/home/graph/v1/HomeGraphApiServiceProto.java:[6,14] duplicate class: com.google.home.graph.v1.HomeGraphApiServiceProto
[ERROR] /home/scenario/Documents/smart-home-dashboard/src/main/java/com/google/api/CustomHttpPattern.java:[29,15] duplicate class: com.google.api.CustomHttpPattern
[ERROR] /home/scenario/Documents/smart-home-dashboard/target/generated-sources/protobuf/java/com/google/api/HttpRuleOrBuilder.java:[6,8] duplicate class: com.google.api.HttpRuleOrBuilder
[ERROR] /home/scenario/Documents/smart-home-dashboard/src/main/java/com/google/api/Http.java:[31,15] duplicate class: com.google.api.Http
[ERROR] /home/scenario/Documents/smart-home-dashboard/src/main/java/com/google/api/AnnotationsProto.java:[22,14] duplicate class: com.google.api.AnnotationsProto
[ERROR] /home/scenario/Documents/smart-home-dashboard/src/main/java/com/google/api/HttpOrBuilder.java:[22,8] duplicate class: com.google.api.HttpOrBuilder
[ERROR] /home/scenario/Documents/smart-home-dashboard/target/generated-sources/protobuf/grpc-java/com/google/home/graph/v1/HomeGraphApiServiceGrpc.java:[26,18] cannot find symbol
[ERROR] symbol: class Generated
[ERROR] location: package javax.annotation
[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
Hmm the error:
cannot find symbol
[ERROR] symbol: class Generated
[ERROR] location: package javax.annotation
seems to suggest that the project hasn't imported javax.annotation, although other errors seem to point to build files that were generated multiple times.
It is good that you got past the first error, but that indicates the documentation needs to be improved.
I'm getting the same error:
[ERROR] symbol: class Generated [ERROR] location: package javax.annotation
Actually I had to fix some other stuff (changing "&&" to ";", for example) by following the instructions. I think a setup instructions update will be good.
If you can make specific changes and open a pull request, that'll be helpful. It's unusual that folks encounter issues, as I haven't had any build issues when running the sample.
I am trying to setup following instructions and I get errors on mvn compile package.
Proto files.