-
Notifications
You must be signed in to change notification settings - Fork 49
Cloud Tools for Eclipse Product Requirements
Warning: This project is in the early stages of development. What's described here is where we're going, not where we are today.
Cloud Tools for Eclipse (CT4E) is a plugin that supports development of Java servlet applications on the Google Cloud Platform (GCP) inside the Eclipse Integrated Development Environment (IDE) version 4.5 and later. It enables you to build web applications and sites that run on top of:
- App Engine Standard
- App Engine Flex
- Google Compute Engine (GCE)
- Google Container Environment (GKE)
Cloud Tools for Eclipse depends on the Eclipse Web Tools Platform (WTP). For the many parts of web app development that do not differ from one servlet container to the next, e.g. unit testing and code completion, you develop using standard WTP tools. CT4E provides additional functionality that's useful specifically for applications hosted on the Google Cloud Platform.
Features include:
- New application wizards
- Load existing projects
- Run your web application on your local workstation for manual testing
- Debug your web application on your local workstation using the familiar Eclipse debugger
- Code validations for problems specific to the App Engine standard environment
- Deploy web applications to the four environments
Create sample applications for all four environments in a few clicks.
-
File > New > Project...
-
Expand the Google Cloud Platform folder icon.
-
Select one of the options. Currently "App Engine Standard Java Project" and "Maven Based App Engine Standard Java Project" are available. TBD: App Engine Flex, Google Compute Engine, and Google Container Engine.
-
Press the Next button.
-
Fill out the form to a package. (The remaining defaults are fine for initial local development until you're ready to deploy to the cloud.)
CT4E will create a new Eclipse project, complete with WEB-INF folder, appengine-web.xml file, servlet web.xml file, Java classes, HTML documents, and other minimal boilerplate for a simple Hello World application. A pom.xml is included with the Maven project.
If your version of Eclipse supports Maven (Eclipse 4.6 Neon or Eclipse 4.5 Mars for JEE), then you can import existing Maven based project into Eclipse:
-
File > Import
-
Maven > Existing Projects and click "Next" button.
-
Browse to the directory that contains the pom.xml for your project and click "Open".
-
Click Finish.
Other projects can be configured manually. (TBD: how?)
When you're ready to try out your new application, select the project in the Eclipse Package Explorer or Project Explorer. From the context menu, select Run As > Run on Server.
Eclipse launches a local server on your workstation that hosts your application. Visit http://localhost:8080/ in any web browser to work with it.
Log messages from the server will appear in the Eclipse console.
To run your application using the App Engine Standard runtime, once you select Run As > App Engine.
You can set breakpoints in your Java code as with any other Java application.
If instead of Run As > App Engine you select Debug As > App Engine, then Eclipse will halt execution of the application and open the debugger when the breakpoint is reached.
If you reference a non-whitelisted class in an application targeted to the App Engine Standard environment, GEP will put a red squiggly line under the reference. (The other environments do not place any limits on which Java classes you may use.)
You can exclude particular classes from this validation (e.g. test classes not actually deployed to the server), either individually or as a group.
To deploy the application to the Google Cloud Platform:
-
If you have not already done so, enable the environment you wish to deploy to in the Google Developer Console. (For instance, deploying to GCE requires turning on billing.)
-
Get a project ID (formerly known as an application ID) from the Developer console.
-
Select Run > Deploy or from the context menu Deploy
-
Get the project ID from the Developer Console.
-
From the project's context menu, select Deploy to App Engine Standard.
-
If you want to change the deployment settings, you can do it by either:
-
Select Project > Properties > Google > App Engine
-
Select the Configure Deploy to App Engine Standard... menu item from the project's context menu
-
The Project > Properties > Google > App Engine settings is available/enabled only if the project has the App Engine Facet.
-
The App Engine settings tab configures:
-
Project ID - identifies the App Engine project to use as deploy target for the current project. Overrides the value set in appengine-web.xml.
-
Version - a fixed version to use for deployment, enabled only if the "Versioning" radio button is set to Manual. Can contain lowercase letters, digits, and hyphens. It cannot begin with the prefix "ah-" and the names "default" and "latest" are reserved and cannot be used. Should begin with a letter.
-
Versioning - radio button group to choose between Timestamp, appengine-web.xml, or Manual. Defaults to use appengine-web.xml.
-
Service - name of the service to use for deployment. Defaults to empty string. If empty, the hint should should say "Service name 'default' will be used". Can contain numbers, letters, and hyphens. It cannot be longer than 63 characters and cannot start or end with a hyphen. Overrides the value set in appengine-web.xml.
-
Always promote - checkbox to enable the promotion of the deployed version to primary, defaults to unchecked.
-
Bucket - a GCS bucket to use for deployment instead of the default one. Defaults to empty string.
-
Stop previous version - checkbox to enable stopping the previously running version, defaults to checked.
End User Documentation
- Installation and setup
- Creating a new project
- Running and debugging
- Deploying
- Cloud Tools for Eclipse Tutorial
- Migration from the Google Plugin for Eclipse (GPE)
Contributor Docs