I'm having some difficulty creating unions of PropertySets for a series of subprojects in my build ... even when I copy the sample code directly from the Ant documentation! It just doesn't work. Am I doing something naively wrong, or is this a problem with Ant? A build script that demonstrates my problem is included below.

The only oddity worth noting is in the debug output. Just before creating each PropertySet reference, Ant outputs the following:

-----
Could not load a dependent class (com/sun/media/jai/codec/FileSeekableStream) for type image
Could not load a dependent class (com/jcraft/jsch/UserInfo) for type sshexec
Could not load a dependent class (com/jcraft/jsch/UserInfo) for type scp
Could not load class (org.apache.tools.ant.tasksdefs.cvslib.CvsVersion) for type cvsversion
-----


I'm using JDK 1.5.0 and Ant 1.6.2.

- Matthew

---------
build.xml
---------
<?xml version="1.0" encoding="UTF-8"?>

<project default="build">

  <property name="fooA" value="FooA"/>
  <property name="barB" value="BarB"/>

  <propertyset id="properties-starting-with-foo">
    <propertyref prefix="foo"/>
  </propertyset>
  <propertyset id="properties-starting-with-bar">
    <propertyref prefix="bar"/>
  </propertyset>
  <propertyset id="my-set">
    <propertyset refid="properties-starting-with-foo"/>
    <propertyset refid="properties-starting-with-bar"/>
  </propertyset>

  <target name="build">
    <ant dir="subproject" target="build" inheritAll="false">
      <propertyset refid="properties-starting-with-foo"/>
    </ant>
    <ant dir="subproject" target="build" inheritAll="false">
      <propertyset refid="properties-starting-with-bar"/>
    </ant>
    <ant dir="subproject" target="build" inheritAll="false">
      <propertyset refid="my-set"/>
    </ant>
  </target>

</project>

--------------------
subproject/build.xml
--------------------
<?xml version="1.0" encoding="UTF-8"?>

<project>

  <target name="build">
    <echo message="${fooA}"/>
    <echo message="${barB}"/>
  </target>

</project>

------
Output
------
$ ant
Buildfile: build.xml

build:

build:
     [echo] FooA
     [echo] ${barB}

build:
     [echo] ${fooA}
     [echo] BarB

build:
     [echo] ${fooA}
     [echo] ${barB}

BUILD SUCCESSFUL
Total time: 1 second

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



Reply via email to