SlideShare a Scribd company logo
1 of 12
© Computas AS 09.09.2010 Enhance your Maven plugins with Groovy (experiences with Groovyfication) Harald Søvik hso @ computas.com
Speakers Harald Søvik Java Tech Lead, M.Sc. hso@computas.com 2 © Computas AS 09.09.2010 bpmwork support systems knowledgemanagement consultancy services custom software solutions 180 employees w/ M.Sc. or Ph.D. 100% owned by employees
3 © Computas AS 09.09.2010 Groovy OO dynamic run onjvm Java-like Java-interoperable scripting / web / jms ++
4 © Computas AS 09.09.2010 Pro forma I’m not a Groovyexpert ! I’mfocusingon Java <> Groovy not neccessarilythevery best wayofsolving it alltogether ! Using pure Java 	 librarieswould make a different story
5 © Computas AS 09.09.2010 Goal Investigate home-brew enterprise Maven plugins Would Groovyfication™ affect .. Simplicity?  Maintainability?  Testability?
6 © Computas AS 09.09.2010 Recipe for your Maven project add build step with gmaven-plugin add dependency to gmaven-mojo src/java vssrc/groovy .java vs.groovy compile and enjoy !
7 © Computas AS 09.09.2010 Example 0: archetype:generate Purpose Write text to file Code generated from archetype:generate type 12 A Maven Java plugin development project Differences Exception handling Controlling flow of execution
8 © Computas AS 09.09.2010 Example 1: plugin:goal ”help” Purpose Write text to console Differences Multi line output
9 © Computas AS 09.09.2010 Example 2: Enterprise pluginlogic Purpose Execute external program Determine exit value Differences Exception handling Controlling flow of execution
10 © Computas AS 09.09.2010 Example 4: Enterprise pluginlogic Purpose Checkif URL has content (~ ping) Differences Exception handling Controlling flow of execution (“debug comments”) Readability
11 © Computas AS 09.09.2010 Example 5: DTO Purpose Internal ”entity” class Differences Constructor Constructorcall, readability Accessormethods
12 © Computas AS 09.09.2010 Example 6: Testability Purpose Test a method converting a String with windows style path to posix-style path Differences ”Groovy set of mind” Highlight low cohesion Refactoring opportunities

More Related Content

Viewers also liked

Webサーバ構築で心がけるべき二つのこと
Webサーバ構築で心がけるべき二つのことWebサーバ構築で心がけるべき二つのこと
Webサーバ構築で心がけるべき二つのことTrinityT _
 
Apostolate Of Married People
Apostolate Of Married PeopleApostolate Of Married People
Apostolate Of Married PeopleJohn Gonzalez
 
Passionist JPIC booklet (english)
Passionist JPIC booklet (english)Passionist JPIC booklet (english)
Passionist JPIC booklet (english)John Gonzalez
 
Persia
PersiaPersia
Persiaham97
 
Analisi delle reti peer to peer: Sanremo 2011
Analisi delle reti peer to peer: Sanremo 2011Analisi delle reti peer to peer: Sanremo 2011
Analisi delle reti peer to peer: Sanremo 2011Reputation Manager
 
Impact of the new deal.pptb
Impact of the new deal.pptbImpact of the new deal.pptb
Impact of the new deal.pptbham97
 
The cold war heats up
The cold war heats upThe cold war heats up
The cold war heats upham97
 
Women in public life
Women in public lifeWomen in public life
Women in public lifeham97
 
2007 ogt
2007 ogt2007 ogt
2007 ogtham97
 
Italia Oggi-Lo Compro o no? Decide il blog
Italia Oggi-Lo Compro o no? Decide il blogItalia Oggi-Lo Compro o no? Decide il blog
Italia Oggi-Lo Compro o no? Decide il blogReputation Manager
 
Reddito di Base Incondizionato - Presentazione Ufficiale
Reddito di Base Incondizionato - Presentazione UfficialeReddito di Base Incondizionato - Presentazione Ufficiale
Reddito di Base Incondizionato - Presentazione Ufficialetradottiinitaliano
 
The franks
The franksThe franks
The franksham97
 
Operations Foundation Business Brief 2
Operations Foundation Business Brief 2Operations Foundation Business Brief 2
Operations Foundation Business Brief 2wdjohnson1
 
The columbian exchange
The columbian exchangeThe columbian exchange
The columbian exchangeham97
 

Viewers also liked (20)

La cruz del cambio
La cruz del cambioLa cruz del cambio
La cruz del cambio
 
Let's head to the square
Let's head to the squareLet's head to the square
Let's head to the square
 
Kinect
KinectKinect
Kinect
 
DAE Introduction Presentation
DAE Introduction PresentationDAE Introduction Presentation
DAE Introduction Presentation
 
Webサーバ構築で心がけるべき二つのこと
Webサーバ構築で心がけるべき二つのことWebサーバ構築で心がけるべき二つのこと
Webサーバ構築で心がけるべき二つのこと
 
Portfolio Pablo Calderon
Portfolio Pablo CalderonPortfolio Pablo Calderon
Portfolio Pablo Calderon
 
Giovani, lavoro e Web
Giovani, lavoro e WebGiovani, lavoro e Web
Giovani, lavoro e Web
 
Apostolate Of Married People
Apostolate Of Married PeopleApostolate Of Married People
Apostolate Of Married People
 
Passionist JPIC booklet (english)
Passionist JPIC booklet (english)Passionist JPIC booklet (english)
Passionist JPIC booklet (english)
 
Persia
PersiaPersia
Persia
 
Analisi delle reti peer to peer: Sanremo 2011
Analisi delle reti peer to peer: Sanremo 2011Analisi delle reti peer to peer: Sanremo 2011
Analisi delle reti peer to peer: Sanremo 2011
 
Impact of the new deal.pptb
Impact of the new deal.pptbImpact of the new deal.pptb
Impact of the new deal.pptb
 
The cold war heats up
The cold war heats upThe cold war heats up
The cold war heats up
 
Women in public life
Women in public lifeWomen in public life
Women in public life
 
2007 ogt
2007 ogt2007 ogt
2007 ogt
 
Italia Oggi-Lo Compro o no? Decide il blog
Italia Oggi-Lo Compro o no? Decide il blogItalia Oggi-Lo Compro o no? Decide il blog
Italia Oggi-Lo Compro o no? Decide il blog
 
Reddito di Base Incondizionato - Presentazione Ufficiale
Reddito di Base Incondizionato - Presentazione UfficialeReddito di Base Incondizionato - Presentazione Ufficiale
Reddito di Base Incondizionato - Presentazione Ufficiale
 
The franks
The franksThe franks
The franks
 
Operations Foundation Business Brief 2
Operations Foundation Business Brief 2Operations Foundation Business Brief 2
Operations Foundation Business Brief 2
 
The columbian exchange
The columbian exchangeThe columbian exchange
The columbian exchange
 

Similar to Enhance Maven plugins with Groovy

Magic with groovy & grails
Magic with groovy & grailsMagic with groovy & grails
Magic with groovy & grailsGeorge Platon
 
Scaling UI5 Projects via Standardized Project & Infrastructure Setup (Ui5Con ...
Scaling UI5 Projects via Standardized Project & Infrastructure Setup (Ui5Con ...Scaling UI5 Projects via Standardized Project & Infrastructure Setup (Ui5Con ...
Scaling UI5 Projects via Standardized Project & Infrastructure Setup (Ui5Con ...Nabi Zamani
 
J&Js adventures with agency best practice & the hybrid MVC framework - Umbrac...
J&Js adventures with agency best practice & the hybrid MVC framework - Umbrac...J&Js adventures with agency best practice & the hybrid MVC framework - Umbrac...
J&Js adventures with agency best practice & the hybrid MVC framework - Umbrac...Jeavon Leopold
 
Dev talks Cluj 2018 : Java in the 21 Century: Are you thinking far enough ahead?
Dev talks Cluj 2018 : Java in the 21 Century: Are you thinking far enough ahead?Dev talks Cluj 2018 : Java in the 21 Century: Are you thinking far enough ahead?
Dev talks Cluj 2018 : Java in the 21 Century: Are you thinking far enough ahead?Steve Poole
 
Spunite17 Converting your CEWP Customisations
Spunite17 Converting your CEWP CustomisationsSpunite17 Converting your CEWP Customisations
Spunite17 Converting your CEWP CustomisationsNCCOMMS
 
Curious Coders Java Web Frameworks Comparison
Curious Coders Java Web Frameworks ComparisonCurious Coders Java Web Frameworks Comparison
Curious Coders Java Web Frameworks ComparisonHamed Hatami
 
Continuous Integration
Continuous IntegrationContinuous Integration
Continuous IntegrationHarald Soevik
 
Techtonic Summit NYC
Techtonic Summit NYCTechtonic Summit NYC
Techtonic Summit NYCBob Wise
 
Questions Log: Transitioning to Cognos Workspace Advanced
Questions Log: Transitioning to Cognos Workspace AdvancedQuestions Log: Transitioning to Cognos Workspace Advanced
Questions Log: Transitioning to Cognos Workspace AdvancedSenturus
 
Punith's Résumé Cover
Punith's Résumé CoverPunith's Résumé Cover
Punith's Résumé Coverpunith s
 
Comparing JVM Web Frameworks - Rich Web Experience 2010
Comparing JVM Web Frameworks - Rich Web Experience 2010Comparing JVM Web Frameworks - Rich Web Experience 2010
Comparing JVM Web Frameworks - Rich Web Experience 2010Matt Raible
 
Questions Log: Tips for Intermediate Cognos Report Studio Authors
Questions Log: Tips for Intermediate Cognos Report Studio AuthorsQuestions Log: Tips for Intermediate Cognos Report Studio Authors
Questions Log: Tips for Intermediate Cognos Report Studio AuthorsSenturus
 
RESTful Services and Distributed OSGi - 04/2009
RESTful Services and Distributed OSGi - 04/2009RESTful Services and Distributed OSGi - 04/2009
RESTful Services and Distributed OSGi - 04/2009Roland Tritsch
 
ASP.NET 5: What's the Big Deal
ASP.NET 5: What's the Big DealASP.NET 5: What's the Big Deal
ASP.NET 5: What's the Big DealJim Duffy
 
DevOps: The Amazon Way
DevOps: The Amazon WayDevOps: The Amazon Way
DevOps: The Amazon WayAWS Summits
 
Magento 2 Deployment Automation: from 6 hours to 15 minutes - Max Pronko
Magento 2 Deployment Automation: from 6 hours to 15 minutes - Max PronkoMagento 2 Deployment Automation: from 6 hours to 15 minutes - Max Pronko
Magento 2 Deployment Automation: from 6 hours to 15 minutes - Max PronkoMax Pronko
 
Simplifying Apache Geode with Spring Data
Simplifying Apache Geode with Spring DataSimplifying Apache Geode with Spring Data
Simplifying Apache Geode with Spring DataVMware Tanzu
 
Google’s Internal Memo Leaked "JavaScript is Flawed, Won't Work, and Can't Be...
Google’s Internal Memo Leaked "JavaScript is Flawed, Won't Work, and Can't Be...Google’s Internal Memo Leaked "JavaScript is Flawed, Won't Work, and Can't Be...
Google’s Internal Memo Leaked "JavaScript is Flawed, Won't Work, and Can't Be...Stephane Beladaci
 

Similar to Enhance Maven plugins with Groovy (20)

Magic with groovy & grails
Magic with groovy & grailsMagic with groovy & grails
Magic with groovy & grails
 
Scaling UI5 Projects via Standardized Project & Infrastructure Setup (Ui5Con ...
Scaling UI5 Projects via Standardized Project & Infrastructure Setup (Ui5Con ...Scaling UI5 Projects via Standardized Project & Infrastructure Setup (Ui5Con ...
Scaling UI5 Projects via Standardized Project & Infrastructure Setup (Ui5Con ...
 
J&Js adventures with agency best practice & the hybrid MVC framework - Umbrac...
J&Js adventures with agency best practice & the hybrid MVC framework - Umbrac...J&Js adventures with agency best practice & the hybrid MVC framework - Umbrac...
J&Js adventures with agency best practice & the hybrid MVC framework - Umbrac...
 
Dev talks Cluj 2018 : Java in the 21 Century: Are you thinking far enough ahead?
Dev talks Cluj 2018 : Java in the 21 Century: Are you thinking far enough ahead?Dev talks Cluj 2018 : Java in the 21 Century: Are you thinking far enough ahead?
Dev talks Cluj 2018 : Java in the 21 Century: Are you thinking far enough ahead?
 
Spunite17 Converting your CEWP Customisations
Spunite17 Converting your CEWP CustomisationsSpunite17 Converting your CEWP Customisations
Spunite17 Converting your CEWP Customisations
 
Curious Coders Java Web Frameworks Comparison
Curious Coders Java Web Frameworks ComparisonCurious Coders Java Web Frameworks Comparison
Curious Coders Java Web Frameworks Comparison
 
Continuous Integration
Continuous IntegrationContinuous Integration
Continuous Integration
 
Techtonic Summit NYC
Techtonic Summit NYCTechtonic Summit NYC
Techtonic Summit NYC
 
The unintended benefits of Chef
The unintended benefits of ChefThe unintended benefits of Chef
The unintended benefits of Chef
 
Questions Log: Transitioning to Cognos Workspace Advanced
Questions Log: Transitioning to Cognos Workspace AdvancedQuestions Log: Transitioning to Cognos Workspace Advanced
Questions Log: Transitioning to Cognos Workspace Advanced
 
Punith's Résumé Cover
Punith's Résumé CoverPunith's Résumé Cover
Punith's Résumé Cover
 
Comparing JVM Web Frameworks - Rich Web Experience 2010
Comparing JVM Web Frameworks - Rich Web Experience 2010Comparing JVM Web Frameworks - Rich Web Experience 2010
Comparing JVM Web Frameworks - Rich Web Experience 2010
 
Questions Log: Tips for Intermediate Cognos Report Studio Authors
Questions Log: Tips for Intermediate Cognos Report Studio AuthorsQuestions Log: Tips for Intermediate Cognos Report Studio Authors
Questions Log: Tips for Intermediate Cognos Report Studio Authors
 
AditiGulati
AditiGulatiAditiGulati
AditiGulati
 
RESTful Services and Distributed OSGi - 04/2009
RESTful Services and Distributed OSGi - 04/2009RESTful Services and Distributed OSGi - 04/2009
RESTful Services and Distributed OSGi - 04/2009
 
ASP.NET 5: What's the Big Deal
ASP.NET 5: What's the Big DealASP.NET 5: What's the Big Deal
ASP.NET 5: What's the Big Deal
 
DevOps: The Amazon Way
DevOps: The Amazon WayDevOps: The Amazon Way
DevOps: The Amazon Way
 
Magento 2 Deployment Automation: from 6 hours to 15 minutes - Max Pronko
Magento 2 Deployment Automation: from 6 hours to 15 minutes - Max PronkoMagento 2 Deployment Automation: from 6 hours to 15 minutes - Max Pronko
Magento 2 Deployment Automation: from 6 hours to 15 minutes - Max Pronko
 
Simplifying Apache Geode with Spring Data
Simplifying Apache Geode with Spring DataSimplifying Apache Geode with Spring Data
Simplifying Apache Geode with Spring Data
 
Google’s Internal Memo Leaked "JavaScript is Flawed, Won't Work, and Can't Be...
Google’s Internal Memo Leaked "JavaScript is Flawed, Won't Work, and Can't Be...Google’s Internal Memo Leaked "JavaScript is Flawed, Won't Work, and Can't Be...
Google’s Internal Memo Leaked "JavaScript is Flawed, Won't Work, and Can't Be...
 

Enhance Maven plugins with Groovy

  • 1. © Computas AS 09.09.2010 Enhance your Maven plugins with Groovy (experiences with Groovyfication) Harald Søvik hso @ computas.com
  • 2. Speakers Harald Søvik Java Tech Lead, M.Sc. hso@computas.com 2 © Computas AS 09.09.2010 bpmwork support systems knowledgemanagement consultancy services custom software solutions 180 employees w/ M.Sc. or Ph.D. 100% owned by employees
  • 3. 3 © Computas AS 09.09.2010 Groovy OO dynamic run onjvm Java-like Java-interoperable scripting / web / jms ++
  • 4. 4 © Computas AS 09.09.2010 Pro forma I’m not a Groovyexpert ! I’mfocusingon Java <> Groovy not neccessarilythevery best wayofsolving it alltogether ! Using pure Java librarieswould make a different story
  • 5. 5 © Computas AS 09.09.2010 Goal Investigate home-brew enterprise Maven plugins Would Groovyfication™ affect .. Simplicity? Maintainability? Testability?
  • 6. 6 © Computas AS 09.09.2010 Recipe for your Maven project add build step with gmaven-plugin add dependency to gmaven-mojo src/java vssrc/groovy .java vs.groovy compile and enjoy !
  • 7. 7 © Computas AS 09.09.2010 Example 0: archetype:generate Purpose Write text to file Code generated from archetype:generate type 12 A Maven Java plugin development project Differences Exception handling Controlling flow of execution
  • 8. 8 © Computas AS 09.09.2010 Example 1: plugin:goal ”help” Purpose Write text to console Differences Multi line output
  • 9. 9 © Computas AS 09.09.2010 Example 2: Enterprise pluginlogic Purpose Execute external program Determine exit value Differences Exception handling Controlling flow of execution
  • 10. 10 © Computas AS 09.09.2010 Example 4: Enterprise pluginlogic Purpose Checkif URL has content (~ ping) Differences Exception handling Controlling flow of execution (“debug comments”) Readability
  • 11. 11 © Computas AS 09.09.2010 Example 5: DTO Purpose Internal ”entity” class Differences Constructor Constructorcall, readability Accessormethods
  • 12. 12 © Computas AS 09.09.2010 Example 6: Testability Purpose Test a method converting a String with windows style path to posix-style path Differences ”Groovy set of mind” Highlight low cohesion Refactoring opportunities
  • 13. 13 © Computas AS 09.09.2010 Experiences >> Task-oriented, high-level operations Testability readyness << Complex, procedural code Detailed logging, exception handling Low cohesion
  • 14. Questions or comments ? 14 © Computas AS 09.09.2010 Booth B5 jobopenings for experienceddevelopers ! www.computas.com

Editor's Notes

  1. computasdrivert stort sett med modellering av forretningsprosesser, fagsystemer og integrasjon