Ant, Maven and Jenkins

4,697 views

Published on

short ov

Published in: Technology
0 Comments
6 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
4,697
On SlideShare
0
From Embeds
0
Number of Embeds
63
Actions
Shares
0
Downloads
61
Comments
0
Likes
6
Embeds 0
No embeds

No notes for slide

Ant, Maven and Jenkins

  1. 1. Ant/Maven, Jenkins 허광남 kenu@okjsp.pe.kr
  2. 2. 토픽• Ant/Maven 빌드 도구의 이해• Jenkins-CI 도구
  3. 3. Maven 빌드 도구
  4. 4. Java Compile 단점• 패키지별로 따로 지정• make 또는 compile.bat• 클래스패스 설정 어려움
  5. 5. ANT• Another Neat Tool http://ant.apache.org• build.xml• project > targets > tasks• properties ${base.dir}
  6. 6. Maven 빌드 도구• Convention over Configuration • ANT의 자유로운 빌드 설정과 차별• Jar 의존성 관리 • 버전 명시, 프로젝트별 중복 jar 관리• 플러그인 관리 • 이클립스, 톰캣, Jetty 등의 연계 플러그인
  7. 7. Quick Start•mvn --version•mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app -DarchetypeArtifactId=maven- archetype-quickstart -DinteractiveMode=false http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html
  8. 8. Quick Start #2 pom.xml <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 my-app http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion>|-- pom.xml`-- src <groupId>com.mycompany.app</groupId> |-- main <artifactId>my-app</artifactId> | `-- java <version>1.0-SNAPSHOT</version> | `-- com <packaging>jar</packaging> | `-- mycompany <name>Maven Quick Start Archetype</name> | `-- app <url>http://maven.apache.org</url> | `-- App.java `-- test <dependencies> `-- java <dependency> `-- com <groupId>junit</groupId> `-- mycompany <artifactId>junit</artifactId> `-- app <version>4.8.2</version> `-- AppTest.java <scope>test</scope> </dependency> </dependencies> </project>
  9. 9. Build Project•mvn package•package is a phase•페이즈는 연속적인 작업들
  10. 10. mvn compile이면1. validate2. generate-sources3. process-sources4. generate-resources5. process-resources6. compile• compile 까지의 페이즈를 순서대로 수행
  11. 11. Maven goal• archetype:generate• archetype: is the plugin• archetype:generate is a goal• plugin은 goal 모음집• 예) eclipse:eclipse, tomcat:run
  12. 12. Maven phases• validate • install• compile • deploy• test• package • clean• integration-test • site• verify
  13. 13. target/• java -cp target/my-app-1.0- SNAPSHOT.jar com.mycompany.app.App• Hello World!
  14. 14. m2eclipse• eclipse plugin• little buggy
  15. 15. Deployment Assembly
  16. 16. Nexushttp://cwgkorea.net/zbxe/cwg_consensus/44551
  17. 17.  
  18. 18. without Intranet InternetDev
  19. 19.  A CentralDev
  20. 20.  B
  21. 21. with Intranet InternetDev
  22. 22.  A Nexus CentralDev
  23. 23.  B
  24. 24. settings.xml• ~/.m2/settings.xml settings mirrors mirror idnexus/id mirrorOf*/mirrorOf urlhttp://192.168.0.8:7070/nexus/content/groups/public/url /mirror /mirrors profiles profile idnexus/id repositories repository idcentral/id urlhttp://central/url releasesenabledtrue/enabled/releases snapshotsenabledtrue/enabled/snapshots /repository /repositories pluginRepositories pluginRepository idcentral/id urlhttp://central/url releasesenabledtrue/enabled/releases snapshotsenabledtrue/enabled/snapshots /pluginRepository /pluginRepositories /profile /profiles activeProfiles activeProfilenexus/activeProfile /activeProfiles /settings
  25. 25. 프로젝트 모니터 젠킨스 이야기 허광남 kenu@okjsp.pe.kr
  26. 26. Topic• 프로젝트 안정적으로• 지속적인 통합 도구• 젠킨스• 활용
  27. 27. http://www.extremeprogramming.org/map/code.htmlContinuous Integration
  28. 28. http://xprogramming.com/book/whatisxp/
  29. 29. Martin Fowler
  30. 30. Jenkins User Conference San Francisco, Oct 2nd 2011 2004
  31. 31.  Summer • I
  32. 32.  broke
  33. 33.  one
  34. 34.  too
  35. 35.  many
  36. 36.  builds • Wouldn’t
  37. 37.  it
  38. 38.  be
  39. 39.  nice
  40. 40.  if
  41. 41.  …⋯? from:
  42. 42.  jenkinsuserconference2011.pptx
  43. 43. Jenkins User Conference San Francisco, Oct 2nd 2011 And
  44. 44.  so
  45. 45.  it
  46. 46.  began • build.sh #!/bin/bash
  47. 47.  -ex exec
  48. 48.  21 cd
  49. 49.  /files/jaxb-ri cvs
  50. 50.  update ant • monitor.sh #!/bin/bash
  51. 51.  -ex build.sh
  52. 52.  
  53. 53.  build.log
  54. 54.  ||
  55. 55.  mail
  56. 56.  …⋯ • Run
  57. 57.  from
  58. 58.  cron from:
  59. 59.  jenkinsuserconference2011.pptx
  60. 60. Jenkins User Conference San Francisco, Oct 2nd 2011 Then
  61. 61.  I
  62. 62.  wrote
  63. 63.  my
  64. 64.  version from:
  65. 65.  jenkinsuserconference2011.pptx
  66. 66. Jenkins User Conference San Francisco, Oct 2nd 2011 Plugin
  67. 67.  Growth 500 470?
  68. 68.   releases 375 total
  69. 69.  plugins new
  70. 70.  plugins 313 250 223 125 94 6 27 from:
  71. 71.  jenkinsuserconference2011.pptx 0 11/15/066/6/0712/26/078/13/083/11/099/30/094/21/10 12/15/107/6/11 2006/116/13/07 1/16/08 8/20/083/18/0910/7/094/28/10 12/1/106/22/11 11/22/067/11/071/30/088/6/082/11/09 9/16/094/14/1011/3/105/25/11 11/29/067/18/072/13/089/10/08 4/15/0911/4/095/26/10 1/12/118/10/11 12/13/067/4/07 1/2/087/16/08 2/18/099/2/093/10/109/29/104/20/11 12/20/06 8/15/073/12/0810/1/084/22/09 12/16/097/7/101/19/118/17/11 12/6/066/27/071/23/08 8/27/083/4/09 9/23/094/7/1010/27/106/15/11 12/27/06 8/1/07 2/20/089/17/084/1/0910/21/09 6/16/10 1/5/117/13/11 1/10/07 8/22/073/19/0810/8/084/29/09 12/2/096/23/10 1/26/118/3/11 1/17/07 8/8/07 2/6/08 9/3/08 3/25/0911/11/096/2/1012/22/10 2011/08 1/3/07 7/25/07 2/27/089/24/084/8/0910/28/09 6/9/1012/29/10 1/24/07 8/29/073/5/08 10/15/085/6/0911/25/097/14/10 2/16/11 1/31/07 9/12/07 4/16/0811/5/085/27/09 1/13/108/11/10 3/16/11 2/14/07 9/19/074/2/0810/22/086/10/09 1/20/108/18/103/2/11 2/21/079/5/07 3/26/0811/12/086/3/0912/23/09 8/4/10 2/2/11 2/7/07 10/10/075/21/0812/31/088/12/09 3/17/1010/6/104/27/11 2/28/079/26/074/23/0812/10/087/1/09 1/6/107/21/10 2/23/11 3/14/0710/3/074/9/0810/29/086/17/09 1/27/108/25/103/23/11 3/21/0710/31/076/11/08 1/14/09 8/19/093/3/109/15/104/13/11 3/7/07 10/17/075/7/0811/26/087/15/092/10/10 9/1/10 3/9/11 3/28/0711/14/076/4/0812/24/08 8/5/092/17/10 9/22/104/6/11 4/11/0711/21/07 7/2/08 1/21/09 8/26/093/24/1011/10/106/1/11 4/18/0711/7/075/28/08 1/7/097/22/092/3/10 9/8/10 3/30/11 4/4/0710/24/07 6/18/08 1/28/09 9/9/09 3/31/1011/17/106/8/11 4/25/0712/12/077/23/082/4/09 10/14/095/5/1011/24/10 7/20/11 5/16/0712/5/076/25/08 2/25/09 11/18/096/30/10 2/9/11 5/2/0711/28/07 7/9/08 5/23/07 1/9/08 7/30/08 5/13/0912/9/09 7/28/10 5/11/11 5/9/07 12/19/07 5/30/07 6/20/07 4/30/0812/17/087/8/09 2/24/1010/13/105/4/11 5/14/0812/3/086/24/09 11/19/08 7/29/09 5/12/1012/8/106/29/11 5/20/0912/30/09 10/20/10 7/27/11 5/19/10 5/18/11
  72. 72. Jenkins User Conference San Francisco, Oct 2nd 2011 2011
  73. 73.  Jan:
  74. 74.  Divorce • Oracle:
  75. 75.  “you
  76. 76.  do
  77. 77.  it
  78. 78.  our
  79. 79.  way
  80. 80.  or
  81. 81.  highway” • Community
  82. 82.  chose
  83. 83.  highway:
  84. 84.  214
  85. 85.  to
  86. 86.  14 –That’s
  87. 87.  when
  88. 88.  we
  89. 89.  became
  90. 90.  Jenkins from:
  91. 91.  jenkinsuserconference2011.pptx
  92. 92. Hudson to Jenkins
  93. 93. Jenkins User Conference San Francisco, Oct 2nd 2011 Different
  94. 94.  stat,
  95. 95.  same
  96. 96.  story Twitter from:
  97. 97.  jenkinsuserconference2011.pptx
  98. 98. OKJSP with Jenkins
  99. 99. Source Code Management
  100. 100. Review
  101. 101. 빌드가 깨지면http://www.youtube.com/watch?v=1EGk2rvZe8A
  102. 102. QA
  103. 103. 감사합니다

×