【发布时间】:2017-11-24 07:13:53
【问题描述】:
我一直在试验 GAE Endpoint 框架,教程中的步骤中说要执行这个 maven 命令:
mvn endpoints-framework:openApiDocs
据我了解,此命令将生成 OpenAPI 文档并在末尾提示文件的位置。但是,它似乎无法读取 maven 传递给它的参数,而是打印使用语句,如下所示:
[INFO] --- endpoints-framework-maven-plugin:1.0.2:openApiDocs (default-cli) @ demoapp ---
[INFO] Endpoints Tool params : [get-openapi-doc, -o, C:\projects\demoapp-backend\target\openapi-docs\openapi.json, -cp,C:\..., -w, C:\projects\demoapp-backend\src\main\webapp, -h, demo-app.appspot.com]
get-openapi-doc
Generates an OpenAPI document
Usage: <Endpoints tool> get-openapi-doc <options> <service class>...
Options:
-cp CLASSPATH, --classpath=CLASSPATH
Lets you specify the service class or classes from a path other than the
default <war-directory>/WEB-INF/libs and <war-directory>/WEB-INF/classes,
where <war-directory is the directory specified in the war option, or simply
./war if that option is not supplied.
-o OUTPUT_FILE, --output=OUTPUT_FILE
Sets the file where output will be written to. Default: ./openapi.json
-w WAR_PATH, --war=WAR_PATH
Sets the path to the war directory where web-appengine.xml and other
metadata are located. Default: ./war.
-h HOSTNAME, --hostname=HOSTNAME
Sets the hostname for the generated document. Default is the app's default
hostname.
-p BASE_PATH, --path=BASE_PATH
Sets the base path for the generated document. Default is /_ah/api.
Example:
<Endpoints tool> get-openapi-doc com.google.devrel.samples.ttt.spi.BoardV1 com.google.devrel.samples.ttt.spi.ScoresV1
我已经截断了类路径以使阅读和发布输出更容易。有没有其他人遇到过这个问题?一些指针将不胜感激。
【问题讨论】:
-
如果重要的话,项目和 POM 是由 eclipse 生成的。然而,我没有看到示例项目和我的 POM 中的差异。
标签: java maven google-app-engine google-cloud-endpoints