Skip to content

Developers getting started

timfarr edited this page Oct 7, 2011 · 2 revisions

Getting started on Madcow

This section contains some awesome tips for getting started on developing the Madcow project.

  • If you don't already have one, create a Github account

  • Make sure you've got an IDE that does Groovy. Most of us use IntelliJ IDEA Community Edition, but Eclipse works as well.

  • Install Git.

  • Install Maven. Download and install instructions

  • Clone the Madcow project from Github - use the URL with Read+Write access. If you're new to Git (or GitHub), there are some good instructions at Github. Eclipse and IntelliJ have Git plugins that work well and make this easy. IntelliJ's Git support is built-in. Eclipse just needs to add EGit.

  • Make sure that the following environment variables are set.

  • JAVA_HOME

  • M2_HOME

  • M2

At the time of authoring, YOU MUST do a "mvn clean" between each build of Madcow. If you don't do a clean between builds, you'll get an error about a missing WebTest class when generating SureFire reports.

  • add/change code as usual. Do commits. Check the build locally.

--

Getting started on the Madcow Test Site

This section contains some things you might want to know if you're planning on developing the Madcow test site.

  • Make sure that you've done pretty much everything in the Getting started on Madcow section (installed maven, sorted out Github, etc)

  • Install Grails. Don't forget to set GRAILS_HOME to point to your installation.

  • There's a couple of things that you need to do before a mvn install will work for you. Here they are:

  • You'll need to bump up the permgen in order to get this swine to build. I'd suggest adding the following environment variable to your .profile - export MAVEN_OPTS='-Xmx512m -XX:MaxPermSize=128m'

  • If you're using IntelliJ on a Mac then you may run into an issue where it can't resolve the dependency for tools.jar. This means that maven is using IntelliJ's internal JDK, not the one that comes bundled with OSX. Create a run configuration to run the goal, go to the runner tab, and make sure that Internal JRE is NOT selected in the JRE field (use 'Use JAVA_HOME' or some explicitly defined JDK).

  • If you're wondering how to start the beast locally Open a terminal window:

    $ cd {projectDirectory}  
    $ mvn initialize  
    $ mvn compile  
    $ mvn -Dmadcow-test-site.config.location=./grails-app/conf/madcow-test-site-dev.properties grails:run-app

Now the site should be running. Browse to http://localhost:8080/madcow-test-site to witness the splendor

Clone this wiki locally