This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Ant, Maven and Other Build Tools and the fly likes Pragmatic Project Automation book - What's it all about? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Pragmatic Project Automation book - What Watch "Pragmatic Project Automation book - What New topic
Author

Pragmatic Project Automation book - What's it all about?

Alvin chew
Ranch Hand

Joined: Jan 08, 2004
Posts: 834
hi, Mike Clark, can you please briefly explain your book about ? thank you !

[Bear edit: modified topic title]
[ September 21, 2004: Message edited by: Bear Bibeault ]
Alvin chew
Ranch Hand

Joined: Jan 08, 2004
Posts: 834
where to get Table of contents for your book ?
Mike Clark
author
Ranch Hand

Joined: Aug 15, 2003
Posts: 83
The book gives you soup-to-nuts (source code to deployed software) recipes for automating Java projects. It covers how to automate builds with Ant and CruiseControl, create push-button releases from version control using simple scripts, and install and deploy with an installer, Ant tasks, and Java Web Start. The book also covers how to monitor builds with visual devices (e.g. lava lamps) and monitor running programs with devices such as your cell phone.

You can download the Table of Contents and two sample chapters at:

http://www.pragmaticprogrammer.com/sk/auto/

Mike


Mike Clark<br />Author of <a href="http://www.amazon.com/exec/obidos/ASIN/0974514039/ref=jranch-20" target="_blank" rel="nofollow">Pragmatic Project Automation</a>
Alvin chew
Ranch Hand

Joined: Jan 08, 2004
Posts: 834
mike, is your book belongs to beginner ?
Alvin chew
Ranch Hand

Joined: Jan 08, 2004
Posts: 834
what maven do for us ? i quite confuse on this new technology
somkiat puisungnoen
Ranch Hand

Joined: Jul 04, 2003
Posts: 1312

It covers how to automate builds with Ant and CruiseControl, create push-button releases from version control using simple scripts


What is CruiseControl ?


SCJA,SCJP,SCWCD,SCBCD,SCEA I
Java Developer, Thailand
Jeff Langr
author
Ranch Hand

Joined: May 14, 2003
Posts: 762
Greetings Mike,

I looked at the TOC; looks promising. What significant tools/techniques are "out of scope" for the book? What do you not cover that someone might mistakenly expect to be in the book?

thanks,
Jeff


Books: Agile Java, Modern C++ Programming with TDD, Essential Java Style, Agile in a Flash. Contributor, Clean Code.
Daniel Mayer
Ranch Hand

Joined: Sep 09, 2004
Posts: 103
Originally posted by somkiat puisungnoen:


What is CruiseControl ?


So you aren't reading the Journal?
http://www.javaranch.com/journal/200409/Journal200409.jsp#a2
Mike Clark
author
Ranch Hand

Joined: Aug 15, 2003
Posts: 83
Originally posted by Alvin chew:
mike, is your book belongs to beginner ?


Yes, the Pragmatic Starter Kit, of which Pragmatic Project Automation is the third volume, is intended to help beginners get started on the right foot with what we consider to be the essential basics for software development: version control, unit testing, and automation. These books present the concepts behind the practices, followed up with hands-on recipes for putting the practices to good use on your project.

As well, more advanced readers have used the books in the Starter Kit to help convince and educate other folks within their organization or team. And more often than not, the advanced readers learn a thing or two themselves. :-)

Mike
Mike Clark
author
Ranch Hand

Joined: Aug 15, 2003
Posts: 83
Originally posted by somkiat puisungnoen:


What is CruiseControl ?


CruiseControl is an open source application and framework for continuous integration. You can think of it as a scheduler for your Ant or Maven builds. It watches your version control repository for changes, and if a change has occurred since the last time the build was run, CruiseControl starts another build. In this way, CruiseControl is used to continually build and test your software so that you get timely and accurate feedback about the status of the build.

CruiseControl is also an extensible framework. For example, you can register custom publishers that get notified when the build cycle is complete. My lava lamps, for example, are turned on and off using a custom X10 publisher.

The book devotes an entire chapter (Scheduled Builds) to setting up and running CruiseControl, and the Monitoring chapter describes how to configure publishers that send notification to your cell phone and generate an RSS feed for the build status.

Mike
Mike Clark
author
Ranch Hand

Joined: Aug 15, 2003
Posts: 83
Originally posted by Jeff Langr:
I looked at the TOC; looks promising. What significant tools/techniques are "out of scope" for the book? What do you not cover that someone might mistakenly expect to be in the book?


Hi Jeff,

Great question.

It might be easier to answer that by listing what tools *are* described in the book:

Ant (not Maven)
CVS (not Subversion, though the commands are very similar)
CruiseControl
Java Web Start
JUnit
log4j
NSIS installer
RSS
Simple shell scripts and one Ruby script

All the tools used throughout the book are freely available. I tried to keep the automation tool chain simple and, well, pragmatic. Often times a simple shell script or batch file will do the trick. I focused on Ant rather than Maven because Ant is more mature and ubiquitous, and for most projects I think Maven is overkill.

That said, the tools are a means to the end -- project automation. So, for example, although I use CVS in the book, it's really an implementation detail. What's most important is that teams use version control so they can capitalize on automation such as push-button releases.

The automation book does not cover code generation. We thought that topic deserved a book of its own. As an aside, the book's companion web site picks up where the book left off, so the scope of constantly expanding through contributions from other automators in the field:

http://pragmaticautomation.com

I hope that helps. If not, please let me know what tool/technique you're interested in and I'll let you know whether or not it's covered in the book.

Mike
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61448
    
  67

There's seems to be a tendency to pile up questions in this topic. Please keep the discussion in this topic to the spirit of the original post, which was "what is this book about?"

New questions, such as "What is xyz?" should each be started in their own new topics.

thanks,
bear
Forum Barteder
(goes back to wiping the counter)


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61448
    
  67

(looks up from counter)

To that end, I have modified the topic title accordingly.

(goes back to wiping)
Sri Rangan
Ranch Hand

Joined: Dec 08, 2001
Posts: 160
I understand this book covers continuous integration with ANT and CRUISE CONTROL. Does this also talk about MAVEN+CRUISE CONTROL integration.

Thanks
Sri Rangan
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
Originally posted by Sri Rangan:
I understand this book covers continuous integration with ANT and CRUISE CONTROL. Does this also talk about MAVEN+CRUISE CONTROL integration.

Nope. Maven is given approximately one page, explaining what it is and how it differs from Ant.


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
will lopez
Greenhorn

Joined: Dec 03, 2003
Posts: 13
Mike:

You list the items covered,

"It might be easier to answer that by listing what tools *are* described in the book:

Ant (not Maven)
CVS (not Subversion, though the commands are very similar)
CruiseControl
Java Web Start
JUnit
log4j
NSIS installer
RSS
Simple shell scripts and one Ruby script"


...but what about any QA (besides JUnit) tools - like Checkstyle or Clover - those are the things I'd like to integrate into my builds, however, the TOC looks like the book will be a good read.

Thanks,
-Will
[ September 21, 2004: Message edited by: Bear Bibeault ]
Mike Clark
author
Ranch Hand

Joined: Aug 15, 2003
Posts: 83
Originally posted by Sri Rangan:
I understand this book covers continuous integration with ANT and CRUISE CONTROL. Does this also talk about MAVEN+CRUISE CONTROL integration.


The book describes the Ant builder in CruiseControl. To translate that to Maven, you'd simply use the Maven builder:

http://cruisecontrol.sourceforge.net/main/configxml.html#maven

How interested would you be in a supplemental chapter to the book that describes automation with Maven? It would basically be an overlay for the existing book, showing how to do all the same stuff, but with Maven instead of Ant. It would also include a break-down of when and where Maven might be more appropriate to use.

Mike
Mike Clark
author
Ranch Hand

Joined: Aug 15, 2003
Posts: 83
Originally posted by will lopez:
...but what about any QA (besides JUnit) tools - like Checkstyle or Clover - those are the things I'd like to integrate into my builds, however, the TOC looks like the book will be a good read.


The book doesn't cover Checkstyle or Clover specifically, although CruiseControl includes an XSL file that will display Checkstyle results on the build web page. Recent versions of CruiseControl may also include a Clover results publisher.

So, for example, you can run the Checkstyle Ant task as part of your scheduled build, and CruiseControl will slurp up the resulting XML files to be displayed on the build status web page.

Mike

[ September 21, 2004: Message edited by: Mike Clark ]
[ September 21, 2004: Message edited by: Mike Clark ]
E Weibust
Ranch Hand

Joined: Jun 13, 2003
Posts: 54
Originally posted by Mike Clark:


How interested would you be in a supplemental chapter to the book that describes automation with Maven? It would basically be an overlay for the existing book, showing how to do all the same stuff, but with Maven instead of Ant. It would also include a break-down of when and where Maven might be more appropriate to use.



I, personally, would love to see a Maven supplement. What other resources do you recommend for learning about Maven?


---<br />Erik Weibust<br /><a href="http://erik.weibust.net" target="_blank" rel="nofollow">http://erik.weibust.net</a>
Mike Clark
author
Ranch Hand

Joined: Aug 15, 2003
Posts: 83
Originally posted by E Weibust:
I, personally, would love to see a Maven supplement. What other resources do you recommend for learning about Maven?


Thanks for letting me know. It's something I'm considering writing.

Honestly, I don't have good resources for learning Maven. I'm not saying they're not available, but good documentation for Maven seems to be lacking. I learned what I know about Maven by trial and error. Perhaps I can help change that.

Mike
E Weibust
Ranch Hand

Joined: Jun 13, 2003
Posts: 54
Yeah, I can't really find anything either.

I'm trying to get something scheduled for the Dallas Java Users group (javamug.org) on the subject. Hopefully, early in 2005.
Eusebio Floriano
Ranch Hand

Joined: Mar 07, 2004
Posts: 237
Originally posted by Mike Clark:


It might be easier to answer that by listing what tools *are* described in the book:

Ant (not Maven)
CVS (not Subversion, though the commands are very similar)
CruiseControl
Java Web Start
JUnit
log4j
NSIS installer
RSS
Simple shell scripts and one Ruby script

Mike


Hi Mike,
What does your book covers about log4j ? Is there any coupling with automation ?
Same question for Java Web Start. Is there any coupling with automation ?

Regards,


SCJP 1.4 / 5.0 - SCBCD 1.3 - SCWCD 1.4 - IBM 484
Mike Clark
author
Ranch Hand

Joined: Aug 15, 2003
Posts: 83
Originally posted by Vinicius Boson:

What does your book covers about log4j ? Is there any coupling with automation ?
Same question for Java Web Start. Is there any coupling with automation ?


As for log4j, the Monitoring chapter shows you how to write a simple custom log4j appender and configure it so the logger acts as a trip wire for monitoring things of interest inside of your program. Say, for example, you want to receive a text message on your cell phone every time somebody orders 2 or more books from your online book store. Inside of your book store program you'd log that event to a log4j logger that has the custom appender registered. The appender receives the logging event and then can send or display a notification of your choosing (e.g., your cell phone beeps). So the automation coupling is in terms of monitoring running programs without having to physically watch them.

In the Installation and Deployment chapter, I use Java Web Start as an example technology for deploying and auto-updating applications over the web. I show you what a JNLP file looks like and walk through the limitations of using Java Web Start. The coupling with automation here is in terms of automating the deployment of applications, and updating to new versions as they are available.

Mike
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61448
    
  67

Mike, just curious as to why you chose log4j (which I really like, by the way) over the java.util.logging facility? Did you not want to limit your book audience to JDK 1.4 and beyond?
Mike Clark
author
Ranch Hand

Joined: Aug 15, 2003
Posts: 83
Originally posted by Bear Bibeault:
Mike, just curious as to why you chose log4j (which I really like, by the way) over the java.util.logging facility? Did you not want to limit your book audience to JDK 1.4 and beyond?


Actually, I'm just not that fond of the java.util.logging facility. It's a least common denominator approach to logging and you lose some of the power and flexibility of log4j, for example. It's unfortunate, in my opinion, that Sun chooses to expand the size of the JDK by adding layers on top of great libraries that already exist.

My personal tastes aside, I think the development community has already cast their vote on this issue. I did a bit of research before using log4j in the book, and it was clear to me that log4j was by far favored over the logging facility built into the JDK.

Mike
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61448
    
  67

OK, cool. That's exactly my feelings on log4j. I investigated using the JDK logging facility when it became available and chose to retain log4j. Thanks for the sanity check.
[ September 22, 2004: Message edited by: Bear Bibeault ]
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Originally posted by Mike Clark:
The book doesn't cover Checkstyle or Clover specifically, although CruiseControl includes an XSL file that will display Checkstyle results on the build web page. Recent versions of CruiseControl may also include a Clover results publisher.


And if you know some basic XSLT, it isn't too hard to add you own reporting to CC, as long as the tool provides some XML output.


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Mike Clark
author
Ranch Hand

Joined: Aug 15, 2003
Posts: 83
Originally posted by Ilja Preuss:
And if you know some basic XSLT, it isn't too hard to add you own reporting to CC, as long as the tool provides some XML output.


Exactly. It's easy to look at CruiseControl and think that the build status page of the web application is fixed. In fact, it's dynamically generated by applying stylesheets to the XML output of Ant. So with a little XSLT mojo, you can extend CruiseControl to report on whatever is of interest to you, given that you're able to get XML out of the tool that produces the raw data. I hope to show an example of how to report the results of JDepend using its XML outputter in an upcoming article on pragmaticautomation.com.

And for build notification outside of the web application, you can use an existing CruiseControl publisher or write your own. I use the XSLTLogPublisher to produce an RSS file of the last build results, for example.

Mike
Jon Strayer
Ranch Hand

Joined: Dec 04, 2002
Posts: 133
Originally posted by Mike Clark:


Thanks for letting me know. It's something I'm considering writing.

Honestly, I don't have good resources for learning Maven. I'm not saying they're not available, but good documentation for Maven seems to be lacking. I learned what I know about Maven by trial and error. Perhaps I can help change that.

Mike


If you write a Maven book I guarantee at least one sale. :-)


Jon
Eusebio Floriano
Ranch Hand

Joined: Mar 07, 2004
Posts: 237
Thx for the aswers Mike )

I have one curiosity ..

Originally posted by Mike Clark:


Exactly. It's easy to look at CruiseControl and think that the build status page of the web application is fixed.
Mike


Is CruiseControl largely used in ther market ?
It�s the first time that i�ve heard about it.

Regards,
Al Korov
Greenhorn

Joined: Sep 11, 2004
Posts: 21
In my experience, CruiseControl is being used more and more by more development teams. It's not everywhere like JUnit is, but it's getting downloaded more and more from SourceForge. (JUnit has a total of 794,593 downloads, while CruiseControl has a total of 58,383 downloads.)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Pragmatic Project Automation book - What's it all about?