-
Notifications
You must be signed in to change notification settings - Fork 3
GettingStartedEclipse
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:
-
Git plugin - we recommend EGit at http://eclipse.org/egit/ (Eclipse update site: http://download.eclipse.org/egit/updates)
-
Maven plugin - use M2Eclipse at http://m2eclipse.codehaus.org/ (Eclipse update site: http://m2eclipse.sonatype.org/sites/m2e/)
-
Must include these Maven 'optional' components:
-
Eclipse OPTIONAL COMPONENTS update site: http://m2eclipse.sonatype.org/sites/m2e-extras
-
If you want to work on the web interfaces, you must include these Maven Project Configurators components:
- Maven Integration for WTP
-
-
WST plugins (optional) - Web Standards Tools, part of Eclipse's Web Tools Project, helpful for work on the OpenTripPlanner web interfaces
- If these weren't included with your Eclipse distribution already, you can install them by selecting the "Galileo" update site and installing everything under "Web, XML, and Java EE Development"
-
On Ubuntu 9.10 (using its packaged version of Eclipse 3.5), I had to add http://download.eclipse.org/releases/galileo/ as an "Available Software Site" to get the Maven plugin to install (to satisfy one of its dependencies). The site can be added by going to Window > Preferences > Install/Update > Available Software.
-
If using the packaged version of Eclipse from Fedora, you might have to also install AspectJ (for the ajdt libraries): http://www.eclipse.org/ajdt/downloads/ (Eclipse update site: http://download.eclipse.org/tools/ajdt/35/dev/update)
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:
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:
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.
You can easily import the OpenTripPlanner source into Eclipse. Under the menu option "File -> Import", browse to the "General -> Maven Projects" element:
Browse to the root folder of the source tree and then select all the projects of interest:
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.
You might look at:
-
GraphBuilder -- you need to build a graph from your transit data.
-
-- then you need to serve the webapps
- Check out our page