Using Java Libraries

You can use any Java compatible libraries with the App Engine flexible environment. In these instructions we require Apache Maven.

Declaring and managing dependencies

You manage the dependencies for Maven projects by specifying which libraries to include in the <dependencies> section inside the pom.xml file for the project.

Specifying the Java servlet library

Eclipse Jetty and Tomcat apps require the Java servlet library (Some Frameworks, like SparkJava or Spring Boot will not require this); as shown in this <dependencies> entry within pom.xml:




Specifying the dependencies to use the Google Cloud Client Libraries for Java

If you want to have access to the entire set of the Google Cloud Client Libraries for Java libraries with the Java 8 and Jetty 9 runtimes, add these lines to your pom.xml file:


You can verify the current version number by checking the sample snippet at the top of the google-cloud library web page.

Specifying dependencies to use Cloud Storage

You can also use only the specific libraries you need, such as the Cloud Storage library:

Was this page helpful? Let us know how we did:

Send feedback about...

App Engine flexible environment for Java docs