Dominic Mitchell wrote: > On 27 Jul 2009, at 21:56, Stephen Gregory wrote: > >> I just thought I'd throw this out there: >> If you want to see a great reason to use Maven, try making a Hudson >> plugin. http://wiki.hudson-ci.org/display/HUDSON/Plugin+tutorial >> Everything you need (dependencies, testing, sample code) is downloaded >> automatically and it just works. >> > > Hudson tends to work well with maven projects in general. > I love the way Hudson understand the upstream/downstream directions just from the Maven POMs.
I learned that Maven gets a lot easier to use if you go with a _lot_ of modules/projects. Everything that is a conceptual unit should have at least a module, if not a separate project. I have one that has only 5 SVGs in it -- these 5 SVGs are used in two spots and by having a separate module I can manage that as an explicit dependency. The overhead of a POM for that is minor, most of the metadata is in the parent POM, the module POM is tiny. If I should ever change these SVGs, my Hudson server will know what it needs to update just from the POMs. It can even aggregate test results along the dependencies, which is really useful if you put all the expensive tests into the top layer, above/downstream of your actual application. >> In my personal experience the tooling (specifically IDE integration) >> just recently got to the point where I can start using Maven for >> everything (thanks to Q4E now Eclipse IAM). Having a local proxy (I >> use Archiva) makes a huge difference for stability. Now the Maven >> pom.xml is now more of a lingua franca .project (or netbeans / >> intellij equivelant) than just a build system. >> > > I'll second that. m2eclipse 0.9.9 got a lot more usable for me. And > running nexus for a local proxy is a complete cinch. I've got it set > up locally on my laptop, which is great for working away from wifi. > > The native maven support in NetBeans 6.7 is good, but it still has one > drawback relative to m2eclipse. It doesn't recognise that a > dependency is already in the workspace, so you have to Build your > dependency first. > I agree. m2eclipse is fantastic: you just check out a Maven project with dependencies and lots of modules and m2eclipse and you have multiple full-blown Eclipse projects with correct interdependencies, sources and javadoc attached (needs checkboxes ticked in the config to be the default) and you can easily run Maven goals from within the IDE. Having a combo of Hudson and repository manager (we use Artifactory) adds value for managing the released versions -- prior to that we suffered from having to make sure all modules and projects have been installed in the proper versions. As long as every developer is using only snapshots it is all easy, but once you start having internal releases a repository (and manager) seems necessary. All in all I was reluctant to get into Maven and didn't like it at first. Once I learned that you want to create lots of little projects (at least one per existing artifact) it started to be fun. BTW: I also wrote a little MOJO for creating a properties file with Subversion information using SVNAnt. It fetches the highest revision number in a working copy and also checks if there are modified files. If someone is interested I'm happy to exchange experiences. My version works, but it's not 100% production quality and since I use SVNkit it suffers from the annoying SVN issues with different working copy versions. Source is here: http://metadata-net.svn.sourceforge.net/viewvc/metadata-net/shared/trunk/maven-svninfo-plugin/ Cheers, Peter --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/javaposse?hl=en -~----------~----~----~----~------~----~------~--~---
