Class 库解决端点框架中的错误:discoveryDocs
Class library resolving error in endpoints-framework:discoveryDocs
我正在尝试将我的项目从端点 v1 迁移到端点 v2,但无法创建发现文档。 运行宁
$ mvn -DskipTests -X endpoints-framework:discoveryDocs
导致构建失败
[ERROR] Failed to execute goal com.google.cloud.tools:endpoints-framework-maven-plugin:1.0.0:discoveryDocs (default-cli) on project myproject: Execution default-cli of goal com.google.cloud.tools:endpoints-framework-maven-plugin:1.0.0:discoveryDocs failed: A required class was missing while executing com.google.cloud.tools:endpoints-framework-maven-plugin:1.0.0:discoveryDocs: org/apache/commons/dbutils/ResultSetHandler
[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>com.google.cloud.tools:endpoints-framework-maven-plugin:1.0.0
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/Users/me/.m2/repository/com/google/cloud/tools/endpoints-framework-maven-plugin/1.0.0/endpoints-framework-maven-plugin-1.0.0.jar
[ERROR] urls[1] = file:/Users/me/.m2/repository/javax/enterprise/cdi-api/1.0/cdi-api-1.0.jar
...
我可以看到相应的 .jar 文件在 -cp 参数中:
..., /Users/me/.m2/repository/commons-dbutils/commons-dbutils/1.6/commons-dbutils-1.6.jar, ...
但不在错误网址中 (urls[0..48] = ...
)
正确构建和测试 运行s(mvn verify
等),所以这些库确实存在并且有效,但我认为如果没有发现文档,它实际上不能 运行。
有什么我可能错过的想法吗?该类路径中似乎有大量 .jar 文件,是否有限制?
您必须将 endpoints-framework-maven-plugin 更新到版本 1.0.1:
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>endpoints-framework-maven-plugin</artifactId>
<version>1.0.1</version>
<configuration>
<!-- plugin configuration -->
<hostname>YOUR-APPP-ID.appspot.com</hostname>
</configuration>
</plugin>
1.0.0 版本中存在错误,请参见此处:
https://github.com/GoogleCloudPlatform/endpoints-framework-maven-plugin/issues/32
我正在尝试将我的项目从端点 v1 迁移到端点 v2,但无法创建发现文档。 运行宁
$ mvn -DskipTests -X endpoints-framework:discoveryDocs
导致构建失败
[ERROR] Failed to execute goal com.google.cloud.tools:endpoints-framework-maven-plugin:1.0.0:discoveryDocs (default-cli) on project myproject: Execution default-cli of goal com.google.cloud.tools:endpoints-framework-maven-plugin:1.0.0:discoveryDocs failed: A required class was missing while executing com.google.cloud.tools:endpoints-framework-maven-plugin:1.0.0:discoveryDocs: org/apache/commons/dbutils/ResultSetHandler
[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>com.google.cloud.tools:endpoints-framework-maven-plugin:1.0.0
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/Users/me/.m2/repository/com/google/cloud/tools/endpoints-framework-maven-plugin/1.0.0/endpoints-framework-maven-plugin-1.0.0.jar
[ERROR] urls[1] = file:/Users/me/.m2/repository/javax/enterprise/cdi-api/1.0/cdi-api-1.0.jar
...
我可以看到相应的 .jar 文件在 -cp 参数中:
..., /Users/me/.m2/repository/commons-dbutils/commons-dbutils/1.6/commons-dbutils-1.6.jar, ...
但不在错误网址中 (urls[0..48] = ...
)
正确构建和测试 运行s(mvn verify
等),所以这些库确实存在并且有效,但我认为如果没有发现文档,它实际上不能 运行。
有什么我可能错过的想法吗?该类路径中似乎有大量 .jar 文件,是否有限制?
您必须将 endpoints-framework-maven-plugin 更新到版本 1.0.1:
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>endpoints-framework-maven-plugin</artifactId>
<version>1.0.1</version>
<configuration>
<!-- plugin configuration -->
<hostname>YOUR-APPP-ID.appspot.com</hostname>
</configuration>
</plugin>
1.0.0 版本中存在错误,请参见此处: https://github.com/GoogleCloudPlatform/endpoints-framework-maven-plugin/issues/32