Stay organized with collectionsSave and categorize content based on your preferences.
You can use any Java compatible libraries with the Java runtime on the
App Engine standard environment.
These instructions use Apache Maven to build, run, and deploy a sample app.
For details about installing Maven, seeUsing Apache Maven and the App Engine plugin.
Declare and manage dependencies
To manage dependencies using Maven, you need to specify the dependencies in
the<dependencies>section inside thepom.xmlfile of your project.
To manage your project's dependency on Maven itself, you can use theMaven Wrapper. If you do not use the
Maven Wrapper, App Engine defaults to using a recent version of Maven
when runninggcloud app deploy.
Private dependencies with Artifact Registry
If you need to host private dependencies for your Java app, you can use anArtifact Registry Maven repository.
Connecting to a Maven repository hosted on Artifact Registry requires theArtifact Registry Maven Toolsplugin for your Maven or Gradle configuration.
Specify the Java servlet library
Eclipse Jetty and Tomcat apps require the Java servlet library. Specify it in
yourpom.xmlfile's<dependencies>entry:
[[["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-09-04 UTC."],[[["\u003cp\u003eApp Engine standard environment supports any Java-compatible libraries, allowing for flexible development.\u003c/p\u003e\n"],["\u003cp\u003eApache Maven is used for building, running, and deploying applications, with dependencies managed in the \u003ccode\u003epom.xml\u003c/code\u003e file.\u003c/p\u003e\n"],["\u003cp\u003ePrivate dependencies can be hosted using an Artifact Registry Maven repository, which requires the Artifact Registry Maven Tools plugin.\u003c/p\u003e\n"],["\u003cp\u003eEclipse Jetty and Tomcat applications must include the Java servlet library in their \u003ccode\u003epom.xml\u003c/code\u003e file's dependencies, whereas frameworks such as SparkJava or Spring Boot do not.\u003c/p\u003e\n"],["\u003cp\u003eThe Cloud Client Libraries for Java provide access to Google Cloud services and are added as dependencies, with the option for automatic authentication handling.\u003c/p\u003e\n"]]],[],null,[]]