I'm working on REST Api developped with Google Cloud Endpoints Framework in Java, everything works correctly when I compile the appengine project and when I create ClientLibs using mvn endpoints-framework:clientLibs.
The second command generates me a zip file which contains sources for client-library, but when I unzip and try to mvn clean package on it pom.xml, it give me a lot of compilation errors:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building company v1-1.23.0-SNAPSHOT v1-1.23.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ company ---
[INFO]
[INFO] --- maven-enforcer-plugin:1.0:enforce (enforce-maven) @ company ---
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ company ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/francis/IdeaProjects/sensor-config-service/target/client-libs/company/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ company ---
[INFO] Compiling 35 source files to /home/francis/IdeaProjects/sensor-config-service/target/client-libs/company/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /home/francis/IdeaProjects/sensor-config-service/target/client-libs/company/src/main/java/io/company/api/company/company.java:[4256,11] error: cannot find symbol
[ERROR] class company.User
/home/francis/IdeaProjects/sensor-config-service/target/client-libs/company/src/main/java/io/company/api/company/company.java:[4163,11] error: class company.User.Create is already defined in class company.User
[ERROR] /home/francis/IdeaProjects/sensor-config-service/target/client-libs/company/src/main/java/io/company/api/company/model/companyDevice.java:[32,13] error: duplicate class: io.company.api.company.model.companyDevice
[ERROR] /home/francis/IdeaProjects/sensor-config-service/target/client-libs/company/src/main/java/io/company/api/company/model/RegistryCredential.java:[32,13] error: duplicate class: io.company.api.company.model.RegistryCredential
[ERROR] /home/francis/IdeaProjects/sensor-config-service/target/client-libs/company/src/main/java/io/company/api/company/model/PublicKeyCertificate.java:[32,13] error: duplicate class: io.company.api.company.model.PublicKeyCertificate
[ERROR] /home/francis/IdeaProjects/sensor-config-service/target/client-libs/company/src/main/java/io/company/api/company/model/MqttConfig.java:[32,13] error: duplicate class: io.company.api.company.model.MqttConfig
[ERROR] /home/francis/IdeaProjects/sensor-config-service/target/client-libs/company/src/main/java/io/company/api/company/model/Invitation.java:[32,13] error: duplicate class: io.company.api.company.model.Invitation
[ERROR] /home/francis/IdeaProjects/sensor-config-service/target/client-libs/company/src/main/java/io/company/api/company/model/EventNotificationConfig.java:[32,13] error: duplicate class: io.company.api.company.model.EventNotificationConfig
[ERROR] /home/francis/IdeaProjects/sensor-config-service/target/client-libs/company/src/main/java/io/company/api/company/model/SiteCollection.java:[32,13] error: duplicate class: io.company.api.company.model.SiteCollection
[ERROR] /home/francis/IdeaProjects/sensor-config-service/target/client-libs/company/src/main/java/io/company/api/company/company.java:[4157,13] error: constructor Create in class company.User.Create cannot be applied to given types;
[INFO] 10 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.316 s
[INFO] Finished at: 2018-07-10T16:41:45+02:00
[INFO] Final Memory: 13M/161M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project company: Compilation failure: Compilation failure:
[ERROR] /home/francis/IdeaProjects/sensor-config-service/target/client-libs/company/src/main/java/io/company/api/company/company.java:[4256,11] error: cannot find symbol
[ERROR] class company.User
[ERROR] /home/francis/IdeaProjects/sensor-config-service/target/client-libs/company/src/main/java/io/company/api/company/company.java:[4163,11] error: class company.User.Create is already defined in class company.User
[ERROR] /home/francis/IdeaProjects/sensor-config-service/target/client-libs/company/src/main/java/io/company/api/company/model/companyDevice.java:[32,13] error: duplicate class: io.company.api.company.model.companyDevice
[ERROR] /home/francis/IdeaProjects/sensor-config-service/target/client-libs/company/src/main/java/io/company/api/company/model/RegistryCredential.java:[32,13] error: duplicate class: io.company.api.company.model.RegistryCredential
[ERROR] /home/francis/IdeaProjects/sensor-config-service/target/client-libs/company/src/main/java/io/company/api/company/model/PublicKeyCertificate.java:[32,13] error: duplicate class: io.company.api.company.model.PublicKeyCertificate
[ERROR] /home/francis/IdeaProjects/sensor-config-service/target/client-libs/company/src/main/java/io/company/api/company/model/MqttConfig.java:[32,13] error: duplicate class: io.company.api.company.model.MqttConfig
[ERROR] /home/francis/IdeaProjects/sensor-config-service/target/client-libs/company/src/main/java/io/company/api/company/model/Invitation.java:[32,13] error: duplicate class: io.company.api.company.model.Invitation
[ERROR] /home/francis/IdeaProjects/sensor-config-service/target/client-libs/company/src/main/java/io/company/api/company/model/EventNotificationConfig.java:[32,13] error: duplicate class: io.company.api.company.model.EventNotificationConfig
[ERROR] /home/francis/IdeaProjects/sensor-config-service/target/client-libs/company/src/main/java/io/company/api/company/model/SiteCollection.java:[32,13] error: duplicate class: io.company.api.company.model.SiteCollection
[ERROR] /home/francis/IdeaProjects/sensor-config-service/target/client-libs/company/src/main/java/io/company/api/company/company.java:[4157,13] error: constructor Create in class Company.User.Create cannot be applied to given types;
[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
Hello,
I'm working on REST Api developped with Google Cloud Endpoints Framework in Java, everything works correctly when I compile the appengine project and when I create ClientLibs using mvn endpoints-framework:clientLibs.
The second command generates me a zip file which contains sources for client-library, but when I unzip and try to mvn clean package on it pom.xml, it give me a lot of compilation errors:
Did anyone already faced this issue ?
Thanks in advance for your answers !