Category Archives: Apache

Imported from Pebble

Last chance to register for Training and Receive Maven Book Free


Packt Publishing, the publishers of Apache Maven 2: Effective Implementation, will be present at ApacheCon North America, coming up on November 1 – 5, 2010. They’ll have an exhibitors table with information about their books on Apache projects such as OFBiz, Tomcat, MyFaces, jMeter, Maven, and more.

They’ve generously offered to sponsor free copies of the Maven book for attendees to the Maven training course on November 1. However, this could be extended until today only, so that the correct number can be ordered. Please register now!

One of the attractions of writing for Packt was their involvement in open source, such as through their Open Source Royalties program, and their Open Source Awards. I’m glad to see that they’ll be at ApacheCon.

Advertisements

Apache Maven 3.0 Released: a Few Important Tips

Just short of the 5 year anniversary of the Maven 2.0 release (Oct 19, 2005), Maven 3.0 has shipped today. You can download it from the Maven website. I’ve now been using it for about 6 months for all but one project, by which point it was already quite stable. Luckily it also arrives just in time for ApacheCon, since I have updated my training to cover it! All-in-all it’s a great release – quite a bit faster and in places more predictable.

New Features

For the most part, this is not a feature release, but a performance and architectural release. Much has already been written about underlying technology changes (like switching from Plexus to Guice). The main points of interest for me are:

  • parallel builds – build modules in parallel when enabled to utilise multiple cores and get even more performance gains. It’s optional, so take some time to try it out
  • improved performance & predictability – while maintaining and documenting compatibility
  • improved reactor – behaves more consistently between building multi-module projects and subsets of them
  • validation and error reporting – unrecommended and deprecated behaviour is now pointed out and error reporting improved
  • improved classloading – extensions and plugins are loaded in a more self-contained fashion to allow more flexibility

There are still some “gotchas”, tips and tricks to take note of, however.

Check the Compatibility Notes

There is a page dedicated to compatibility notes between Maven 2 and Maven 3. This should be considered required reading for anyone making the switch, as it highlights some changes that you may need to adjust your projects or environment for. In most cases there’ll be no major issues, and only some quick fixes. In my opinion, the key ones to keep an eye on:

  • Stricter POM validation – many projects will need to quickly tighten up their POMs to get running
  • Site plugin – if you’re using this for reporting, you may have work to do to get the same results
  • Metadata updates – Maven 3 checks remote repositories less often in most cases. Intermittent remote failures can be cached for a period of time – so check error messages carefully
  • Plugin compatibility matrix – check this for any plugins you’re using that might not be updated yet

Watch the Start of the Build

As mentioned above, POM validation is stricter and you may see a few failures on some projects that need updating. A much larger number of projects will probably see warnings about unrecommended behaviour or deprecated features. Watch the start of your builds carefully on the first run of a project for any warnings, and take care of the reported issues as soon as you can.

Make Switching Easy

I highly recommend a script such as the one attached to MNG-2730 to make it easy to switch between Maven versions. This has always been quite useful for adopting new releases, but even more so in this case as you may on rare occasions need to drop back to Maven 2.2.1 for a particular project.

A Few Words

I’ll admit there were long periods of time where I thought this release would never happen. Particular congratulations go to Benjamin for his effort over the last year and a bit to pick it up and methodically drive it home – I’ve been there before and I know that it is full of both fun and frustration!

Implementation of parallel builds was also a big job. I recall Dan hacking away at it last ApacheCon, and from there Kristian put in a huge effort to get a production-ready implementation and work through nasty thread safety issues in some plugins and components. I hope this is something that gains more traction going forward.

It’s also worth acknowledging the guys plugging away at getting the Site plugin infrastructure back in place – Olivier, HervĂ©, and Dennis in particular.

And congrats to all the Maven developers and contributors that had a hand in this release, and all those that got Maven where it is today. Hopefully more great things to come, and perhaps a little faster next time! 🙂

Register for Training by Oct 13 and Receive Maven Book Free

As I posted earlier this week, I will be running a full day Maven training course at ApacheCon on November 1.

I’ve now been able to confirm that I can offer a free copy of the book Apache Maven 2: Effective Implementation to everyone that completes the course. However, to ensure the right amount can be ordered and shipped in time, you must have registered before October 13.

There are still discounted rates for the training and conference for today, so all the more reason to register as soon as possible!

Apache Maven Training in Atlanta: Nov 1, 2010

ApacheCon is fast approaching! If you’re coming to the conference, or anywhere near Atlanta, then I hope you’ll take a look at the training course I’m running there this year, Apache Maven: Effective Implementation:

This training course is designed to go beyond your current assumptions about Apache Maven and learn how to use it most effectively to manage the build and development process. Whether you are a novice aiming to start on the right foot, or a regular user looking to get more out of Maven and avoid common frustrations, this course will give you the skills you need to apply to your own projects.

By working through a series of short exercises applied to a complete sample application, you will learn how to apply common patterns in Maven builds to achieve the desired outcome, while learning best practices and common pitfalls along the way.

Topics include installation, Maven fundamentals, working efficiently with multi-module projects, simplifying the POM, the best general purpose plugins that you should know about, integration and functional testing, when (and when not) to use Maven sites and reporting, the role of profiles, snapshots and dependency management, repository management, and performing releases.

The content is updated for the latest improvements in Maven 2.2 and Maven 3, and will cater to your preference of development environment.

Time is reserved for sharing specific situations that attendees have encountered in existing projects. A laptop already configured for Java development is essential.

This year gives us the unique opportunity to get a first look at a GA release of Maven 3.0 in addition to building on a comprehensive example of how to use Maven effectively in your projects and with your teams.

Early bird prices end this Friday, October 8. Register for Apache Maven: Effective Implementation now!

I’ll be at the conference all week, and as usual hope to catch up with users and contributors as much as possible. I’ll also be speaking – though surprisingly on a topic completely unrelated to Maven (possibly a first!).

Maven Release Plugin awaits your testing

Somewhat dwarfed by Benjamin sneaking in the Maven 3.0 release vote 15 minutes later, the Maven Release Plugin 2.1 is currently being voted on.

It includes a handful of changes, most notably MRELEASE-530 to work better with Git.

The release plugin has a history of being a bit fickle across releases, so if you’re using the latest version, please try it out!

The biggest task ahead for the plugin is a thorough cleansing of the JIRA project. Even a cursory glance shows a significant number of duplicate, outdated, or out of scope issues. Hopefully that is something to revisit beyond ApacheCon next month.