-
Notifications
You must be signed in to change notification settings - Fork 1
Eclipse Setup
Eclipse is a powerful integrated IDE for Java. WERTi will strive to remain as
compatible as possible with Eclipse. Currently, only the newest version of
Eclipse is supported, Ganymede. The following documentation shall help you
getting started with testing, building and debugging WERTi inside the Eclipse
IDE.
Some of the instructions here require you to install additional Eclipse plugins. Before doing so, consider the hints in this section.
If not done so earlier, put the Eclipse Ganymede Update Site onto the list of your update sites. We suggest to use
the mirror by Mirrorservice located in the UK. This will enable Eclipse to resolve common dependencies automatically as the Update Site provides countless general plugins.
JGit a plugin for Eclipse that is under heavy development. Feel free to install it from this update site and experiment. However, if you simply want to download WERTi and play with it, you can as well use the command line tool as described below since you will need it only once.
Step 1: On the command line, go to your Eclipse Workspace directory and clone WERTi from github using the command
git clone URL
, where URL is replaced by what it reads after “Your clone URL” in the Source section of github.
Step 2: Either use Maven Integration for Eclipse (m2eclipse) or use Maven on the command line. Continue with the corresponding section below.
m2eclipse allows you to have your WERTi Eclipse project configured automatically so that all dependencies (classpaths etc.) are set up automatically. It can be easily installed via its Eclipse update page that can be found on the project page
Before proceeding, make sure you added the LingPipe JAR to the maven repository as described in INSTALLATION.markdown
.
Select File -- Import... -- General/Maven Projects
in Eclipse in order to import the project with maven support. Now m2eclipse should open the Eclipse console and you should be able to watch it downloading all packages required for using WERTi.
Further things you can do with m2eclipse: Right-clicking the project in the Package Explorer reveals the Maven menu which holds an entry Update Project Configuration
. The Run Configuration Dialog (menu Run -- Run Configurations...
provides the ability to configure and execute specific Maven Goals.
Maven can generate all necessary files (including .classpath
, complete with
sources and documentation) with one command:
mvn eclipse:eclipse -DdownloadSources=true -DdownloadJavadocs=true
Unfortunately, this will not give you sources and JDocs for every class, but at
least for some. You might be interested in adding JavaDoc-Entries for the
LingPipe tagger, if you will use it.
Now you should import the project into the Eclipse workspace.
Select File --- Import --- General/Existing Project from Workspace
in order to be able to work with WERTi in your Workspace.
If you have
previously imported it, issue
mvn eclipse:clean
first.
Maven set up Eclipse to search for libraries under a classpath variable named
M2_REPO
. You should add this classpath variable (globally) to Eclipse. On
most UNIX-like systems, this will point to $HOME/.m2/repository
.
WERTi uses Apache UIMA for its Natural Language Processing tool chain as well as for other magic it does. Eclipse can help a great deal to ease development of UIMA components once the corresponding plugins are installed from the Update site named on the UIMA downloads page. These plugins will need EMF (Eclipse Modeling Framework), which they will hopefully install automatically via the dependency system.
Attention: This section is in a draft status.
Eclipse can run and control Tomcat. There is a number of benefits of this feature, such as the possibility to use the Eclipse Debugger in web application development, automatic deployment of the web application. and so on. Basically everything that lets you develop a web application just as any other regular program.
Having added the Ganymede Update Site as instructed in the beginning of this page, the required plugins can be simply obtained from there. In Eclipse, go to the category Uncategorized
and install everything that begins with JST and WST.
TODO: need to be written later
In order to enable debugging in hosted mode, you need to select the project, and edit the
debugging configuration.
Go to Run->Debug Configurations…
Select ‘Java Application’, create a new one, called WERTi. Set the main class to
com.google.gwt.dev.GWTShell
.
Click on the Arguments
tab inside the same dialog. As program arguments, type:
-out target/WERTi/WEB-INF/classes -noserver -port 8080 -logLevel ALL WERTi/index.jsp?content=start
and as VM arguments type
-Xmx512M
Note that you have to substitute your Tomcat’s port number for 8080
in the
program’s arguments.
Next, click on the ‘Classpath’ tab. Click on ‘User Entries’, then on the button
‘Advanced…’. Then, select ‘Add Folders’, and add src/main/java
.
Then all you have to do is click on ‘Apply’ and then ‘Debug’.