You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Gregory Gimler <sh...@ll.mit.edu> on 2004/07/02 16:41:01 UTC

xmlproperty

Hello,

     I'm having a few issues when trying to make use of the xmlproperty 
feature in ant.  If I'm trying to put a reference to a classpath id I 
declare in the xml properties file it only seems to work if I have a 
specific <pathelement location="some/location/file"/>  nested.  If I try 
and use filesets with patterns it doesn't seem to work.  I noticed there 
weren't any examples of doing this with filesets on the ant manual but it 
said it could support path structures which I thought did include 
filesets?  Is there something I'm doing wrong here or is it just not 
supported?  If not, will it be supported?  Thanks.


										-Greg


Here are the relevant bits of my build:

build.xml

<project name="test" default="build">

        <xmlproperty file="properties.xml"
                            semanticAttributes="true"
	  	     keepRoot="false"/>

        <property name="srcdir" value="src"/>

      <target name="build" description="builds" >
          <javac srcdir="${srcdir}"
	          destdir="tmp">
              <classpath refid="run-time.classpath"/>
          </javac>
      </target>

</project>


properties.xml

   <root-tag>
     <version value="0.0.1"/>
     <build folder="lib">
       <classes id="lib.classes" location="lib"/>
       <reference refid="lib.classes"/>
     </build>
     <compile>
       <classpath pathid="compile.classpath">
         <pathelement location="${lib.classes}"/>
       </classpath>
     </compile>
	
     <run-time>
       <jars>*.jar</jars>
       <classpath pathid="run-time.classpath">
         <path refid="compile.classpath"/>	
		<pathelement location="lib/sample.jar"/>
		<!-- commented out right now but when used over above line id didn't work
		<fileset dir="lib">
                          <include name="**/*.jar"/>
                     </fileset>
		-->
       </classpath>
     </run-time>
   </root-tag>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org