Version 3, last updated by Kamil Ježek at November 26, 2010 18:36 UTC

Software

  • Java 1.6
  • Maven (http://maven.apache.org/)
    • on Ubuntu, you may install it from package, write in console:
      
      sudo apt-get install maven2
      
  • SVN client
    • on Ubuntu, you may install it from package, write in console:
      
      sudo apt-get install subversion
      
  • IDE (use one which you prefer, however Eclipse is recommend)

Source codes

  • checkout the project from repository
    
    svn co http://svn.assembla.com/svn/cosi/efps/
    

Maven build

  • First of all, get familiar with maven.
  • Maven use internal and external repositories of third-party libraries. The internal repository is on your computer. The external we have set up on assembla.

To have an access to our external repository you must:

  1. Be a member of a ‘repository’ project. So, register yourself on:
    https://www.assembla.com/spaces/efps-maven-repo/team
  2. Set-up your maven to access this repository.
    1. Locate a settings.xml file on your disk. Its location depends on OS, but it is usually somewhere near to your Maven installation. Ubuntu stores it in:
      
      /etc/maven2/settings.xml
      
    2. Find tags
      <servers></servers>
      and put following inside changing your name and password
      
          <server>
            <id>efps.maven.repository</id>
            <username>your assembla name</username>
            <password>your assembla password</password>
          </server>
      
          <server>
            <id>efps.maven.snapshots.repository</id>
            <username>your assembla name</username>
            <password>your assembla password</password>
          </server>    
          
          <server>
            <id>efps.maven.third-parties.repository</id>
            <username>your assembla name</username>
            <password>your assembla password</password>
          </server>    
      
      
  • Its all, now you can build the projects.
  • Each project has its own build pom.xml file.
  • For a first run, compile all projects.
    • Go to the directory efpParent/trunk (you should see a pom.xml file there)
    • write in the console
      
      mvn install
      
  • Later, you may compile only particular project typing the same command in each project directory.
  • Time-to-time, you need to compile projects skipping tests. You will do it typing
    
    mvn install -Dmaven.skip.test
    

The most important mvn commands you will later need:

  • mvn install – compiles a project and installs int to you local repository
  • mvn compile – only compiles
  • mvn package – compiles and creates a jar file
  • mvn deploy – compiles, installs and deploys the jar to our remote repository
  • mvn tomcat:run – runs application as a tomcat web application (for EFP Registry Server only)