ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hill, Richard" <>
Subject How to get subproject file name from within the subproject?
Date Tue, 20 Jul 2004 19:32:30 GMT
ANT: 1.5.4
JDK: 1.4.2_05
I have a project that calls a subproject. For example:
<project name="TestProject" default="test">
    <target name="test">
      <ant antfile="TestFile.xml"/>
I would like to get the name of the subproject file (i.e. TestFile.xml)
from a target within the subproject itself. I've accomplished this
before using the optional 'script' task using something like: 
<target name="setupDirectories"> 
  <script language="javascript">
          file = new
MyTestFileProjectName.getProperty("ant.file") );
...but I am have heck of a time with the subproject finding the bsf.jar
and js.jar due to resource conflicts. 
Is there another, easier way to get the subproject file name from within
the subproject itself. 

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message