-
Notifications
You must be signed in to change notification settings - Fork 16
Working on the project using Eclipse
Disclaimer: Palantir Technologies is not affiliated with, endorsed or sponsored by Palantir.net, Inc. Palantir.net's website is http://palantir.net
Eclipse integration is pretty easy to get going and may require two steps.
Note: you only need to do this once for each Eclipse workspace (not project) that will use Maven artifacts in its classpath. It's idempotent, so there's no harm in doing it on a workspace where it's already been run.
- go to where you have cloned Cinch
- Make sure Eclipse is not currently running
- Run a build using maven:
mvn
- this will ensure that all dependencies have been downloaded - Run the maven Eclipse setup task:
mvn eclipse:configure-workspace -Declipse-workspace=/path/to/your/workspace
(note: depending on your version of maven, the property may be calledeclipse.workspace
- consult the maven output to figure out which one is the right one) - Fire up Eclipse and confirm that the
M2_REPO
classpath variable is set properly:
Here's example output from running these commands. Note that the first time you run them, they may produce substantially more output as maven downloads its needed plugins and dependencies from the maven repos:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Palantir Technologies Cinch Java Binding Framework 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-eclipse-plugin:2.8:configure-workspace (default-cli) @ ptoss-cinch ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.292s
[INFO] Finished at: Wed Dec 21 12:29:50 PST 2011
[INFO] Final Memory: 6M/81M
[INFO] ------------------------------------------------------------------------
- Go to where you cloned Cinch
- run
mvn eclipse:eclipse
- this will write the classpath info to your.project
and.classpath
files - Make sure to refresh / open & close the project in Eclipse to pick up the changes
Here's sample output from running this command - as usual, if it's the first time you're running this, maven may spit out substantially more output as it downloads and installs the necessary plugins:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Palantir Technologies Cinch Java Binding Framework 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> maven-eclipse-plugin:2.8:eclipse (default-cli) @ ptoss-cinch >>>
[INFO]
[INFO] --- build-helper-maven-plugin:1.7:add-source (add-source) @ ptoss-cinch ---
[INFO] Source directory: /Users/regs/work/opensource/cinch/example added.
[INFO]
[INFO] <<< maven-eclipse-plugin:2.8:eclipse (default-cli) @ ptoss-cinch <<<
[INFO]
[INFO] --- maven-eclipse-plugin:2.8:eclipse (default-cli) @ ptoss-cinch ---
[INFO] Using Eclipse Workspace: null
[INFO] Adding default classpath container: org.eclipse.jdt.launching.JRE_CONTAINER
[INFO] File /Users/regs/work/opensource/cinch/.project already exists.
Additional settings will be preserved, run mvn eclipse:clean if you want old settings to be removed.
[INFO] Wrote Eclipse project for "ptoss-cinch" to /Users/regs/work/opensource/cinch.
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.966s
[INFO] Finished at: Wed Dec 21 12:30:51 PST 2011
[INFO] Final Memory: 7M/81M
[INFO] ------------------------------------------------------------------------