02. egovframe development environment workshop ii en(nexus&ci)
DESCRIPTION
eGovFrame - Framework for e-government Development Environment - Practice Nexus/ CITRANSCRIPT
1Page l 1
eGovFrame Lab WorkbookDevelopment Environment
(Nexus / CI)
eGovFrame Center
2012
2Page l 2
Development Environment
1. Nexus Setup
Nexus configuration
Apply Nexus to the project
Add 3rd party libraries to Nexus
2. CI Setup
SVN installation
Share project
Configure Hudson
3Page l 3
Deploy Nexus web application into Tomcat server and edit Nexus properties file
- /egovci/bin/tomcat6/webapps/nexus/WEB-INF/plexus.properties
Work directory : /egovci/home/nexus
1. Setup Nexus work directory Nexus
4Page l 4
2. Add necessary libraries into Nexus storage Nexus
Check Nexus storage location : /egovci/home/nexus/storage
- The storage has got a central repository list that registered at the Nexus, each
storage manages maven libraries that downloaded from each storage’s URL
Add all libraries at once into Nexus storage
- Target storage : /egovci/home/nexus/storage/releases
- Add necessary libraries at once, using FTP or file copy
5Page l 5
3. Run Nexus and check the added libraries Nexus
Double click “start.bat” file to run a tomcat server and check the Nexus execution
- http://127.0.0.1:9080/nexus
Select “repositories” from the left menu on the Nexus page and check the storages
and libraries
- The parent storage is “Public Repositories” and can check all libraries in this
storage including sub-storages’ libraries
- Added maven libraries are located in the “release” storage
1
2
6Page l 6
4. Apply Nexus to the project Nexus
Open pom.xml file in the project and change the repositories as below
- Replace central repository with Nexus
7Page l 7
5. Add 3rd party library Nexus
Add 3rd party library to the Nexus storage
- Login to the Nexus with default account : admin/admin123
Select “3rd party” storage on the list
- Select “Artifact Upload” menu GAV Definition GAV Parameters
: input “Group”, “Artifact”, “Version” information (the value can be randomly assigned)
- Click “Select Artifact(s) to Upload” button and select a library which want to add
- Click “Add Artifact” button to complete upload and finish with “Upload Artifact(s)
button click
8Page l 8
Development Environment
1. Nexus Setup
Nexus configuration
Apply Nexus to the project
Add 3rd party libraries to Nexus
2. CI Setup
Install subversion
Share project
Configure Hudson
9Page l 9
1. Install subversion Continuous Integration
Install Visual SVN-server-2.5.5.msi file
- Follow default VisualSVN setting and complete installation
1
2
3
10Page l 10
2. Create SVN repositories and users Continuous Integration
Create a repository and a user account for the practice
- Repository name : egovciworkshop
- User name/password : com/com01
11Page l 11
3. Share a project to SVN server(1/3) Continuous Integration
Change eclipse perspective
- Activate “SVN Repository Exploring perspective”
Create new repository
- Copy SVN URL from VisualSVN Server
- Mouse right click and create a repository
1
2
3
12Page l 12
4. Share a project to SVN server(2/3) Continuous Integration
Change eclipse perspective
- Activate “eGovFrame perspective”
Share “egov.sample” project to SVN server
- Click mouse right button on the project and select menu : “Team” “Share Project..”
- Select “SVN” “Use existing repositry location” Change URL
1
2
3 4
13Page l 13
5. Complete a project sharing(3/3) Continuous Integration
Complete sharing and check the project in SVN repositories perspective
14Page l 14
6. Run Hudson Continuous Integration
Start Hudson application as launching tomcat server (start.bat)
- Hudson URL : http://127.0.0.1:9080/hudson
15Page l 15
7. Configure Hudson(1/2) Continuous Integration
Select Hudson menu
- Manage Hudson Configure System
- Configure J DK, ANT, MAVEN home directory
16Page l 16
8. Configure Hudson(2/2) Continuous Integration
Configure JDK, ANT, MAVEN home directory as below
17Page l 17
9. Create new job Continuous Integration
Select “New Job” from the left side menu
- Job name – sample.build
- Build type – select Build Maven 2/3 project
- Configure the “sample.build” job
18Page l 18
10. Configure the created job(1/2) Continuous Integration
Input SVN location information
- SVN repository URL : https://127.0.0.1/svn/egovciworkshop/trunk/egov.sample
SVN access authentication
- User name/password : com/com01
19Page l 19
11. Configure the created job(2/2) Continuous Integration
Configure build triggers and maven goal
- Schedule based build : 0 23 * * * (starting build at 11 o'clock every night)
- Maven goal : clean install
Save the job configuration
20Page l 20
12. Build the created job Continuous Integration
Select “Build Now” menu
- Check the SVN access and downloading “egov.sample” project to build
1
2
3
Click the progress bar to
see the console view
21Page l 21
The End