Wiki

Version 6 (Ahmadi Hadi, May 25, 2011 12:05)

1 6 Ahmadi Hadi
[[Development Environment]]
2 6 Ahmadi Hadi
3 1 Ahmadi Hadi
h1. Development Environment
4 1 Ahmadi Hadi
5 1 Ahmadi Hadi
This page serves as a guide for developers to set up the dev env required for participating in AgroBank RIB project. It's maintained as a wiki so that everyone be able to improve it by contributing his/her experiences throughout the process of configuring and building the project.
6 1 Ahmadi Hadi
7 1 Ahmadi Hadi
h2. Source Code Repository
8 1 Ahmadi Hadi
9 1 Ahmadi Hadi
https://hub.penril.net/hg/agrobank/agro_rib/ (A _Mercurial_ Repository)
10 1 Ahmadi Hadi
11 1 Ahmadi Hadi
h2. Build Tools
12 1 Ahmadi Hadi
13 4 Ahmadi Hadi
The project definition, its dependencies and other build configs are defined in a file in its root folder named *@pom.xml@*. This file is used by "_Apache Maven_":http://maven.apache.org/ to build the project. Apache Maven is de facto Java buid management tools that decouple your project structure from IDEs. On the other hand, it's so popular that all Java IDEs have developed plugins to integrate and interpret Maven projects into their expected structures. Another benefit of build tools like Maven is that the project can be build automatically using Continuous Integration servers, like _Jenkins/Hudson_ in our case.
14 1 Ahmadi Hadi
15 4 Ahmadi Hadi
In order to run @mvn@ (Maven command) outside your Eclipse environment you need to download Maven binaries from "here":http://maven.apache.org/download.html#Maven_2.2.1 and install it following these "instructions":http://maven.apache.org/download.html#Installation .
16 1 Ahmadi Hadi
17 1 Ahmadi Hadi
Make sure you select *Maven 2.2.1* as this is the version used in this project.
18 1 Ahmadi Hadi
19 4 Ahmadi Hadi
h3. Configuring Maven to point to Penril's Maven repo
20 4 Ahmadi Hadi
21 5 Ahmadi Hadi
To speed up downloading of _artifacts_ required by Maven, a cache proxy is configured at http://219.95.244.226:8080/nexus/ . All you need to force Maven to use this mirror is to put *@settings.xml@* file (attached to this wiki) in your *@${user.home}/.m2@* directory (For the default value of @user.home@ for your system refer to this "table":http://en.wikipedia.org/w/index.php?title=Home_directory&oldid=429870583#Default_Home_Directory_per_Operating_System ). 
22 4 Ahmadi Hadi
23 1 Ahmadi Hadi
h2. Eclipse Plugin for Maven2
24 1 Ahmadi Hadi
25 3 Ahmadi Hadi
*_m2eclipse_* is the recommended plugin to import Maven projects into Eclipse workspace. You can find the installation guide on http://m2eclipse.sonatype.org/installing-m2eclipse.html. Make sure you install both:
26 3 Ahmadi Hadi
* _Maven Integration for Eclipse (Required)_ from *m2eclipse Core*
27 3 Ahmadi Hadi
* _Maven Integration for WTP_ from *m2eclipse Extras*
28 3 Ahmadi Hadi