I don't see an inconsistency, but I might be misinterpreting this last
sentence. It seems to make sense to me that relative paths in a

I was really concerned with the inconsistency between project.xml and maven.xml


Oddly enough, the only call to File.isAbsolute in the maven source tree
is in the jxr plugin, where it does exactly this, with the comment:

<!-- XXX This is a dirty hack until the semantics of
pom.build.sourceDirectory are cleared up -->

:-)

That does seem odd :) But its right - the plugin shouldn't have to care, it should just get a File that works. Because Java doesn't want to chdir, setting all File objects to absolute by prepending ${basedir} makes sense (and ${basedir} should probably be put through a getAbsoluteFile() too).


Yeah, true. It's probably not possible to reliably identify relative
paths in maven.xml scripts. Not without making all the jelly tags aware
of basedir, anyway. That inconsistency is a bit of a pain. People are
going to have working maven.xml files that suddenly break when they run
them with a different working directory.

... unless they use basedir. Fair enough I guess?
One alternative, but its a bit dodgy, is to make sure all relative paths are done using File objects, and there is no other supposition of CWD, because then you can redefine the system property user.dir and File's start moving as though that is the base if you call getAbsolutePath - but I see this to be quite error prone :)


Thanks for your feedback. The more I think about it, I believe you are right - there should be no need for basedir in project.xml or project.properties or build.properties in a project directory.

Cheers,
Brett


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to