The core CONGO build process is based on Maven (see BuildWithMaven for details), but it's convenient to be able to access the build features from inside your IDE. If your IDE is Eclipse, you have a few approaches available to you.
Maven's eclipse support is implemented by maven-eclipse-plugin
, which generates (and cleans up after) Eclipse projects based on the build settings. The plugin generates projects which refer to dependencies in your local Maven repository via an Eclipse Classpath Variable, M2_REPO
, which must be added to your workspace (m2eclipse, below, automates this).
To add the variable, open the Eclipse Preferences and go to Java > Build Path > Classpath Variables. Add a variable named M2_REPO
and point it to your local repository (normally ~/.m2/repository
or C:\Documents and Settings\username\.m2\repositoiry
).
To generate a WTP-compatible project from maven, run mvn eclipse:eclipse -Dwtpversion=1.5
, then use File > Import > General > Existing Project to bring the project into Eclipse. Use the standard WTP UI actions to load CONGO into your server of choice.
Whenever the dependencies in pom.xml
change, run mvn eclipse:eclipse -Dwtpversion=1.5
to update the Eclipse project, then refresh the project inside Eclipse.
To generate an Eclipse project from maven, run mvn eclipse:eclipse
, then use File > Import > General > Existing Project to bring the project into Eclipse.
Eclipse supports setting up external commands and tools as builders for a project, including Maven. I recommend setting up, at the very minimum, an external tools configuration for 'mvn clean install':
mvn
(or mvn.bat
, for Windows) program.
${workspace_loc:/congo}
clean install
Whenever the dependencies in pom.xml
change, run mvn eclipse:eclipse
to update the Eclipse project, then refresh the project inside Eclipse.
Or you can run mvn
commands from a shell, like I do. -oj
dbs?
http://maven.apache.org/plugins/maven-eclipse-plugin/usage.html