Endpoints Framework Maven Plugin

This Maven plugin provides goals to generate Google Cloud Endpoints Framework client code and discovery docs

Лицензия

Лицензия

Категории

Категории

Maven Компиляция и сборка
Группа

Группа

com.google.cloud.tools
Идентификатор

Идентификатор

endpoints-framework-maven-plugin
Последняя версия

Последняя версия

2.1.0
Дата

Дата

Тип

Тип

maven-plugin
Описание

Описание

Endpoints Framework Maven Plugin
This Maven plugin provides goals to generate Google Cloud Endpoints Framework client code and discovery docs
Ссылка на сайт

Ссылка на сайт

https://github.com/GoogleCloudPlatform/endpoints-framework-maven-plugin
Система контроля версий

Система контроля версий

https://github.com/GoogleCloudPlatform/endpoints-framework-maven-plugin

Скачать endpoints-framework-maven-plugin

Как подключить последнюю версию

<plugin>
    <groupId>com.google.cloud.tools</groupId>
    <artifactId>endpoints-framework-maven-plugin</artifactId>
    <version>2.1.0</version>
</plugin>

Зависимости

compile (5)

Идентификатор библиотеки Тип Версия
org.apache.maven : maven-plugin-api jar 3.3.9
org.apache.maven : maven-model jar 3.3.9
org.apache.maven : maven-core jar 3.3.9
com.google.endpoints : endpoints-framework-tools jar 2.2.2
com.google.guava : guava jar 30.1-jre

provided (1)

Идентификатор библиотеки Тип Версия
org.apache.maven.plugin-tools : maven-plugin-annotations jar 3.2

test (3)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.13.1
org.apache.maven.shared : maven-verifier jar 1.7.2
org.codehaus.plexus : plexus-utils jar 3.3.0

Модули Проекта

Данный проект не имеет модулей.

project status image Maven Central

Endpoints Framework Maven plugin

This Maven plugin provides goals and configurations to build Endpoints Framework projects.

Requirements

Maven is required to build the plugin. To download Maven, follow the instructions.

The remaining dependencies are specified in the pom.xml file and should be automatically downloaded when the plugin is built.

How to use

In your Maven App Engine Java app, add the following plugin to your pom.xml:

<plugin>
  <groupId>com.google.cloud.tools</groupId>
  <artifactId>endpoints-framework-maven-plugin</artifactId>
  <version>1.0.2</version>
</plugin>

All goals are prefixed with endpoints-framework

Server

The plugin exposes the following server side goals

  • clientLibs - generate client libraries
  • discoveryDocs - generate discovery docs
  • openApiDocs - generate Open API docs

The plugin exposes the following parameters for configuring server side goals

  • discoveryDocDir - The output directory of discovery documents
  • clientLibDir - The output directory of client libraries
  • openApiDocDir - The output directory of Open API documents
  • serviceClasses - List of service classes (optional), this can be inferred from web.xml
  • webappDir - Location of webapp directory
  • hostname - To set the hostname of the root url for Open API docs, discovery docs, and client libs (ex: hostname = myapp.appspot.com will result in a default root url of https://myapp.appspot.com/_ah/api)
  • basePath - To set the base path of the root url for Open API docs, discovery docs and client libs (ex: basePath = /_ah/api will result in a default root url of https://myapp.appspot.com/_ah/api)

Usage

Make sure your web.xml is configured to expose your endpoints correctly.

No configuration parameters are required to run with default values

mvn compile endpoints-framework:clientLibs
mvn compile endpoints-framework:discoveryDocs

Client

The plugin exposes the following client side goals

  • generateSrc

The plugin exposes the following parameters for client side goals

  • generatedSrcDir - The output directory of generated endpoints source
  • discoveryDocs - List of discovery docs to generate source from

Usage

Client consuming endpoints using the client plugin need to configure the location of source discovery documents and for best results configure the generateSrc task in the default generate sources phase.

<plugin>
  <groupId>com.google.cloud.tools</groupId>
  <artifactId>endpoints-framework-maven-plugin</artifactId>
  ...
  <configuration>
    <discoveryDocs>
      <discoveryDoc>src/endpoints/myApi-v1-rest.discovery</discoveryDoc>
    </discoveryDocs>
  </configuration>

  <executions>
    <execution>
      <phase>generate-sources</phase>
      <goals>
        <goal>generateSrc</goal>
      </goals>
    </execution>
  </executions>
</plugin>

Users will also need to include the google api client library for their generated source to compile

<dependency>
  <groupId>com.google.api-client</groupId>
  <artifactId>google-api-client</artifactId>
  <version>xx.yy.zz</version>
</dependency>

Running compile should automatically include generated sources from discovery documents

mvn compile
com.google.cloud.tools

Google Cloud Platform

Версии библиотеки

Версия
2.1.0
2.0.1
2.0.0
1.0.3
1.0.2
1.0.1
1.0.0
1.0.0-beta5
1.0.0-beta4
1.0.0-beta3
1.0.0-beta2