# Makumba Eclipse howto

### 1) Download

- Java: you need the Java Development Kit (JDK) 5.0
  http://java.sun.com/j2se/1.5.0/download.jsp
  + install it
- www.eclipse.org
  downloads -> look for the version 3.1 (look link in the right column)
  + unpack the zip file to the root of the hard disk, e.g. c:\eclipse
  Do not put Eclipse in a dir whose name contains spaces!
- If you don't already have it installed, install MySql. (preferably 4.1, to be found at
  http://dev.mysql.com/downloads/mysql/4.1.html, just follow the instructions)
- Create a "makumba" Mysql database, to be used for tests.

### 2) SourceForge access to makumba CVS

- if you don't have a sourceforge account, create one at www.sf.net
- to be added to the makumba project, send e-mail to makumba-comm-build@lists.sourceforge.net and specify your sourceforge username
- to activate your CVS access, use a secure shell (like SSH or putty)

- ssh cvs.sf.net
- you will be automatically logged out, that's normal.

### 3) Checkout Makumba in Eclipse

- it will ask where do you want your workspace: this will contain the makumba sources
- you will get an welcome screen, just close it
- File -> Import -> Check out project from CVS

- Host: cvs.sf.net
- Repository path: /cvsroot/makumba
- username + password from your sourceforge account
- Connection type: extssh
- use default port
- click Next
- User specified module name: makumba
- click Finish

- After the checkout ends, the project will be compiled automatically
- The makumba project will be shown with a red tick, ("errors"). The cause for the errors is that, during first compilation, makumba downloads the JARs needed for the sources to compile. Eclipse does not know about these JARs. To fix that:

- click on the project name 'makumba' and press F5

- if that fails, go to Project/Properties/Java Build Path, and remove and re-add manually each JAR

### 4) Run the makumba tests

- chose Run/Run
- You will see there the makumba tests. Start with mdd, continue with dbtable
- Before running the formatters tests, make sure you run tomcat-mak

- note that accessing formatter tests directly from a browser is not a good idea because they insert data in the db just before they start and then they delete it, so most of them will not have any data to run with

### 5) Hack

- Your code can use MDDs from classes/test. They are already in the classpath, just use test.Person, test.Language, etc.
- If you do just database/MDD code, simply start the automatic tests (mdd, dbtable) in Debug mode (Run/Debug, or click on the bug)
- If you do taglib stuff (list, value, form, input, etc), put your JSP test cases in webapps/tests.
- Start tomcat-mak in debug mode (Run/Debug/tomcat-mak) and you're ready to catch breakpoints
- If you want to hack stuff that will need regression tests, there may be a branch that is better to use for that. For example now there is the Antwerpen branch.

- In Eclipse 3.1 you can switch just some directories to another branch, by pressing right-click on the dir, chose Team/Switch to Another Branch or Version
- The following directories will typically need to switch to the branch:

- classes, but not classes/test (so switch classes to Antwerpen, and then switch test back to HEAD)

- servlet-context (if you change something in makumba.tld)

- The following directories should most of the time stay in the HEAD (main) branch

- launchers
- classes/test
- tomcat
- webapps/tests
- .classpath, .project, build.xml, and all other files in the root
- doc