DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=37694>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=37694 Summary: Calling ant via java does not set "basedir" property Product: Ant Version: 1.6.5 Platform: PC OS/Version: other Status: NEW Severity: normal Priority: P2 Component: Core AssignedTo: dev@ant.apache.org ReportedBy: [EMAIL PROTECTED] I recently had reason to code something like this, in an ant build.xml file: <java classname="org.apache.tools.ant.launch.Launcher" fork="true" failonerror="true" dir="${sub.builddir}" timeout="4000000" > <classpath> <pathelement location="${env.ANT_HOME}/lib/ant-launcher.jar"/> </classpath> <arg value="-buildfile"/><arg file="${sub.buildfile}"/> <arg value="-Dthis=this"/> <arg value="-Dthat=that"/> <arg value="-Dthe.other=the.other"/> <arg value="${sub.target}"/> </java> The code at first did not work. My ant files have come to rely on the property "basedir". This was not set for ${sub.buildfile}. After I found that out, the fix was easy: <arg value="-Dbasedir=${sub.builddir}"/> In my opinion, the property "basedir" should always be set by the launcher. If that cannot be done for some reason, the second best solution is: The circumstances when it is set and when not should be documented. My suggestion: apache-ant-1.6.5/docs/manual/running.html#viajava -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]