Diese Präsentation wurde erfolgreich gemeldet.
Wir verwenden Ihre LinkedIn Profilangaben und Informationen zu Ihren Aktivitäten, um Anzeigen zu personalisieren und Ihnen relevantere Inhalte anzuzeigen. Sie können Ihre Anzeigeneinstellungen jederzeit ändern.
Build Lifecycle
Craftsmanship
at the Transylvania JUG
by Matthew McCullough
Matthew McCullough
@matthewmccull
➡Gradle ➡Jenkins
➡Sonar
➡Maven 3
➡VisualVM
➡BTrace
➡Gradle
➡Jenkins
➡Sonar
➡Maven 3
➡VisualVM
➡BTrace
Probably
the most important
technical book
of 2010
-Martin Fowler, ThoughtWorks
➡Gradle
➡Jenkins
➡Sonar
➡Maven 3
➡VisualVM
➡BTrace
➡Maven 3
http://maven.apache.org/
➡Why not stay with it?
➡What’s new?
Maven 2.x?
➡Performance
➡Memory footprint
➡Parallelism
Maven 3.x
➡Gradle
➡Jenkins
➡Sonar
➡Maven 3
➡VisualVM
➡BTrace
➡Gradle
http://gradle.org/
➡Groovy DSL
➡Customizable lifecycle
➡Suitable for build masters and users
Better Build Tool
➡Gradle
➡Jenkins
➡Sonar
➡Maven 3
➡VisualVM
➡BTrace
➡Jenkins
http://jenkins-ci.org/
it all started with...
and now the space is crowded...
Software tools for continuous integration include:
■AnthillPro — continuous integration server by Urbancode
■Apache Contin...
NAnt, Maven, and shell scripts
■Software Configuration and Library Manager — software
configuration management system for z/...
➡Humans should do the intelligent work
➡Integrate with source code, metrics
Continuous Integration
473 plugins
➡Gradle
➡Jenkins
➡Sonar
➡Maven 3
➡VisualVM
➡BTrace
➡Sonar
http://sonarsource.org/
➡For managers?
Metrics
★Checkstyle
★PMD
★ Findbugs
★ Cobertura
★ Emma
★ Clirr
★ JaCoCo
★ Useless Code
★ SQALE
★ 20+ others...
#Maven 2 or 3
mvn sonar:sonar
➡Gradle
➡Jenkins
➡Sonar
➡Maven 3
➡VisualVM
➡BTrace
➡BTrace
http://kenai.com/projects/btrace
➡Bytecode, class manipulation
➡Aspect-like adjustment at runtime
Runtime Inspection
import com.sun.btrace.annotations.*;
import static com.sun.btrace.BTraceUtils.*;
import com.sun.btrace.AnyType;
import jav...
import java.util.concurrent.atomic.AtomicInteger;
import java.util.Map;
@BTrace public class TraceAllMethodCalls {
/**
* M...
public static void m(AnyType[] args) {
//System.out.println("Hello");
println(strcat("****** WE'VE ENTERED A METHOD ON CLA...
println(strcat("****** WE'VE ENTERED A METHOD ON CLASS: ",
name(probeClass())));
println(strcat("****** WE'VE ENTERED METH...
* ONEXIT TRACEPOINT. CALLED WHEN A BTRACE METHOD CALLS EXIT(INT).
*/
@OnExit
public static void onexit(int code) {
println...
*/
@OnLowMemory(
pool = "Tenured Gen",
threshold=58720250
)
public static void onLowMem(MemoryUsage mu) {
println("******"...
➡Gradle
➡Jenkins
➡Sonar
➡Maven 3
➡VisualVM
➡BTrace
➡VisualVM
http://visualvm.java.net/
➡Java 1.4 through Java 7 support
➡Included in JDK 6u7 >
Virtual Machine Metrics
Build Lifecycle
Craftsmanship
at the Transylvania JUG
by Matthew McCullough
Build Lifecycle Craftsmanship for the Transylvania JUG
Build Lifecycle Craftsmanship for the Transylvania JUG
Build Lifecycle Craftsmanship for the Transylvania JUG
Build Lifecycle Craftsmanship for the Transylvania JUG
Build Lifecycle Craftsmanship for the Transylvania JUG
Build Lifecycle Craftsmanship for the Transylvania JUG
Build Lifecycle Craftsmanship for the Transylvania JUG
Build Lifecycle Craftsmanship for the Transylvania JUG
Build Lifecycle Craftsmanship for the Transylvania JUG
Build Lifecycle Craftsmanship for the Transylvania JUG
Build Lifecycle Craftsmanship for the Transylvania JUG
Build Lifecycle Craftsmanship for the Transylvania JUG
Build Lifecycle Craftsmanship for the Transylvania JUG
Build Lifecycle Craftsmanship for the Transylvania JUG
Build Lifecycle Craftsmanship for the Transylvania JUG
Build Lifecycle Craftsmanship for the Transylvania JUG
Build Lifecycle Craftsmanship for the Transylvania JUG
Build Lifecycle Craftsmanship for the Transylvania JUG
Build Lifecycle Craftsmanship for the Transylvania JUG
Build Lifecycle Craftsmanship for the Transylvania JUG
Build Lifecycle Craftsmanship for the Transylvania JUG
Build Lifecycle Craftsmanship for the Transylvania JUG
Build Lifecycle Craftsmanship for the Transylvania JUG
Build Lifecycle Craftsmanship for the Transylvania JUG
Build Lifecycle Craftsmanship for the Transylvania JUG
Build Lifecycle Craftsmanship for the Transylvania JUG
Build Lifecycle Craftsmanship for the Transylvania JUG
Nächste SlideShare
Wird geladen in …5
×

Build Lifecycle Craftsmanship for the Transylvania JUG

377 Aufrufe

Veröffentlicht am

Matthew McCullough presenting Build Lifecycle Craftsmanship to the Transylvania Java Users Group in October of 2011.

Resources that correspond to this presentation are include:

Maven:
http://delicious.com/matthew.mccullough/maven
https://github.com/matthewmccullough/opensourcedebuggingjava

Gradle:
http://delicious.com/matthew.mccullough/gradle
https://github.com/gradle/
https://github.com/gradleware/oreilly-gradle-book-examples

Sonar:
http://delicious.com/matthew.mccullough/sonar
http://sonarsource.org

BTrace:
http://kenai.com/projects/btrace

VisualVM:
http://visualvm.java.net/

Overarching examples:
https://github.com/matthewmccullough/opensourcedebuggingjava

Delivered on October 20, 2011

Veröffentlicht in: Technologie
  • Als Erste(r) kommentieren

Build Lifecycle Craftsmanship for the Transylvania JUG

  1. 1. Build Lifecycle Craftsmanship at the Transylvania JUG by Matthew McCullough
  2. 2. Matthew McCullough @matthewmccull
  3. 3. ➡Gradle ➡Jenkins ➡Sonar ➡Maven 3 ➡VisualVM ➡BTrace
  4. 4. ➡Gradle ➡Jenkins ➡Sonar ➡Maven 3 ➡VisualVM ➡BTrace
  5. 5. Probably the most important technical book of 2010 -Martin Fowler, ThoughtWorks
  6. 6. ➡Gradle ➡Jenkins ➡Sonar ➡Maven 3 ➡VisualVM ➡BTrace
  7. 7. ➡Maven 3
  8. 8. http://maven.apache.org/
  9. 9. ➡Why not stay with it? ➡What’s new? Maven 2.x?
  10. 10. ➡Performance ➡Memory footprint ➡Parallelism Maven 3.x
  11. 11. ➡Gradle ➡Jenkins ➡Sonar ➡Maven 3 ➡VisualVM ➡BTrace
  12. 12. ➡Gradle
  13. 13. http://gradle.org/
  14. 14. ➡Groovy DSL ➡Customizable lifecycle ➡Suitable for build masters and users Better Build Tool
  15. 15. ➡Gradle ➡Jenkins ➡Sonar ➡Maven 3 ➡VisualVM ➡BTrace
  16. 16. ➡Jenkins
  17. 17. http://jenkins-ci.org/
  18. 18. it all started with...
  19. 19. and now the space is crowded...
  20. 20. Software tools for continuous integration include: ■AnthillPro — continuous integration server by Urbancode ■Apache Continuum — continuous integration server supporting Apache Maven and Apache Ant. Supports CVS, Subversion, Ant, Maven, and shell scripts ■Apache Gump — continuous integration tool by Apache ■Automated Build Studio — proprietary automated build, continuous integration and release management system by AutomatedQA ■Bamboo — proprietary continuous integration server by Atlassian Software Systems ■BuildBot — Python/Twisted-based continuous build system ■BuildMaster — proprietary application lifecycle management and continuous integration tool by Inedo
  21. 21. NAnt, Maven, and shell scripts ■Software Configuration and Library Manager — software configuration management system for z/OS by IBM Rational Software ■QuickBuild - proprietary continuous integration server with free community edition featuring build life cycle management and pre-commit verification. ■TeamCity — proprietary continuous-integration server by JetBrains with free professional edition ■Team Foundation Server — proprietary continuous integration server and source code repository by Microsoft ■Tinderbox — Mozilla-based product written in Perl ■Rational Team Concert — proprietary software development collaboration platform with built-in build engine by IBM including Rational Build Forge
  22. 22. ➡Humans should do the intelligent work ➡Integrate with source code, metrics Continuous Integration
  23. 23. 473 plugins
  24. 24. ➡Gradle ➡Jenkins ➡Sonar ➡Maven 3 ➡VisualVM ➡BTrace
  25. 25. ➡Sonar
  26. 26. http://sonarsource.org/
  27. 27. ➡For managers? Metrics
  28. 28. ★Checkstyle ★PMD ★ Findbugs ★ Cobertura ★ Emma ★ Clirr ★ JaCoCo ★ Useless Code ★ SQALE ★ 20+ others...
  29. 29. #Maven 2 or 3 mvn sonar:sonar
  30. 30. ➡Gradle ➡Jenkins ➡Sonar ➡Maven 3 ➡VisualVM ➡BTrace
  31. 31. ➡BTrace
  32. 32. http://kenai.com/projects/btrace
  33. 33. ➡Bytecode, class manipulation ➡Aspect-like adjustment at runtime Runtime Inspection
  34. 34. import com.sun.btrace.annotations.*; import static com.sun.btrace.BTraceUtils.*; import com.sun.btrace.AnyType; import java.lang.management.MemoryUsage; import java.util.concurrent.atomic.AtomicInteger; import java.util.Map; @BTrace public class TraceAllMethodCalls { /** * METHOD CALL TRACEPOINT. */ @OnMethod( clazz="com.ambientideas.HelloWorldJava", method="print", location=@Location(value=Kind.CALL, clazz="/.*/", method="/.*/") ) public static void m(AnyType[] args) { //System.out.println("Hello"); println(strcat("****** WE'VE ENTERED A METHOD ON CLASS: ", name(probeClass()))); println(strcat("****** WE'VE ENTERED METHOD: ", probeMethod())); } @OnMethod(
  35. 35. import java.util.concurrent.atomic.AtomicInteger; import java.util.Map; @BTrace public class TraceAllMethodCalls { /** * METHOD CALL TRACEPOINT. */ @OnMethod( clazz="com.ambientideas.HelloWorldJava", method="print", location=@Location(value=Kind.CALL, clazz="/.*/", method="/.*/") ) public static void m(AnyType[] args) { //System.out.println("Hello"); println(strcat("****** WE'VE ENTERED A METHOD ON CLASS: ", name(probeClass()))); println(strcat("****** WE'VE ENTERED METHOD: ", probeMethod())); } @OnMethod( clazz="/.*/", method="println" ) public static void m2(AnyType[] args) { println(strcat("****** WE'VE ENTERED A METHOD ON CLASS: ", name(probeClass()))); println(strcat("****** WE'VE ENTERED METHOD: ", probeMethod())); } /**
  36. 36. public static void m(AnyType[] args) { //System.out.println("Hello"); println(strcat("****** WE'VE ENTERED A METHOD ON CLASS: ", name(probeClass()))); println(strcat("****** WE'VE ENTERED METHOD: ", probeMethod())); } @OnMethod( clazz="/.*/", method="println" ) public static void m2(AnyType[] args) { println(strcat("****** WE'VE ENTERED A METHOD ON CLASS: ", name(probeClass()))); println(strcat("****** WE'VE ENTERED METHOD: ", probeMethod())); } /** * ONEXIT TRACEPOINT. CALLED WHEN A BTRACE METHOD CALLS EXIT(INT). */ @OnExit public static void onexit(int code) { println("****** THE BTRACE PROGRAM IS EXITING."); } /** * LOW MEMORY TRACE POINT. */ @OnLowMemory( pool = "Tenured Gen",
  37. 37. println(strcat("****** WE'VE ENTERED A METHOD ON CLASS: ", name(probeClass()))); println(strcat("****** WE'VE ENTERED METHOD: ", probeMethod())); } /** * ONEXIT TRACEPOINT. CALLED WHEN A BTRACE METHOD CALLS EXIT(INT). */ @OnExit public static void onexit(int code) { println("****** THE BTRACE PROGRAM IS EXITING."); } /** * LOW MEMORY TRACE POINT. */ @OnLowMemory( pool = "Tenured Gen", threshold=58720250 ) public static void onLowMem(MemoryUsage mu) { println("******"); println(mu); } /** * MEMORY HISTOGRAM TRACE POINT. */ private static Map<String, AtomicInteger> histo = newHashMap();
  38. 38. * ONEXIT TRACEPOINT. CALLED WHEN A BTRACE METHOD CALLS EXIT(INT). */ @OnExit public static void onexit(int code) { println("****** THE BTRACE PROGRAM IS EXITING."); } /** * LOW MEMORY TRACE POINT. */ @OnLowMemory( pool = "Tenured Gen", threshold=58720250 ) public static void onLowMem(MemoryUsage mu) { println("******"); println(mu); } /** * MEMORY HISTOGRAM TRACE POINT. */ private static Map<String, AtomicInteger> histo = newHashMap(); @OnTimer(4000) public static void print() { if (size(histo) != 0) { printNumberMap(strcat("******", "Component Histogram"), histo); } } }
  39. 39. */ @OnLowMemory( pool = "Tenured Gen", threshold=58720250 ) public static void onLowMem(MemoryUsage mu) { println("******"); println(mu); } /** * MEMORY HISTOGRAM TRACE POINT. */ private static Map<String, AtomicInteger> histo = newHashMap(); @OnTimer(4000) public static void print() { if (size(histo) != 0) { printNumberMap(strcat("******", "Component Histogram"), histo); } } }
  40. 40. ➡Gradle ➡Jenkins ➡Sonar ➡Maven 3 ➡VisualVM ➡BTrace
  41. 41. ➡VisualVM
  42. 42. http://visualvm.java.net/
  43. 43. ➡Java 1.4 through Java 7 support ➡Included in JDK 6u7 > Virtual Machine Metrics
  44. 44. Build Lifecycle Craftsmanship at the Transylvania JUG by Matthew McCullough

×