Hi Stephen From: "Stephen Haberman" <[EMAIL PROTECTED]> > Cool, I like this. I was trying awhile ago to use the maven properties > (e.g. maven.id, maven.src.dir) in my build file, but of course they > weren't defined. If I understand this right, I could call a generic > maven target at the beginning of my build file to parse the project > descriptor and then the maven properties would be available for use.
Thats exactly right. Just so long as you use the new <maven-ant> task instead of <ant> and set the exportRefs="true" to export references and exportAll="true" to export properties (I'm following <ant>'s naming convention here where inheritAll="true" means inherit all propperties). If you want to see whats happening go into verbose mode and it lets you know all the references/properties its exporting. > This seems like a fairly general use item; is there any chance it could > be added to Ant itself? Perhaps the 1.5 version before it's released? I agree, it'd be a nice Ant addition. Peter Donald didn't think there was much chance adding it to Ant's core so we'll have to wait and see. I've submitted a similar patch to Ant as well, so who knows one day Ant 1.5 or 1.6 might have this patch applied; until then we can use it in Maven if we want. We can always deprecate Maven's <maven-ant> task one day if Ant's one is good enough. > I'm making a fairly na�ve guess, but couldn't this also solve all of the > duplication I see in the plugin files I browsed. There is a comment > about waiting until the references in version 1.5, but I guess I don't > fully understand the problem. I think so; certainly a common build.xml could be shared across all plugins to do common things, set common properties, validate the project etc. I think this patch would allow that to happen. There does seem to be a lot of cut'n'paste amonst the plugins; maybe this can help us refactor the cut'n'pastes out again. > Sorry if I made some wrong statements, I just wanted to comment that I > like the maven-ant task and got a little carried away. No I think you're right (or we're both wrong ;-). James _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
