= Building uimaFIT from source = == Eclipse & Plugins == It is not necessary to build uimaFIT with the following tools as you can do everything from the command line with subversion and maven clients. However, we use Eclipse along with two plugins, subclipse and m2eclipse, and we encourage you to do the same. Here are the tools that we use: * [http://eclipse.org/ Eclipse] 3.5 or higher. You can download "Eclipse IDE for Java Developers" * [http://subclipse.tigris.org/ Subclipse] 1.6.x * update site: http://subclipse.tigris.org/update_1.6.x * [http://m2eclipse.sonatype.org/ m2eclipse] 0.10.0 or higher. * update site: http://m2eclipse.sonatype.org/sites/m2e * Maven SCM handler for Subclipse. This helps m2eclipse integrate with Subclipse and will be necessary for correctly checking out uimaFIT from the subversion repository. * update site: http://m2eclipse.sonatype.org/sites/m2e-extras == Checking out == * Open the SVN Repositories perspective in Eclipse (Menu -> Window -> Show View -> Other... -> SVN -> SVN Repositories) * Add a SVN repository with the URL http://uimafit.googlecode.com/svn * Expand the uimaFIT repository node in the SVN Repositories view * Right-click on *trunk* and select *Check out as Maven project* and select *Finish*. Eclipse will set up three projects: uimafit-parent, uimafit and uimafit-examples. Notice that the latter two are physically nested within the former in the directory structure. However, Eclipse displays them as projects at the same node level as uimafit-parent in the "Package Explorer" view. == Compiling for the first time == When you check out uimaFIT, Eclipse will automatically try to build the three projects. You will see errors in the uimaFIT project because code that is generated by UIMA's JCasGen tool is missing. (Note that uimaFIT does not provide a type system except for a toy example type system used only by the test code - which is where the errors occur.) To generate the necessary type system java files do the following: * Right-click on the *uimafit* project and select *Run as -> Maven install*. If compile errors still persist, then perform a clean compile on the project containing errors. = Misc. = == Subversion Properties == All java files added to the repository should have the subversion property "svn:eol-style" set to the value "native". This can be accomplished from the commandline with the following: {{{ svn propset svn:eol-style native MyUimaFitClass.java }}} Similarly, there are several file extensions for which the mime type should be set. For example, files with the extension *.txt should be of type text/plain and *.html should be of type text/html. See below for the other assignments. This is important so that the generated API docs render correctly in a browser. Setting these properties is very easy to forget, so you are encouraged to update your subversion config file to include the following lines: {{{ enable-auto-props = yes [auto-props] *.txt = svn:mime-type=text/plain *.html = svn:mime-type=text/html *.css = svn:mime-type=text/css *.png = svn:mime-type=image/png *.jpg = svn:mime-type=image/jpeg *.java = svn:eol-style=native }}} == Formatting Conventons == All `*.java` files should conform to the project's Java formatting conventions. This can be done by simply executing "Menu -> Source -> Format" in Eclipse. You are encouraged to auto-format when you save a file. This can be done by opening the Eclipse Properties for the uimaFIT project and selecting "Java Editor -> Save Actions" and enabling project specific settings and turning on the radio button labeled "Format all lines" under "Format source code". For additional discussing about our formatting conventions, please see issue #28.