Version 3, last updated by Kamil Ježek at November 26, 2010 18:36 UTC
Set up environment
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
- on Ubuntu, you may install it from package, write in console:
- SVN client
- on Ubuntu, you may install it from package, write in console:
sudo apt-get install subversion
- on Ubuntu, you may install it from package, write in console:
- 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:
- Be a member of a ‘repository’ project. So, register yourself on:
https://www.assembla.com/spaces/efps-maven-repo/team - Set-up your maven to access this repository.
- 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 - Find tags
and put following inside changing your name and password<servers></servers><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>
- 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:
- 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)