A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://cloud.google.com/endpoints/docs/frameworks/java/set-up-environment below:

Setting up a development environment | Cloud Endpoints Frameworks for App Engine

Setting up a development environment

Stay organized with collections Save and categorize content based on your preferences.

This page describes how to set up your development environment to build and deploy your backend API using Cloud Endpoints Frameworks for the App Engine standard environment. This page uses the Endpoints Frameworks version 2.0 skeleton code sample to explain the basic software and components you need to get started.

You might want to use the endpoints-skeleton-archetype or the hello-endpoints-archetype described in Using Apache Maven and the App Engine plugin (Google Cloud CLI-based) to create a new Endpoints Frameworks version 2.0 project.

To get a better understanding of the steps required to deploy a sample API using Endpoints Frameworks, see the tutorial Getting started with Endpoints Frameworks on App Engine.

Before you begin
  1. Sign in to your Google Cloud account. If you're new to Google Cloud, create an account to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.
  2. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Note: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.

    Go to project selector

  3. Verify that billing is enabled for your Google Cloud project.

  4. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Note: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.

    Go to project selector

  5. Verify that billing is enabled for your Google Cloud project.

  6. Make a note of the Google Cloud project ID because it is needed later.
Installing and configuring required software
  1. If you don't have Java 8 installed, download the Java Development Kit (JDK) from Oracle's site and install it.
  2. Install either Maven or Gradle:
  3. Download and initialize the Google Cloud CLI.
  4. Run the following commands:
    1. Make sure that the gcloud CLI is authorized to access your data and services on Google Cloud:
      gcloud auth login
    2. Use application default credentials:
      gcloud auth application-default login
    3. Install the Google Cloud SDK app-engine-java component:
      gcloud components install app-engine-java
    4. Update to the latest version of the Google Cloud SDK and all components:
      gcloud components update
  5. Create an App Engine application:
    1. Set the default project to your Google Cloud project ID:
      gcloud config set project YOUR_PROJECT_ID

      Replace YOUR_PROJECT_ID with your Google Cloud project ID. If you have other Google Cloud projects, and you want to use gcloud to manage them, see Managing gcloud CLI configurations.

    2. Select the region where you want to create your App Engine application. See App Engine locations for a list of regions.
    3. Create an App Engine application. Replace YOUR_PROJECT_ID with your Google Cloud project ID and YOUR_REGION with the region that you want the App Engine application created in.
        gcloud app create \
        --project=YOUR_PROJECT_ID \
        --region=YOUR_REGION
Getting the Endpoints Frameworks skeleton sample

The Endpoints Frameworks version 2.0 skeleton sample contains the necessary build scripts for Maven and Gradle. It also contains the required files to get started creating your first API.

  1. Clone the sample repository to your local machine:

     git clone https://github.com/GoogleCloudPlatform/java-docs-samples
    
  2. Change to the directory containing the Endpoints Frameworks skeleton sample:

     cd java-docs-samples/appengine-java8/endpoints-v2-skeleton/
    

    The sample has the following directory structure:

Configuring the build files

This section describes the Maven pom.xml and Gradle build.gradle files included in the sample code. Except for entering your Google Cloud project ID so that it can be used in the hostname, the build files are ready for you to get started creating your API.

About the minimum configuration

This section describes the minimum configuration needed in your build file.

Maven

Minimum dependencies

The following shows the minimum dependencies required in your pom.xml to get started:

Apply plugins

The following plugins are applied to enable them:

Gradle

Plugin dependencies

The following shows the plugins required to build your API:

Apply plugins

The following plugins are applied to enable them in your Gradle build script:

Project dependencies

The following dependencies are used by the project:

Defining the hostname for your service

Endpoints Frameworks uses DNS-compatible names to uniquely identify services. Because Google Cloud project IDs are guaranteed to be globally unique, you should use your Google Cloud project ID as part of your API's service name.

You must add your Google Cloud project ID to the build files to configure the hostname for your service. The hostname should be in the following format:

YOUR_PROJECT_ID.appspot.com

When you deploy the API to App Engine, a DNS entry with a name in the format YOUR_PROJECT_ID.appspot.com is created automatically. The hostname is both the name of the Cloud Endpoints service and the domain name that you use to send requests to your API.

Maven

In the hostname field, replace YOUR_PROJECT_ID with your Google Cloud project ID.

Gradle

Set the variable projectID to your Google Cloud project ID. For example: def projectId = 'example-project-12345'

Configuring the Endpoints servlet

The Endpoints servlet handles incoming requests and forwards them to the backend service running on App Engine. The Endpoints servlet is required for your API to be managed by Endpoints.

For more information about web.xml, see The deployment descriptor: web.xml.

Configuring your App Engine deployment

The appengine-web.xml file is used to define the App Engine standard environment configuration when the API is deployed. See appengine-web.xml reference for more information.

What's next

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-08-07 UTC.

[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["This page guides you through setting up a development environment for building and deploying a backend API using Cloud Endpoints Frameworks for the App Engine standard environment."],["You will need to install Java 8, either Maven or Gradle, and the Google Cloud CLI, along with authorizing the gcloud CLI and installing the `app-engine-java` component."],["The Endpoints Frameworks version 2.0 skeleton sample, which includes essential build scripts and files, is obtained by cloning a repository and navigating to the `endpoints-v2-skeleton` directory."],["Configuring the build files (pom.xml for Maven, build.gradle for Gradle) requires adding dependencies like `endpoints-framework` and the `appengine-api-1.0-sdk`, and applying relevant plugins, as well as defining a hostname using your Google Cloud project ID."],["The `web.xml` file needs to be configured with an Endpoints servlet to manage incoming requests and forward them to the backend service, and `appengine-web.xml` should be configured to specify the App Engine standard environment settings."]]],[]]


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4