Hi,

I need to start ANT from one OSGi Bundle in concurrent mode. The build xml files are passed as parameters to startAnt method of org.apache.tools.ant.Main. The first problem in that approach is that the current working directory (System.getProperty("user.dir")) must be different for each startAnt call. I need of that because the base directory in XML file in most of the cases is set relatively like ".", "..", "../x", etc. The second problem is when I set the CWD using System.getProperties().put("user.dir", newBaseDir) the File instance use the original CWD instead of the new value.

Do you have any idea how can I solve that? The smart way is if ANT implementation have helper method for CWD like getCurrentWorkingDirectory(). To solve the File problem new AntFile class which extends java.io.File can be used. Then this new AntFile class will check in the constructors for strings which starts with "." or ".." and will replace the value with instance CWD.


Regards,
Miro.

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

Reply via email to