Brett,
Thank you for your answer.
I use beta-10.
>Can you confirm that calling <ant /> changes ${basedir} itself? If so, file
a bug in JIRA - my guess is if this is happening, that they both use a
system property and ant scrogs maven's value.
that's the point, ${basedir} is not changed, but the CWD (current working
dir) of jvm is changed, so that when
in org.apache.velocity.texen.util.FileUtil creates new file with relative
path:
new File(relativePath);, the file is created not in the ${basedir}, but in
the dir from where the ant was invoked.
I would assume that after invocation of <ant:ant dir="somedir" /> jvm
returns to the ${basedir} and not stays in "somedir".
Thank you for you time.
P.S. Can any one explain this problem more understandable, so that it can be
added to jira.
--Alexey
-----Original Message-----
From: Brett Porter [mailto:[EMAIL PROTECTED]
Sent: Monday, October 06, 2003 3:37 PM
To: 'Maven Users List'
Subject: RE: Problem with Current Working Directory
What version of Maven? As of RC1, ${pom.build.sourceDirectory} is an
absolute path already.
Can you confirm that calling <ant /> changes ${basedir} itself? If so, file
a bug in JIRA - my guess is if this is happening, that they both use a
system property and ant scrogs maven's value.
- Brett
> -----Original Message-----
> From: Alexey Krasnoriadtsev
> [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, 7 October 2003 3:02 AM
> To: 'Maven Users List' (E-mail)
> Subject: Problem with Current Working Directory
>
>
>
> Hi All,
>
> I am not familiar with Maven internals, and was wondering if
> any one can explain me the issue (and possible solution) that
> I'm experiencing.
>
> After the invoking ant from a different directory, maven
> "stays" there. And when
> org.apache.velocity.texen.util.FileUtil is used with relative
> path, the file is created in the directory where ant was
> invoked from, not the ${basedir}
>
> Why is it a problem for me?
> Well, fileutil.file(fullSrcDir).getAbsolutePath() is used on
> checkstyle and PMD to determine the package names, and create
> broken links, because of the wrong directory. Here is some
> code to back it up:
>
> Maven.xml
> <snip>
> <preGoal name="site">
> <echo> src.ant.dir -- ${src.ant.dir} </echo>
> <ant antfile="build.xml" dir="${src.ant.dir}"
> target="clean" />
> <!-- <ant antfile="build.xml" dir="${src.ant.dir}"
> target="src-checkout" /> -->
> <echo>base ${basedir}</echo>
> <j:set var="fullSrcDir" value="${pom.build.sourceDirectory}"/>
> <echo>full ${fullSrcDir} </echo>
> <j:set var="srcDir"
> value="${fileutil.file(fullSrcDir).getAbsolutePath()}"/>
> <echo>srcDir = ${srcDir} </echo>
> <j:set var="curr" value="." />
> <j:set var="dir"
> value="${fileutil.file(curr).getAbsolutePath()}" />
> <echo>Current Dir -- ${dir} </echo>
>
> </preGoal>
>
> [echo] src.ant.dir -- /export/home/bp/projects/cs/src/ant
> [echo] base /export/home/bp/projects/cs
> [echo] full src/java
> [echo] srcDir = /export/home/bp/projects/cs/src/ant/src/java
> [echo] Current Dir -- /export/home/bp/projects/cs/src/ant/.
> [echo] Site
> BUILD SUCCESSFUL
>
>
>
> Alex Krasnoriadtsev
> Application Development
> 408-964-1564
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]