Skip to content

GettingStartedEclipse

barbeau edited this page Sep 29, 2011 · 58 revisions

To start, make sure you are using the latest version of Eclipse, available at http://eclipse.org/downloads/. If you are using Ubuntu 10.04 or greater, please use the Ubuntu package of Eclipse.

If you plan on doing development work on the OpenTripPlanner web interfaces (either the REST API or the user webapp), it might be helpful to download the "Eclipse IDE for Java EE Developers" flavor of Eclipse, as it includes many of the necessary plugins for webapp development.

Next, you'll need to have a few Eclipse plugins installed to help with development. You can install plugins by using the the 'Help -> Install New Software...' menu item. Each of the plugins above mentions an 'Install/Update Site' url that you can add to Eclipse to find the plugin.

Specifically, you'll need:

Checking Out the Source from Git

Switch to the "Git Repository Exploring" perspective in Eclipse by selecting Window -> Open Perspective -> Git Repositories (if you don't see this option under Open Perspective, choose Window -> Open Perspective -> Other... and select Git Repository Exploring). Click on the "Clone a Git Repository and add clone to this view" button as shown below:

image

Enter git://github.com/openplans/OpenTripPlanner.git for the URI, select "HTTPS" for the protocol. If you want to contribute edits back, you'll need to enter your GitHub username and password here too, as shown below:

image

Click Next, then select all branches (although the main branch is probably what you're interested in). Click Next, then select the directory where you want the code to be checked out to. Then click Finish. Be patient, it will take Eclipse a minute or two to download the source to your computer, and then the OpenTripPlanner repository should appear in the "Git Respositories" panel.

Importing Existing Source into Eclipse

You can easily import the OpenTripPlanner source into Eclipse. Under the menu option "File -> Import", browse to the "General -> Maven Projects" element:

image

Browse to the root folder of the source tree and then select all the projects of interest:

image

The Result

When everything works correctly, you should see each OpenTripPlanner maven module checked out as an individual Eclipse project in your workspace:

Note that on initial checkout, it may take a while to initially build all the projects in your workspace. In the background, the Maven plugin is downloading all the project dependencies (there are a quite a few). This bulk download only happens once.

image

What Next?

You might look at:

  • GraphBuilder -- you need to build a graph from your transit data.

  • -- then you need to serve the webapps

Having Problems?

  • Check out our page
Clone this wiki locally