Views
This page is about how to develop software on Cheetah. Right now this is specific to running the springapp2 spike (demo).
- Install Eclipse JEE Ganymede http://www.eclipse.org/downloads/
- Install Java 6 for your platform
- Use Eclipse Preferences to configure Eclipse to use Java 6 by default
- Install Maven 2.0.9 or greater
- 2.0.9 is required due to Maven bug MNG-2923 (noted fixed in 2.0.7, but actually fixed in 2.0.9)
- Install plugins via Software Updates:
- Install Maven M2Eclipse Plugin http://m2eclipse.sonatype.org/update/
- Install TestNG Eclipse Plugin http://beust.com/eclipse
- Install Freemarker IDE plugin (via JBoss Tools download site) (optional) http://download.jboss.org/jbosstools/updates/stable
- Install Subclipse plugin http://subclipse.tigris.org/update_1.4.x
- Install the PMD plugin http://pmd.sourceforge.net/eclipse
- Install the FindBugs? plugin http://findbugs.cs.umd.edu/eclipse/
- Install mysql for your platorm
- Do the steps in CheetahConfigureMySql
Once you have the plugins, you should be able to check out and run the current cheetah snapshot.
SVN line endings
- Set the "svn:eol-style" property to "native" on the command line or in Eclipse by doing the following:
- For svn command-line users, place the following data in the Subversion config file: http://www.apache.org/dev/svn-eol-style.txt
- For TortoiseSVN users,
- Right click on any Windows folder
- Select TortoiseSVN->Setting
- Click on the 'Edit' for Subversion configuration file
- paste in the text from http://www.apache.org/dev/svn-eol-style.txt
About the project
- You must do a maven build from the commandline before using WTP
- For convenience, the project is set to build using the Eclipse Java builder, which does not use maven. If you want to update dependencies via maven or just be sure that the project is being built correctly, you must build using maven from the command line: mvn clean install - the Java builder does not completely build the project, but only builds the class files, ftl files, and properties files.
- You can use the maven builder from inside eclipse, but be warned - it's annoying, as it touches many files, causing Eclipse to frequently pop up dialog boxes.
- In the Navigator pane, right click on the project
- Select Builders
- Uncheck the Java builder to disable it.
- Check the Maven2 builder to enable it.
- Now you can right-click on the project, and select the M2 menu for maven goals.
Import the cheetah trunk project from SVN
- Navigator pane
- Right click, select Import
- Type svn in the search box
- Select Checkout projects from SVN
- Click Next
- Create a new repository location: https://mifos.dev.java.net/svn/mifos/cheetah/trunk, click Next
- Select the trunk/ directory, click Finish
Building
- From the command line
- mvn clean install will build the project, placing the war in the target/ directory. This will run the acceptance tests. To run only the unit tests, run 'mvn clean test'. To run only the acceptance tests, run 'mvn integration-test'.
- More about the CheetahMavenBuild.
- More about CheetahAcceptanceTests.
- More about CheetahHudsonContinuousIntegration - our build server builds and tests automcatically, doublechecking the tests developers run on their desktop machines.
Configure PMD
- No configuration should be necessary, as settings are checked into svn.
- However, to see the settings:
- General preferences are set in Window > Preferences > PMD
- Project settings are here: Navigator Pane > right click > Properties > PMD
Configure FindBugs
- No configuration should be necessary, as settings are checked into svn.
- However, to see the settings:
- Project settings are here: Navigator Pane > right click > Properties > Find Bugs
To see the Maven2 console:
- Set Eclipse to build automatically.
- Do Window > Show View > Console, then click the pushpin icon to "pin" the console.
- Click the Console tab
- Click the Window + icon and select Maven console from the drop down menu.
- Click the Monitor triangle icon and select the Maven console.
To see the Tomcat console:
- Click the console tab
- Click the Window + icon and select new console.
- Click the pushpin icon to "pin" the console.
- Click the Window + icon and select Tomcat console from the drop down menu.
- Click the Monitor triangle icon and select the Tomcat console.
| subtopics: |
