Joine Music

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Monday, 19 May 2008

Pimp My Build - TS-5596

Posted on 07:17 by Unknown
DISCLAIMER:
These are the tidied up notes I took from the session at the JavaOne 2008 conference in San Francisco, California. There may well be mistakes and ommissions. I will come back and correct them once the conference has completed. However my first priority is to get the information published before the backlog gets too large and swamps me. All comments welcome. Enjoy!

Matt Quail & Conor MacNeil, Atlassian

You might Learn
- Ways to improve your Ant build
- How to make your Maven build work

#1 - Use Imports and Macros
  • to import the files containing macros you are using in your build
  • means other folks can reuse (on diff projects even) your macros without knowing about their details
  • and keeps your main ant.xml clean and simple and factors out commonality
  • Tip!: add some guards in the macro to make sure stuff won't fail
  • You get:
    • A modularised build (kind of like Maven)
    • Move all the targets that don't change across your builds into an importable module
    • Import the module and override as appropriate
#2 - Use Macros and Presets

#3 - Don't build stuff you don't need
  • use ant's "uptodate" task
    • it is complex
  • invest the time to get it right in the build
  • keep you and your team productive
  • the build will remember how to do it
  • seperate it out into a macro and make its use simple
  • also use outofdate from ant-contrib
    • even better

#4 - Spice up your build
  • Show a splash screen while the build is running
    • nice and cute
  • iIf a test fails - play "blame train" audio
  • Add a splash image
    • and associate it with a sprint, scrum iteration, etc.
  • Can I do this with maven?:
    • Yup, use growler (run the output of maven through an awk script which pattern matches and push out to growlnotify script)
  • Can I use growl with ant?:
    • yup
#5 - Don't be afraid to write tasks
  • Don't seperate the team into builders and coders
    • everyone should know how the build works
    • the build should not be precious or off limits
#6 - Use Scripts
  • Ant lests you define tasks with scripts
    • e.g. in javascript (in BSF in ANT)
#7 - Use Conditional Tasks
  • Yes, you should try to be declarative but...
    • e.g. you are dependent upon the OS platform => use the "if" task
    • use the ant-contrib tasks (where "if" is from)
#8 - Don't do One-Off Analysis
  • Your build is a way to record how to do a set of complex operations
  • There are heaps of analysis tools out there - USE THEM
  • Put them in your build, in your CI, generate reports
#9 - Document Your Build
  • Ant allows you to put descriptions on all your targets
    • Add comments
    • Use the -target_name convention for private targets
      • can't be invoked from the command line
      • no its not perfect
      • yes it does work
      • its called an idiom
  • Remember your build is where you document and remember things
    • run tests
    • run the build
    • create the licence file
    • generate coverage reports
    • attach debuggers, run profilers
  • Gives newbies a leg up
  • Continuous Integration
  • Controlled build environent
  • Automated testing and reporting - its easy because its already in your build file
#10 - Maven Best Practice Tips
  • Use a remote repository proxy (e.g. apache archiva) for stability and performance
  • Create a local repository for private artefacts
    • your own artefacts
    • missing third party artitafcts
  • Create a local repository for public artefacts
    • artifacts you are making available
  • You need to manage your build infrastructure
Email ThisBlogThis!Share to XShare to Facebook
Posted in ant maven pimp build javaone 2008 | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • EJB 3.0 Outside the Container, Inside the JVM - Part 2: Configuring JPA Declaratively
    Welcome to part two of this blog entry introducing using EJB3.0 inside the JVM. Click here to view the first part. As we've seen, JPA ...
  • (no title)
    The Significance and Importance of Quotes in JSTL EL I just spent a few hours debuggung a null pointer in a Portlet JSP I'm writing. It...
  • Project Wonderland BOF (BOF-1306) @ JavaOne 2007
    These are my notes which I took during the Project Wonderland BOF at JavaOne 2007. Enjoy. Paul Byrne - Lead of Wonderland What is project w...
  • Maven 1.0.2: Adding a resource to a jar
    Want to add a resource such as an xml config file to your generated jar in Maven 1.0.2? Create a directory called ./resources in the base di...
  • EJB 3.0: One Model Inside and Out (Pt. 2) - The POJO Model Itself – Annotations and Relationships
    Please note, this blog entry is based heavily on many other things out there on the web at the moment, most particularly this tutorial on ne...
  • (no title)
    List Insert Based on CompareTo Here's some code I've had to write more than once. It inserts something into a list at a position ba...
  • The Goods Delivered – SOA Suite “ant-sca-compile.xml” File Simplified (Plus Ivy Dependency Management)
    As promised in my last post , I’ve been continuing to work on getting Oracle SOA Suite (11g) projects to build outside the JDeveloper IDE.  ...
  • Booting Apache Derby ("JavaDB") with your Java App's Startup
    If you're embedding the Derby RDBMS with your java desktop application and want it to start when you start your app, you need to make th...
  • EJB3: Listing the Complete Contents of a Table
    It took me a while to work this out. Here is is for posterity: String queryString = "SELECT r FROM Recipe r WHERE r.id > 0"; Q...
  • EJB 3.0 Outside the Container, Inside the JVM - Part 3: Wrapping the Model
    Welcome to part three of my blog on using EJB3.0 / JPA and Derby inside the JVM. The previous parts can be found here and here . We're...

Categories

  • 0
  • 2008
  • ant maven pimp build javaone 2008
  • apple ipod touch
  • asm
  • blog new ruby
  • blogtag list
  • bond casinoroyale mashup mi6 film movie
  • build
  • bytecode
  • CI
  • cobertura
  • communityone 2008 nutter jvm scala jruby groovy davinci
  • communityone 2008 opensocial socialsite
  • communityone javaone keynote oreilly
  • configuration
  • cowley
  • css div layout column ie firefox safari example
  • custom
  • darkstar mpk20 wonderland java3d commaboration SL
  • dashboard rss communication news development
  • db2 database SQL max min howto tip
  • db2 database ibm lessons tips
  • db2 database load batch howto example
  • db2 import upload data howto command
  • debt technical java annotation
  • debugging tips javaone 2008
  • development web2.0
  • findbugs JavaOne 2008 pugh
  • findbugs JavaOne BOF notes
  • gafter closures java javaone notes
  • google trouble patriarchal patriarchy
  • groovy metaprogramming javaone 2008
  • grubby oss data generation project announce
  • guice javaone 2008
  • gwt maven howto example simple
  • howto
  • hudson
  • hudson CI javaone 2008
  • ibm
  • invokeDynamic jvm dynamic ruby javaone
  • itinerant web2.0 portable desktop
  • jacl was websphere wsadmin trace logging
  • james gosling sun java open source tech days second life SL
  • jar java manifest properties config howto tip
  • java
  • java applet javaone 2008 reloaded jnlp
  • java javafxscript javaone 2008 fxscript
  • java javaone 2007 07
  • java javaone 2008 bytecode cobertura asm singleton testability
  • javaone
  • javaone keynote gage schwarz javafx
  • javaone semantic web bof notes web3
  • jazz
  • jruby rails javaone charlesnutter thomasenebo
  • jruby ruby netbeans development
  • kill dead laptop computer rebuild restore
  • lessonslearned
  • mac osx java gui shellscript classpath problem solution
  • maven plugin unittest test packager
  • mylin mylar javaone eclipse 2008
  • netbeans development ide
  • netbeans development ide RC
  • netbeans maven2 profiling
  • netbeans ruby sun tech days visual web pack roman strobl
  • ola bini java javaone 2008 thoughtworks ruby jruby
  • openjdk java javaone javafx wonderland
  • overheard
  • pojo ejb3.0 jpa orm java example howto
  • rant
  • rest restful jsr311 java web2.0 javaone ts-6411
  • rome rss feed blog rss atom propono java javaone
  • rsa uml profile plugin howto
  • ruby inheritance example
  • ruby jruby rss xml hpricot
  • ruby unless example
  • scm
  • setup
  • subversion svn xp windows cleanup
  • sun java soa web2.0 netbeans opensource javacaps
  • sun tech days java derby database rdbms london
  • sun tech days london impressions
  • terracotta java javaone 2008 android gwt
  • tip
  • tips
  • vwp netbeans JPA howto
  • was jython scripting nfr ibm pmi jvm
  • was tpv jython scripting nfr ibm pmi
  • webrick ruby jruby actadiurna investigation code howto
  • workitem

Blog Archive

  • ►  2012 (1)
    • ►  October (1)
  • ►  2010 (8)
    • ►  November (1)
    • ►  October (3)
    • ►  June (1)
    • ►  May (1)
    • ►  February (1)
    • ►  January (1)
  • ►  2009 (9)
    • ►  December (1)
    • ►  November (5)
    • ►  March (2)
    • ►  February (1)
  • ▼  2008 (22)
    • ►  December (1)
    • ►  November (3)
    • ▼  May (15)
      • JavaOne 2008 - Java Recrystalised
      • CommunityOne 2008 - Open Social For Your Website
      • CommunityOne 2008 - The Road to Babel: Bringing th...
      • JRuby at Thoughtworks - BOF-4807
      • Boldly go where the Java programming language has ...
      • Using Findbugs in Anger - TS-6590
      • Overview of JavaFX Script - TS-5152
      • Mylyn: Code at the Speed of Thought - TS-6421
      • Pimp My Build - TS-5596
      • Improving the Engineering Process through Automati...
      • The Future of Guice - BOF-6400
      • Applets Reloaded - TS-6290
      • Advanced Enterprise Debugging Techniques - TS-6072
      • Groovy: The Red Pill (or Metaprogramming : The way...
      • Practical Applications of Static Bytecode Analysis...
    • ►  March (1)
    • ►  January (2)
  • ►  2007 (53)
    • ►  December (1)
    • ►  November (3)
    • ►  September (3)
    • ►  August (2)
    • ►  July (3)
    • ►  June (1)
    • ►  May (12)
    • ►  April (5)
    • ►  March (13)
    • ►  February (7)
    • ►  January (3)
  • ►  2006 (35)
    • ►  December (8)
    • ►  October (1)
    • ►  August (1)
    • ►  July (5)
    • ►  June (8)
    • ►  May (3)
    • ►  April (7)
    • ►  March (2)
Powered by Blogger.

About Me

Unknown
View my complete profile