我正在尝试将我的项目从端点 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] = ...
)
构建和测试运行正确(mvn verify
等),因此库确实存在并且可以正常工作,但我认为如果没有发现文档,它实际上无法运行。
有什么我可能错过的想法吗?该类路径中似乎有大量 .jar 文件,是否有一些限制?