02. egovFrame Development Environment workshop II en(nexus&ci)

21
Page l 1 eGovFrame Lab Workbook Development Environment (Nexus / CI) eGovFrame Center 2012

description

eGovFrame - Framework for e-government Development Environment - Practice Nexus/ CI

Transcript of 02. egovFrame Development Environment workshop II en(nexus&ci)

Page 1: 02. egovFrame Development Environment workshop II en(nexus&ci)

1Page l 1

eGovFrame Lab WorkbookDevelopment Environment

(Nexus / CI)

eGovFrame Center

2012

Page 2: 02. egovFrame Development Environment workshop II en(nexus&ci)

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

Page 3: 02. egovFrame Development Environment workshop II en(nexus&ci)

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

Page 4: 02. egovFrame Development Environment workshop II en(nexus&ci)

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

Page 5: 02. egovFrame Development Environment workshop II en(nexus&ci)

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

Page 6: 02. egovFrame Development Environment workshop II en(nexus&ci)

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

Page 7: 02. egovFrame Development Environment workshop II en(nexus&ci)

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

Page 8: 02. egovFrame Development Environment workshop II en(nexus&ci)

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

Page 9: 02. egovFrame Development Environment workshop II en(nexus&ci)

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

Page 10: 02. egovFrame Development Environment workshop II en(nexus&ci)

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

Page 11: 02. egovFrame Development Environment workshop II en(nexus&ci)

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

Page 12: 02. egovFrame Development Environment workshop II en(nexus&ci)

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

Page 13: 02. egovFrame Development Environment workshop II en(nexus&ci)

13Page l 13

5. Complete a project sharing(3/3) Continuous Integration

Complete sharing and check the project in SVN repositories perspective

Page 15: 02. egovFrame Development Environment workshop II en(nexus&ci)

15Page l 15

7. Configure Hudson(1/2) Continuous Integration

Select Hudson menu

- Manage Hudson Configure System

- Configure J DK, ANT, MAVEN home directory

Page 16: 02. egovFrame Development Environment workshop II en(nexus&ci)

16Page l 16

8. Configure Hudson(2/2) Continuous Integration

Configure JDK, ANT, MAVEN home directory as below

Page 17: 02. egovFrame Development Environment workshop II en(nexus&ci)

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

Page 18: 02. egovFrame Development Environment workshop II en(nexus&ci)

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

Page 19: 02. egovFrame Development Environment workshop II en(nexus&ci)

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

Page 20: 02. egovFrame Development Environment workshop II en(nexus&ci)

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

Page 21: 02. egovFrame Development Environment workshop II en(nexus&ci)

21Page l 21

The End