| From | Sent On | Attachments |
|---|---|---|
| Brett Porter | Feb 10, 2008 10:44 pm | |
| Tim O'Brien | Feb 10, 2008 10:58 pm | |
| Jason van Zyl | Feb 10, 2008 11:11 pm | |
| Brett Porter | Feb 10, 2008 11:12 pm | |
| Niall Pemberton | Feb 11, 2008 3:40 am | |
| Stephen Connolly | Feb 11, 2008 4:05 am | |
| Brett Porter | Feb 11, 2008 4:23 am | |
| Tomasz Pik | Feb 11, 2008 4:39 am | |
| Brian E. Fox | Feb 11, 2008 7:25 am | |
| Paul Benedict | Feb 11, 2008 8:08 am | |
| Jason van Zyl | Feb 11, 2008 8:33 am | |
| Brett Porter | Feb 11, 2008 1:50 pm | |
| Michael McCallum | Feb 11, 2008 3:53 pm | |
| Martijn Dashorst | Feb 11, 2008 4:16 pm | |
| Ralph Goers | Feb 11, 2008 7:21 pm | |
| Brett Porter | Feb 11, 2008 8:05 pm | |
| Michael McCallum | Feb 11, 2008 8:13 pm | |
| Shane Isbell | Feb 11, 2008 8:48 pm | |
| Jason van Zyl | Feb 11, 2008 9:21 pm | |
| Don Brown | Feb 11, 2008 9:22 pm | |
| Jason Dillon | Feb 11, 2008 9:33 pm | |
| Brett Porter | Feb 11, 2008 9:35 pm | |
| Don Brown | Feb 11, 2008 9:46 pm | |
| Brett Porter | Feb 11, 2008 9:50 pm | |
| Don Brown | Feb 11, 2008 10:01 pm | |
| Jason Dillon | Feb 11, 2008 10:03 pm | |
| Jason Dillon | Feb 11, 2008 10:04 pm | |
| Gilles Scokart | Feb 12, 2008 12:45 am | |
| nicolas de loof | Feb 12, 2008 12:51 am | |
| nicolas de loof | Feb 12, 2008 1:08 am | |
| Emmanuel Venisse | Feb 12, 2008 1:39 am | |
| Benjamin Bentmann | Feb 12, 2008 1:58 am | |
| Jörg Schaible | Feb 12, 2008 2:00 am | |
| Tim O'Brien | Feb 12, 2008 7:02 am | |
| nicolas de loof | Feb 12, 2008 7:17 am | |
| Tim O'Brien | Feb 12, 2008 7:28 am | |
| Jason van Zyl | Feb 12, 2008 7:32 am | |
| Gilles Scokart | Feb 12, 2008 7:33 am | |
| Brian E. Fox | Feb 12, 2008 7:39 am | |
| Tim O'Brien | Feb 12, 2008 7:55 am | |
| John Casey | Feb 12, 2008 8:25 am | |
| John Casey | Feb 12, 2008 8:30 am | |
| Tim O'Brien | Feb 12, 2008 8:36 am | |
| Brian E. Fox | Feb 12, 2008 9:12 am | |
| John Casey | Feb 12, 2008 9:36 am | |
| Michael McCallum | Feb 12, 2008 1:46 pm | |
| Jason van Zyl | Feb 12, 2008 2:57 pm | |
| Brett Porter | Feb 12, 2008 4:05 pm | |
| Brian E. Fox | Feb 12, 2008 4:19 pm | |
| Brett Porter | Feb 12, 2008 4:49 pm | |
| Brian E. Fox | Feb 12, 2008 10:06 pm | |
| Mark Struberg | Feb 13, 2008 12:15 am | |
| Brett Porter | Feb 13, 2008 12:26 am | |
| Paul Benedict | Feb 13, 2008 9:23 am | |
| Joerg Hohwiller | Feb 21, 2008 12:52 pm | |
| Milos Kleint | Feb 27, 2008 3:03 am | |
| Fabian Christ | Feb 27, 2008 3:50 am | |
| Arik Kfir | Feb 27, 2008 7:36 am |
| Subject: | An Attribute Based POM | |
|---|---|---|
| From: | Brett Porter (bre...@apache.org) | |
| Date: | Feb 10, 2008 10:44:49 pm | |
| List: | org.apache.maven.dev | |
Hi,
I've always wanted to see an attribute based POM, so based on Nicolas' suggestion I killed some time after waking up early this morning to do it.
JIRA: http://jira.codehaus.org/browse/MNG-3397
Here is a build to try:
http://people.apache.org/~brett/apache-maven-2.0.9-SNAPSHOT-terse-bin.tar.gz
and svn branch:
http://svn.apache.org/repos/asf/maven/components/branches/maven-2.0.x-terse
Here are two different files for comparison (it halved the size): http://svn.apache.org/viewvc/maven/archiva/trunk/pom.xml?content-type=text%2Fplain&view=co http://svn.apache.org/viewvc/maven/archiva/trunk/pom-4.1.0.xml?content-type=text%2Fplain&view=co
What I did is basically convert all the primitive types in the model to attributes. I think more could be done (flattening lists, doing the same for plugin configuration elements), but this gets a big win at least in the dependencies section for minimal work.
It should be completely backwards compatible. It detects v4.0.0 and reads it like it used to (then internally converts to the 4.1.0 Java model).
Here's some notes on the implementation so far (again, go easy, I just whipped this up today and it's not production ready): - I see this as a stepping stone to the final solution. I've said this before, but I think the POM should separate the build information from the project metadata (particularly that stored in the repository). I think we need to take baby steps towards that though. - this could feasibly be applied to the settings and profile files too. - I switched to StAX in the process. This is likely going to introduce some small quirks we need to iron out (like the hack I added to parse Trygve's name - why did we ever allow that!) I think ideally we'd use the Xpp3Reader for 4.0.0 and the StaxReader for 4.1.0 for best compatibility. This would also fix the problem in that I've just removed the Xpp3Reader and so some plugins may choke. I'm sure the release plugin won't be happy, for example. - There is probably a slight performance overhead in reading v4 POMs since it repopulates the model twice. I haven't measured it but if it's an issue we could optimise the reader/converter. It also adds about 200k to the maven-model JAR. - It is very close to detecting based on namespace so we could enforce the use of that instead.
Enjoy!
Cheers, Brett
-- Brett Porter bre...@apache.org http://blogs.exist.com/bporter/





