Simple Maven Workspace Setup
GerryGao,
9 March 2009(
created
6 March 2009)
- not tagging
- tags:
- training
Install JDK 6
Need infra's help.//dsti-server2/HiPort/Install Files/jdk-6u10-windows-i586-p.exe
Install Maven
- Copy
//dsti-server2/HiPort/Install Files/apache-maven-2.0.9-bin.zip
to a local folder. - Unzip it into a folder, e.g. D:/bin/apache-maven-2.0.9
- Create environment variable
M2_HOME
with Maven's folder, e.g. D:/bin/apache-maven-2.0.9 - Add
%M2_HOME%/bin
toPATH
environment variable. - Test
mvn -version
in a command line console. Make sure you get
Maven version: 2.0.9 Java version: 1.6.0_10 OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows"
Map Maven Repository
Map//dsti-server2/M2_REPO
as your
M:
driver. (My Computer -> Tools -> Mapping Network Drivers...)
Configure Maven
Copy//dsti-server2/M2_REPO/settings.xml
to your %
M2_HOME%/conf to override the default one.
Open settings.xml and change the <localRepository>D:/dev/m2repo</localRepository> to the Maven2 repository folder you like.
Install Subversion Client
TODO:Check out Helloworld
Use TortoiseSVN to checkouthttp://172.16.5.12/svn/hiportfolio/trunk/Training/src/helloworld1
Fully Build
Within localhelloworld1
folder, execute
mvn clean install
. You should get a
BUILD SUCCESSFULLY
.
Setup Eclipse
- Within local
helloworld1
folder, executemvn eclipse:eclipse
. You should get aBUILD SUCCESSFULLY
. - Open Eclipse and use a proper folder as the workspace as you like.
- Add JDK 1.6.0 as the default JRE for this workspace.
- Add Classpath Variable M2_REPO pointing to your local Maven repository folder.
- Import the projects from
helloworld1
folder.
Do your development work now!!!
Oracle Server
Hostname: dsti-server2/172.16.4.39port: 1521
SID: XE
User: hiport_dev
Password: oracle