Getting started with development

  1. You need Java 1.5 or later.
  2. You need Maven 2. (2.0.7 or later is recommended.)
  3. You'll need to download both the "promotego" project and the "geocoder" project from the promotego SVN repository at SourceForge.net. Just check each one out as its own project in Eclipse (or your favorite IDE). You'll get promotego from https://promotego.svn.sourceforge.net/svnroot/promotego/promotego/trunk, and the geocoder module can be found at https://promotego.svn.sourceforge.net/svnroot/promotego/geocoder/trunk.
  4. Do a 'mvn install' in the geocoder project directory.
  5. Download jta 1.0.1B from sun at: http://java.sun.com/products/jta/
  6. Install the zip file like this:
        mvn install:install-file \
          -Dfile=./jta-1_0_1B-classes.zip \
          -DgroupId=javax.transaction \
          -DartifactId=jta -Dversion=1.0.1B \
          -Dpackaging=jar
  7. Download Apache Derby from: http://db.apache.org/derby/
  8. Set DERBY_HOME to the directory where you unpacked derby. Then, create a directory to hold your database files, cd into that directory, and run: java -jar $DERBY_HOME/lib/derbyrun.jar server start
  9. Go to Java -> Build Path -> Classpath Variables in your Eclipse preferences and make sure you have a variable "M2_REPO" that points to your maven "repository" directory. On Unix environments, you can find this in your home directory under .m2/repository.
  10. Run 'mvn -DdownloadSources=true eclipse:eclipse' in your promotego directory. After this completes, right-click on the promotego project in Eclipse and select "refresh". Eclipse should now have dependent jars attached, as well as sources that are available, and it knows your source directories too.
  11. Create a local.properties file in src/main/resources. It can be empty, but at this point it must exist. This file will contain all your local settings. Right now you'll only need settings in there if you need to set up your local SMTP settings for sending notification emails and validation emails:
        smtp.host=your.smtp.host
        # Port is usually 25 for regular SMTP or 587 for auth SMTP
        smtp.port=587
        # smtp for non-ssl, or smtps for ssl
        smtp.protocol=smtp
        # Use 'starttls' instead of using ssl from initial connection
        smtp.starttls=false
        # Use authentication
        smtp.auth=true
        smtp.user=yoursmtpaccount
        smtp.password=yourpass
  12. Run 'mvn jetty:run" in your promotego directory. Once the startup completes, you're running the site on your local box. Just go to localhost:8080/promotego/login.do to get started!