02. egovFrame Development Environment workshop II en(nexus&ci)
1. eGovFrame Lab Workbook
Development Environment
(Nexus / CI)
eGovFrame Center
2012
Page l 1 1
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
Page l 2 2
3. 1. Setup Nexus work directory Nexus
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
Page l 3 3
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
Page l 4 4
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
2
1
Page l 5 5
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
Page l 6 6
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
Page l 7 7
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
Page l 8 8
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
Page l
10
10
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 3
1
2
Page l
11
11
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
3 4
1
2
Page l
12
12
13. 5. Complete a project sharing(3/3) Continuous Integration
Complete sharing and check the project in SVN repositories perspective
Page l
13
13
14. 6. Run Hudson Continuous Integration
Start Hudson application as launching tomcat server (start.bat)
- Hudson URL : http://127.0.0.1:9080/hudson
Page l
14
14
15. 7. Configure Hudson(1/2) Continuous Integration
Select Hudson menu
- Manage Hudson Configure System
- Configure J DK, ANT, MAVEN home directory
Page l
15
15
16. 8. Configure Hudson(2/2) Continuous Integration
Configure JDK, ANT, MAVEN home directory as below
Page l
16
16
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
Page l
17
17
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
Page l
18
18
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
Page l
19
19
20. 12. Build the created job Continuous Integration
Select “Build Now” menu
- Check the SVN access and downloading “egov.sample” project to build
1
3
2 Click the progress bar to
see the console view
Page l
20
20