the stairway to maven the stairway to maven
play

The Stairway to Maven The Stairway to Maven The JAKARTA Project - PowerPoint PPT Presentation

The Stairway to Maven The Stairway to Maven The JAKARTA Project Build The JAKARTA Project Build And Comprehension Tool And Comprehension Tool DI Siegfried GSCHL siegfried.goeschl@it20one.at 26.06.2002 The Problem How do you build and


  1. The Stairway to Maven The Stairway to Maven The JAKARTA Project Build The JAKARTA Project Build And Comprehension Tool And Comprehension Tool DI Siegfried GÖSCHL siegfried.goeschl@it20one.at 26.06.2002

  2. The Problem How do you build and maintain complex software projects written in Java?! � The Chinese Approach ... – You can always find a student or two for the build � Make or better not to Make – that‘s the question ... – Ever tried to run a UNIX makefile on Windows?! � All ANTs are equal and some are even more equal ... – Tired of copy/pasting ANT scripts?! – Need something like ANT with more bells ans whistles?! 2 Stairway To Maven 2

  3. The Maven Message The intent of Maven is to make intra- - The intent of Maven is to make intra project development highly manageable in project development highly manageable in the hopes of providing more time for the hopes of providing more time for cross- -project development. You might call project development. You might call cross it cross- -project pollination or the sharing project pollination or the sharing it cross of project development knowledge, this is of project development knowledge, this is what Maven attempts to encourage. what Maven attempts to encourage. Jason van Zyl Jason van Zyl 3 Stairway To Maven 3

  4. Maven For Rookies Maven was initially The POM defines how to � � developed for buiding build a project and the Turbine external dependencies Maven matured into an The Maven functionality is � � open source software implemented in terms of engineering platform plugins The core functionality is The plugins are written in � � automated project Jelly building, distribution and JARs are downloaded � website creation from a remote repository A project is described with and stored into a local � a XML Project Object repository Model (POM) 4 Stairway To Maven 4

  5. Stairway To Maven 5 What is in the Maven Box?! 5

  6. Under The Hood Project Object Model (POM) Project Object Model (POM) � Verbose project description � Company information � List of developer and their roles � Mailing list support � CVS server access � Source code and unit test code path � JAR dependencies � Versioning � How to download 6 Stairway To Maven 6

  7. The Core Plugins Build Plugins Build Plugins � The distribution plugin allows building a binary or a source distribution from the command line ANT build file can be generated and distributed to � An ANT ANT users to build the distribution allow ANT � Other plugins allows – Creating a WAR file – Creating a JAR file – Deploying the distribution automatically No more thrills building your project! 7 Stairway To Maven 7

  8. The Core Plugins Site Plugin Site Plugin � Site creation based on Project Object Model � Site generation uses XDOC – Maven generated XDOC – Manually written documentation � DVSL transforms XDOC into HTML � Site layout is defined through xdoc/navigation.xml xdoc/navigation.xml � Site appearance is customizable through properties defined in project.properties project.properties 8 Stairway To Maven 8

  9. Stairway To Maven Site Plugin Site Plugin 9 The Core Plugins 9

  10. Stairway To Maven Site Plugin Site Plugin 10 The Core Plugins 10

  11. The Core Plugins CheckStyle Plugin CheckStyle Plugin � Various coding styles can be defined – Sun coding convention – Turbine coding convention – Roll your own coding convention (if you really have to) � Rules are customizable through project.properties project.properties – Maximum line length of 100 instead of 80 characters – Patterns for constants and variables – Setting a differnt tab width Just in case you have a coding convention ... 11 Stairway To Maven 11

  12. The Core Plugins CheckStyle Plugin CheckStyle Plugin 12 Stairway To Maven 12

  13. The Core Plugins Activity Plugin Activity Plugin � Plugin accesses CVS directly to extract development activity information � Extracts information about – Changes and commits – Number of commits per developer – Number of changes for a file � Ongoing work to support VSS and ClearCase No more digging through CVS changelog 13 Stairway To Maven 13

  14. The Core Plugins Activity Plugin Activity Plugin 14 Stairway To Maven 14

  15. The Core Plugins Test Plugin Test Plugin � Runs JUNIT test case XDOC report � The plugin creates a XDOC XDOC report is then transformed to HTML � The XDOC JUNIT test report is then integrated within the � The JUNIT generated project site I hope you have some tests?! 15 Stairway To Maven 15

  16. Stairway To Maven Test Plugin Test Plugin 16 The Core Plugins 16

  17. The Core Plugins JDepend Plugin JDepend Plugin JDepend from ClarkWare � Is using JDepend � Reports package dependencies � Finds cyclic dependencies � Generates a HTML report to be included into project website 17 Stairway To Maven 17

  18. The Core Plugins JDepend Plugin JDepend Plugin 18 Stairway To Maven 18

  19. The Core Plugins Java Cross Reference Plugin Java Cross Reference Plugin � Transforms source files into HTML files � Provides syntax coloring and hypertext linking � Allows linking between reports and actual source code as done with – CheckStyle plugin – PMD plugin 19 Stairway To Maven 19

  20. The Core Plugins Java Cross Reference Plugin Java Cross Reference Plugin 20 Stairway To Maven 20

  21. The Core Plugins JavaDoc Plugin JavaDoc Plugin 21 Stairway To Maven 21

  22. Stairway To Maven 22 No More Slides ... 22

  23. Custom Plugins Maven is a plugin � Everything in Maven � Feel free to roll and contribute your own plugins � Deployment of plugins as JAR files being dropped into the maven plugin directory � There are many plugins available – CLOVER CLOVER Code Coverage Analyzer – – PMD PMD Static Source Code Analyzer – – JavaNCSS JavaNCSS Java Source Code Metric Analyzer – – Word2HTML Word2HTML – – ... ... – 23 Stairway To Maven 23

  24. Custom Plugins Clover Test Coverage Plugin Clover Test Coverage Plugin � Commercial software from The Cortex The Cortex JUNIT test case code � Instruments the JUNIT � Generates a HTML test coverage report – Conditional Coverage – Statement Coverage – Method Coverage � Integrated into generated project site through Maven Another good reason for unit tests !! 24 Stairway To Maven 24

  25. Custom Plugins Clover Test Coverage Plugin Clover Test Coverage Plugin 25 Stairway To Maven 25

  26. Custom Plugins Clover Test Coverage Plugin Clover Test Coverage Plugin 26 Stairway To Maven 26

  27. Custom Plugins PMD Plugin PMD Plugin � PMD PMD is a static source code analyzer � � PMD PMD is rule driven � – Basic rules – Import rules – Unused code rules – Naming rules – Design rules � The plugin creates an HTML report with linking to the Source Cross Reference 27 Stairway To Maven 27

  28. Stairway To Maven PMD Plugin PMD Plugin 28 Custom Plugins 28

  29. Custom Plugins JavaNCSS Plugin JavaNCSS Plugin � JavaNCSS JavaNCSS is a source code metric analyzer � � Determines simple metrics – Number of packages – Number of classes – Number of functions – Number of non-commented lines of code – Number of JavaDoc lines � Generates an XML report which is transformed to HTML using a XSL stylesheet 29 Stairway To Maven 29

  30. Custom Plugins JavaNCSS Plugin JavaNCSS Plugin 30 Stairway To Maven 30

  31. The Future � Support of other version control systems for generating the activity report – Microsoft‘s Visual Source Safe – Rational‘s ClearCase – Perforce mavenizing � POM Inheritance Mechanism to simplify mavenizing multiple projects � Quilt Quilt intergration as Open Source alternative to � Clover Clover � There is a Source Forge Maven Plugin-in project 31 Stairway To Maven 31

  32. Conclusion � Maven Maven is an Open Source project build and � JAKARTA comprehension tool developed by the JAKARTA community � Maven Maven is an integration platform for software � engineering tools using a plug-in mechanism � Maven Maven provides a remote and local JAR repository to � simplify upgrading of JARs � Maven Maven could be the answer to a lot of your software � engineering problems � And last but not least 32 Stairway To Maven 32

  33. Stairway To Maven Any quest ions !? 33 The End 33

  34. Related Links Maven Maven http://jakarta.apache.org/turbine/maven/ JavaNCSS http://www.kclee.com/clemens/java/javancss/ JavaNCSS PMD http://pmd.sourceforge.net/ PMD Turbine http://jakarta.apache.org/turbine/index.html Turbine Clover Clover http://www.thecortex.net/clover/ JDepend JDepend http://www.clarkware.com/software/JDepend.html Jelly http://jakarta.apache.org/commons/sandbox/jelly/ Jelly Maven Plug- -ins ins http://maven-plugins.sourceforge.net/ Maven Plug ANT http://jakarta.apache.org/ant/index.html ANT QUILT QUILT http://quilt.sourceforge.net/ DVSL DVSL http://jakarta.apache.org/velocity/dvsl/index.html 34 Stairway To Maven 34

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend