These are instructions for installation of cTAKES for developers. With these instructions you can set up your development environment with cTAKES code so you can compile the code and change or extend it. If you simply want to be a user of the software, refer to the cTAKES 4.0 User Install Guide.
These install instructions do not supply knowledge of what the cTAKES components do. That is found in the cTAKES 4.0 Component Use Guide and the pages for the individual components.
Subversion is the default VCS used by cTAKES.
There is current issue with the development setup where there are hardcodings to the level the project is supposed to exist relative to
|
cd ${CTAKES_DEV_HOME}
svn checkout https://svn.apache.org/repos/asf/ctakes/trunk
export CTAKES_SRC_HOME=${CTAKES_DEV_HOME}/trunk
cd ${CTAKES_SRC_HOME} |
The standard Maven command for building cTAKES is:
$ mvn clean package -DskipTests=true |
If you would like to build with the same settings as the default Jenkins job (recommended only for committers), use:
$ rm -fr /tmp/ctakes-* $ exports MAVEN_OPTS='-Xms3072m -Xmx4g -Xss128M -XX:+CMSClassUnloadingEnabled -XX:-UseGCOverheadLimit -Dmaven.test.failure.ignore=false' $ mvn --fail-at-end --errors --update-snapshots clean install sonar:sonar -DskipTests=false -Dsonar.scm.provider=svn -Dsonar.host.url=https://builds.apache.org/analysis |
Below are instructions for Eclipse and for IntelliJ
Prerequisites: Java JDK 1.8+
If you already have Eclipse installed, ensure you have Apache Maven or equivalent IDE plugin, Subclipse plugin or Apache Subversion or equivalent IDE plugin.
The location below is the main trunk of cTAKES. See https://svn.apache.org/repos/asf/ctakes/ for branches and tags. |
svn and https://svn.apache.org/repos/asf/ctakes/trunk-Dctakes.umlsuser=YourUmlsUserIdGoesHere "-Dctakes.umlspw=YourUmlsPasswordGoesHere"https://svn.apache.org/repos/asf/ctakes/trunkClick Finish. Eclipse will download all of the cTAKES sub-projects
Due to the way Maven and Eclipse work together you will see two copies of the sub-projects in Eclipse. If you look into your workspace directories there is only one set of underlying files. |
If you don't have Eclipse set to Build Automatically, you'll need perform a build:
Select all projects, right click, and choose Maven->Update Projects. Click Select All, and click OK to start the maven build.
You can view the Progress pane by using the Eclipse menu option Window->Show View->Progress
Performing a maven build includes running jcasgen as needed.
Disclaimer: The specific process may change in any IDE between versions.
1. Start IntelliJ IDEa.
2. In the "Quick Start" menu, select "Import Project".
This will open a "Select File or Directory to Import" dialog.
3. Browse to your local cTakes repository root directory and select the pom.xml file.
4. Click "Ok".
This will open an "Import Project from Maven" dialog.
5. Make sure the "Search for projects recursively" box is selected, just in case any cTakes modules are not in the pom.
6. Make sure that "Create IntelliJ IDEa modules for aggregator projects" is not selected.
If you plan to add new module, 'disable' a present cTakes module or make other changes to the main pom.xml, check the "Import Maven projects automatically" box.
See also: http://www.jetbrains.com/idea/webhelp/maven-importing.html
7. Make sure that "Create module rgoups for multi-module Maven projects" is not selected.
8. Make sure that "Keep source and test folders on reimport is selected.
9. Make sure that "Exclude build directory (%PROJECT_ROOT%/target)" is selected.
10. Make sure that "Use Maven output directories" is selected.
11. Make sure that the "Generated sources folders" option "Detect automatically" is selected.
12. For the "Phase to be used for folders update" the default option "process-resources" should be fine.
13. For the "Automatically download" options, you may select what you like, but be wary that if broken code has been checked in you may need to revert manually.
14. The default "Dependency types" are fine.
15. Click "Environment settings...".
This will open a dialog that can be used to set options about the Maven environment.
16. The default maven environment settings should be fine. If $M2_HOME is not set in your environment you may select a "Maven home directory", but it is better to set $M2_HOME in your environment.
17. Click "Next".
This will inspect the cTakes Maven settings and search for profiles. It should display a dialog with the possible cTakes profiles.
If you plan to run the UIMA CVD or CPE then select the appropriate profile. Neither is necessary
18. Click "Next".
This will open an "Import" dialog with the current version of cTakes displayed.
19. Click "Next".
This will open a dialog allowing you to select a Java SDK version.
20. Click the "+" button in the top left.
This will display a drop-down box with options for an SDK.
21. Select "JDK".
This will open a dialog to select a Java JDK directory.
22. Navigate to a directory with a JDK version 1.8 or later and click "Ok".
This will display a listing of the file paths associated with the selected JDK.
23. Click "Next".
24. Click "Ok/Next"
The project will load. This may take a while.
25. Important: If you are asked about adding any .iml files to svn, click "No".
26. You should now see the full cTakes project structure in IntelliJ.
1. Open the "Maven Projects" Tool Window using the button on the left side of the window.
If you do not see it, Use the main Menu > View > Tool Windows > Maven Projects.
If you would like to permanently add the button to the UI, use Menu > View > Tool Buttons.
See also: http://www.jetbrains.com/idea/webhelp/maven-projects-tool-window.html
2. Select the "Expand" triangle next to "Apache cTAKES" and then its child node "Lifecycle".
This will display standard maven goals.
3. Right-click on "compile".
This will display a selection of available actions.
4. Select "Create 'ctakes [compile]'..."
This will open a dialog with options for the Maven "compile" goal.
5. Make sure "Profiles (...)" is empty.
6. Click "Ok".
7. You should now see a new child of "Apache cTakes" named "Run Configurations", with the child node "ctakes [compile]"
8. Right-click on "ctakes [compile]" and select "Run" from the popup menu.
9. A panel should appear at the bottom of the screen and display the progress of the compilation. This may take a while.
1. Open the "Maven Projects" Tool Window using the button on the left side of the window.
If you do not see it, Use the main Menu > View > Tool Windows > Maven Projects.
If you would like to permanently add the button to the UI, use Menu > View > Tool Buttons.
See also: http://www.jetbrains.com/idea/webhelp/maven-projects-tool-window.html
2. Select the "Expand" triangle next to "Apache cTAKES" and then its child node "Lifecycle".
This will display standard maven goals.
3. Right-click on "compile".
This will display a selection of available actions.
4. Select "Create 'ctakes [compile]'..."
This will open a dialog with options for the Maven "compile" goal.
5. In the "Name" box at the top of the dialog type "cTakes runCVD".
6. In "Profiles (...)", type "runCVD".
7. Click "Ok".
8. You should now see a new child of "Apache cTakes" named "Run Configurations", with the child node "cTakes runCVD"
9. Right-click on "cTakes runCVD" and select "Run" from the popup menu.
10. A panel should appear at the bottom of the screen and display the progress of the compilation. This may take a while.
11. The UIMA CVD should launch when the compilation is complete.
12. All standard output and error from the CVD will be piped to the IntelliJ Window.
ctakes_umlsuser environment variable is defined.On Windows:
> set ctakes_umlsuser=<your user> > set ctakes_umlspw=<your password> > mvn clean test > REM or running oneline command: > mvn -Dctakes_umlsuser=<your user> -Dctakes_umlspw=<your password> clean test |
On Linux:
$ export ctakes_umlsuser=<your user> $ export ctakes_umlspw=<your password> $ mvn clean test $ # or running oneline command: $ mvn -Dctakes_umlsuser=<your user> -Dctakes_umlspw=<your password> clean test |
The release manager will use the apache-release profile defined in the parent pom. For this profile, the UMLS UTests are enforced.