But shouldn't this probably be changed for future versions of Maven?
Subprojects should behave the same way if they are compiled separately
or all in a bunch via <modules> in a parent pom. I think this is a
pretty common problem. which should be addressed somehow, probably with
an optional fork="true" or something in the <modules> list. Otherwise
tests that *need* to use files must use absolute filenames instead of
relative ones or the tests will fail in any of the two call situations.
Absolute filenames, on the other hand, are a configuration nightmare
compared to the otherwise smooth working with maven.
We are currently using absolute filenames in our testcases because of
this and it's a real problem. Since the testdata is in a separate
location one can never be sure if the latest version of the testdata is
used by the tests since they are not contained in the SCM (actually,
they are contained but have to be copied manually to the absolute path
in case of a new version). This is an additional source for errors which
is quite unnecessary.
So if it's possible in any way please consider changing this behavior.
This change shouldn't break anything anyway since it's currently
impossible to depend on relative filenames in case of multi-module projects.
Thanks, Joern.
Brett Porter wrote:
No, this is as expected. user.dir is never changed.
- Brett
On 1/18/06, Joern Huxhorn <[EMAIL PROTECTED]> wrote:
Hi Joerg.
Hi Joern,
Joern Huxhorn wrote:
[snip]
Is this a bug or a feature? I expected the current dir (user.dir) to
change for every executed sub-module build.
Any ideas how I could solve this problem? Absolute filenames are not
really an option (that's my current workaround and it's a real
burden)
http://jira.codehaus.org/browse/MSUREFIRE-4
http://jira.codehaus.org/browse/MSUREFIRE-31
The upcoming or latest release should do it.
The latest release contains this.
- Jörg
I just updated to maven-2.0.2 and also did an mvn -U to make sure I'm
all up to date but mvn still seems to use the directory of the parent
pom as user.dir of the children. I didn't check out resources but my log
file of the tests still ends up in the main folder instead of the
modules sub-folder so I guess it's still not working as expected.
Joern.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]