...
- Install M2Eclipse
- Before you can use Maven from Eclipse, you will need to make sure that you are running Eclipse from the JRE that is part of a JDK virtual machine. One safe way to do this is to create a shortcut for running Eclipse, and adding the path to the JDK in the shortcut target, as described above under the Eclipse installation instructions.
- From Eclipse Marketplace – DO NOT DO THIS! You will need to do the initial install the traditional way, as described next (the Eclipse Marketplace does not currently allow you to do a base install of m2eclipse)…
- From Install New Software
- Help → Install New Software
It will verify your selection (making sure dependencies are present), and then give you a chance to go back to add dependencies, or continue by clicking Next
Accept the license and click Finish.
Restart Eclipse if prompted.
If you get the following warning, click OK to ignore
If you get the following error, restart the machine and try again. - Help → Install New Software
- Make sure Eclipse is pointed to a JDK rather than a JRE in Eclipse Preferences (Windows → Preferences → Java → Installed JREs and Windows → Preferences → Java → Installed JREs → Execution Environments)
- Install Subclipse
- From Eclipse Marketplace: DO NOT DO THIS! It installs correctly, but is missing some important functionality.
- UPDATE: The install from Eclipse Marketplace has apparently been fixed.
- From Install New Software
- Select all options from the menu after you enter / select the path as shown below
- URL = http://subclipse.tigris.org/update_1.8.x
- Name = anything; suggest “Subclipse”
- Click on Next
- It will verify your selection (making sure dependencies are present), and then give you a chance to go back to add dependencies, or continue by clicking Next.
- Accept the license and click Finish
- If you get the following warning, click OK to ignore.
- Restart Eclipse if prompted
- Select all options from the menu after you enter / select the path as shown below
- From Eclipse Marketplace: DO NOT DO THIS! It installs correctly, but is missing some important functionality.
- Set Eclipse Preferences for Subversion
- Window → Preferences → Team → SVN
- Select a client for the SVN Interface
- If no clients are listed, you probably installed Subclipse from the Marketplace, and didn’t get the client. Go back to the step about installing Subclipse and get the client.
- For this example, JavaHL is selected
- Window → Preferences → Team → SVN → Menu icons
- Select Tortoise SVN
- Set up Tomcat Server in Eclipse
- File → New → Other → Server → Server
- Select Apache Tomcat (e.g., Tomcat 7.0) and use default settings
- Select installation directory, Finish
- File → New → Other → Server → Server
- Set Eclipse Preferences for Maven
Window → Preferences → Maven → Installations → Add → specify Maven root folder (e.g., C:\Program Files\Apache Software Foundation\apache-maven-3.0.3) → OK
- Create a settings.xml file in location specified in Eclipse under Window → Preferences → Maven → User Settings
Sample XML (used for this example):
Pre <?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0http://maven.apache.org/xsd/settings-1.0.0.xsd">
<pluginGroups>
</pluginGroups>
<proxies>
</proxies>
<servers>
</servers>
<mirrors>
</mirrors>
<profiles>
</profiles>
</settings>
- Restart Eclipse
- Update central Maven repository index, as follows. Note that if you don't do it here, it will automatically take place later in the installation process. We recommend updating the index here, so that if there is an error, it is clear where the error occurred.
- Windows → Show View →Other → Maven → Maven Repositories
- Click Global Repositories → right click "central", select Update Index
- This may take a while; you can track progress by clicking on the progress icon on the bottom right of the screen ()
- Sometimes, it takes multiple attempts before this completes. You may need to restart Eclipse in the process.
- If you see an error message of "Unable to update index for central," it may mean you need to turn off a Proxy connection (see http://www.ehow.com/how_6079770_using-proxy-server.html) or configure Proxy-based Maven connections (see http://maven.apache.org/guides/mini/guide-proxies.html). Once you have made the changes, verify that you do not get this error by repeating the steps above.
- Windows → Show View →Other → Maven → Maven Repositories
- InstallJbossDrools Eclipse Workbench (allows writing Drools rules and working with Drools Flow, and testing / debugging directly from Eclipse; part of JBoss Tools).
- Automatic installation from Eclipse
- Download Drools plugin for Eclipse
- Help → Install New Software
- Use appropriate URL found at http://www.jboss.org/tools/download.html. In this case, use http://download.jboss.org/jbosstools/updates/stable/helios/
- Name used in this example for repository: Drools
- Install the three Drools components indicated below under the SOA Development category
- If you get the following warning, click OK to ignore.
- Restart Eclipse if prompted
- Download Drools plugin for Eclipse
- Download the Drools Runtime version 5.5.0.Final
- Download file named Drools Binaries from http://www.jboss.org/drools/downloads.html, using link at
http://download.jboss.org/drools/release/5.5.0.Final/drools-distribution-5.5.0.Final.zip - Place contents of the binaries folder in the zip archive into a directory (C:\Data\Drools\Drools5.5.0.Final is used in this guide)
- E.g., this directory should look like the following:
- Download file named Drools Binaries from http://www.jboss.org/drools/downloads.html, using link at
- Configure Drools Eclipse Workbench
- Windows → Preferences → Drools → Installed Drools Runtime → Add
- Add the version of Drools (since you are allowed to have more than one installed) that you want to add to the build path of newly created Drools projects (the example below shows an older version, you should use the current version of Drools that you have just installed).
- Add the version of Drools (since you are allowed to have more than one installed) that you want to add to the build path of newly created Drools projects (the example below shows an older version, you should use the current version of Drools that you have just installed).
- Select the Drools runtime for use (Use the current version, not 5.3 as shown below)
- Restart Eclipse
- Windows → Preferences → Drools → Installed Drools Runtime → Add
- Automatic installation from Eclipse
- Install M2Eclipse
...
- Add the OpenCDS repository to the list of repositories available to Eclipse.
- Window → Show View → Other…→ SVN → SVN Repositories
- You will see a list of the configured Subversion repositories (your initial list may be empty). Right-click on the list and choose New → Repository Location from the pop-up dialog
- Add the repository for the OpenCDS Trunk Project. The relevant URLs are as follows. Most individuals should initially connect to the 1.x release repository.
E.g., enter http://develop.opencds.org/svn_v1.0/trunk/opencds-parent, and click on Finis
Repository URL and Description Access Main development trunk http://develop.opencds.org/svn_active/trunk/opencds-parent
Locus of the active development on 1.x releases.
Currently restricted to active code contributors. Access may be requested from David Shields at david.shields@opencds.org. 1.x release http://develop.opencds.org/svn_v1.0/trunk/opencds-parent
Stable snapshots from the main development trunk.
Public read-only access. ID and password not required.
- Window → Show View → Other…→ SVN → SVN Repositories
- Import the OpenCDS Project Step 1: Establish Maven Projects
- Close Eclipse if open
- Check out OpenCDS parent project into the Eclipse OpenCDS workspace as follows:
- Go to workspace location (e.g., C:\OpenCDS)
- Right click and select SVN Checkout from context menu
- Enter URL of repository and proceed, as noted below. Note that the URL of the repository should be the appropriate one noted in the table above. Also note that you must add “opencds-parent” to the end of the Checkout directory.
- Now, build the project with Maven from the command line
- From the command line, go to the opencds-parent folder in the workpace workspace (e.g., C:\OpenCDS\opencds-parent)
- Run the command
- mvn clean
- Run the command
- mvn install
- Run the command
- mvn eclipse:eclipse
- running this command creates all the Eclipse-specific project settings for OpenCDS so that you can work with it in Eclipse.
- Import the OpenCDS Project Step 2: Import Maven Projects
- Open Eclipse
- Import the OpenCDS parent project into Eclipse OpenCDS workspace as a Maven project, as follows:
- File → Import → Maven → Existing Maven Projects → Next
- Root Directory → Browser → opencds-parent location (e.g., C:\OpenCDS\opencds-parent). Select all Projects, Finish (the latest version of OpenCDS may have slightly different modules than those shown in the example below)
- File → Import → Maven → Existing Maven Projects → Next
...