Maven 1 has been causing me some pain on a project, so after much urging from Paul, I thought I'd take a quick look at Maven 2 and see if it would help.
Working through the Getting Started documentation, I'm less than impressed:
m2 archetype:create -DgroupId=uk.co.luminas.myapp -DartifactId=my-app
ls -R my-app
[.. snip ..]
my-app/src/main/java/com/mycompany/app:
App.java
Riiiight. Call me naive, but I'd expect to see my-app/src/main/java/uk/co/luminas/app. I know this is a 'technology preview' and I should expect some problems, but seriously - how could something as basic as this be wrong?
I could launch into a bile-filled rant about the state of maven, I could do the cluefull thing and dive into the maven community and file a bug report or help them fix the documentation to manage expectations properly. Actually though, I can't muster the enthusiasm to do either, and I just despair of the whole XML-obfuscated dependency-laden mind-numbingly complex absurdity that is modern-day project building tools. Maybe this was a mistake :-(
Posted by savs at August 19, 2005 2:16 PMgroupId is not a java package. Add -Dpackage=uk.co.luminas.myapp and it does what you want. It would be useful for package to default to being the groupId though - they are intentionally similar.
I'll cop the blame for the documentation not being clear enough. It makes an assumption of Maven1 knowledge at the moment, something that needs to be corrected before the release.
BTW, you'd have gotten a more prompt (and probably polite :) response from the Maven Users List.
Thanks for the response Brett. It would definitely make sense for package to default to groupId (or to simply stipulate package as a requirement in the getting started guide), since com/mycompany/app is going to be of negligible value to anyone.
Unfortunately, -Dpackage doesn't seem to work for me. More investigation required ...
I know I should have gone to the Maven Users list, but I got depressed when my first introduction to M2 was a failed user experience. List interaction shouldn't be a prerequisite for simply working through the "Getting Started" material. And I gotta have a place to rant and get it off my chest, before I humbly go and ask for help on the lists ;-)
Posted by: Andrew Savory at August 19, 2005 4:55 PM