Source code checkout with Eclipse
- Use the SVN plugin for Eclipse (get it here: http://subclipse.tigris.org ).
- Open the view: SVN Repository, and add the URL location:
Note: the website is under .../incubator/uima/site
Note: for readonly access, you can use http: instead of https:
- Expand this to see the projects. Select the one(s) you want, and right-click, and say "checkout". You can check out as many as you want at one time.
- Choose "Checkout as a project in the workspace"
This will create an Eclipse simple project.
In addition to the above URL, there are additional projects in Apache UIMA in the "sandbox". You can check those projects out into the same (or different - it's up to you) workspace. The sandbox projects are located in
http://svn.apache.org/repos/asf/incubator/uima/sandbox/trunk
Converting into Java projects with Maven
First be sure you've told Eclipse about Maven. After installing Maven, open a command window and say
mvn -Declipse.workspace=<eclipse workspace dir> eclipse:add-maven-repo
This you only need to do once (per Eclipse workspace you're using) - it adds a maven repository to your machine (On Windows, under documents & settings / .m2 / repository), and sets up an Eclipse Java Build Path variable to reference it.
To convert this to a Java project with the right class path dependencies (which are computed from the maven pom):
- open a commmand line window,
- cd to the project directory, and
- run the command
"mvn eclipse:eclipse"
.
Do this for Java projects, including the eclipse plugins. It's not needed for the docbook / website projects.
Manually converting into Java projects
- Alternatively, you can tell the checkout UI to use the Eclipse new project wizard. If you do this, you have to do many things manually:
In that wizard, which runs repeatedly for each project, specify you want to create- a Java project for the Java projects,
- a plugin project for the uimaj-ep-xxxx projects, and
- a "simple" project for the uima-docbooks, uimaj, and uimaj-distr.
Also, for Java projects, make the project depend on the proper other projects (look in the pom for this info), and set up the output folders to be stored in /target (not /bin).
Quickstart Guide for Eclipse:
Follow these steps for the first setup. It will create a working environment without a sophisticated configuration.
- Checkout source code:
- Use the SVN plugin for Eclipse (via updatesite from here: http://subclipse.tigris.org/update_1.0.x).
- Open the view: SVN Repository, and add the URL location:
https://svn.apache.org/repos/asf/incubator/uima/uimaj/trunk
- Expand this and mark all projects
- right-click, and say "checkout"
- Choose "Checkout as a project in the workspace"
- Building with Maven:
- install Maven on your computer (get it from here: http://maven.apache.org/)
Info | ||||||
---|---|---|---|---|---|---|
| ||||||
Maven needs to be setup properly! Unfortunately the documentation is pretty weak and not consistent here.
(Note: even if the activation jar has a higher version, refer to version 1.0.2!!!)
On Windows, right click on "My Computer" select "Properties". Change to the "Advanced" tab and click on "Environment Variables". Create a new variable called M2_HOME for the Maven home directory and add the following entry to the end of the PATH variable:
|
- open a console and change to the uimaj project in your eclipse workspace
- verify your the successful installation of Maven by printing its version:
No Format prompt$ mvn --version Maven version: 2.0.4
- execute "mvn install eclipse:eclipse" in the console
The final output should look similar to that:No Format ... [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] ------------------------------------------------------------------------ [INFO] Apache UIMA Java SDK .................................. SUCCESS [4.410s] [INFO] Apache UIMA Utility Classes For JUnit Tests ........... SUCCESS [0.511s] [INFO] Apache UIMA Java Framework Core ....................... SUCCESS [2.981s] [INFO] Java Vinci Library .................................... SUCCESS [0.054s] [INFO] Apache UIMA Java Vinci Adapter ........................ SUCCESS [0.087s] [INFO] Apache UIMA Java Collection Processing Engine ......... SUCCESS [0.063s] [INFO] Apache UIMA Java Framework - Document Annotation ...... SUCCESS [0.067s] [INFO] Apache UIMA Java SDK Tools ............................ SUCCESS [0.091s] [INFO] Apache UIMA Java SDK Examples ......................... SUCCESS [0.079s] [INFO] Apache UIMA Java SOAP Adapter ......................... SUCCESS [4.458s] [INFO] Apache UIMA Utility Classes For Component JUnit Tests . SUCCESS [0.045s] [INFO] Apache UIMA Debug Eclipse Plugin ...................... SUCCESS [36.225s] [INFO] Apache UIMA JCasGen Eclipse Plugin .................... SUCCESS [4.314s] [INFO] Apache UIMA Configurator Eclipse Plugin ............... SUCCESS [19.509s] [INFO] Apache UIMA PEAR Packager Eclipse Plugin .............. SUCCESS [0.396s] [INFO] Apache UIMA Runtime Plugin ............................ SUCCESS [0.006s] [INFO] ------------------------------------------------------------------------ [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESSFUL [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1 minute 14 seconds [INFO] Finished at: Mon Jan 15 20:21:02 EST 2007 [INFO] Final Memory: 7M/17M [INFO] ------------------------------------------------------------------------
- Setup Eclipse:
- go to Window > Preferences... In the Preferences Window select:
Java > Build Path > Classpath - set a new environment variable M2_REPO to ˜/.m2/repository on unix or mac and %USERPROFILE%\.m2\repository on windows
Note title Note: You should not have to do this, if you've set up Eclipse using the Maven command
mvn -Declipse.workspace=<eclipse workspace dir> eclipse:add-maven-repo
This command adds a maven repository to your machine, and sets up the M2_REPO Eclipse Java Build Path variable to reference it.
- go to Window > Preferences... In the Preferences Window select:
- if no refresh and rebuild is started automatically, do it manually
- if no refresh and rebuild is started automatically, do it manually
No errors should now exist in the uima workspace