You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Farrukh Najmi <Fa...@Sun.COM> on 2004/07/05 15:41:08 UTC

FileSet with files from multiple directory trees?

Hello,

I am trying to define a set of jar files that will be used in defining a 
classpath as well as the lib tag for the war task.
In the past the pattern I used was to:

a) define a PatternSet

b) Use PatternSet to define Path

c) Use PatternSetto define lib tag of war:

Here is the example of above:

<patternset id="server.run.files">
    <patternset refid="server.compile.files"/>
    <include name="jaxm-runtime.jar.jar"/>
    <include name="saaj-impl.jar"/>

    .....
</patternset>
<path id="server.run.classpath">
    <fileset dir="${build.home}/lib">
        <patternset refid="server.run.files"/>
    </fileset>
</path>

  <target name="create.war.registry" depends="compile">
    <mkdir dir="${build.home}/org/freebxml/omar/server/interfaces/soap" />
    <war 
warfile="${build.home}/org/freebxml/omar/server/interfaces/soap/registryRaw.war"
         webxml="src/java/org/freebxml/omar/server/interfaces/soap/web.xml">
        <webinf dir="../ebxmlrr-spec/misc/3.0/services" 
includes="ebXMLRegistry*.wsdl"/>
        <webinf dir="src/java/org/freebxml/omar/server/interfaces/soap" 
includes="jaxrpc-ri.xml"/>
        <webinf 
dir="${build.home}/org/freebxml/omar/common/jaxrpc/registry/server" 
includes="model-wsdl-rpcenc.xml.gz" defaultexcludes="no"/>
       
        <lib dir="${build.home}/lib">
            <patternset refid="server.run.files"/>
        </lib>
        <classes dir="${build.home}/lib/classes">
            <include name="**/omar/common/**"/>
            <include name="**/omar/server/**"/>
        </classes>
    </war>

I now have a new situation....

My jars are coming from two different directory trees. So I changed 
above pattern to the following:

a) Got rid of the PatternSet

b) Defined Path using different FilSets

<path id="server.run.classpath">
  <path refid="jaxr.provider.compile.classpath"/>
  <fileset dir="${build.home}" includes="lib/jaxm-runtime.jar"/>
  <fileset dir="${jwsdp.home}" includes="saaj/lib/saaj-impl.jar"/>
</path>

I am now stuck at how to get the FileSet(s) for the lib tag of the war 
task.

The issues seem to be that FileSet is not hierarchical and cannot handle 
files from multiple directories.

Does anyone have any suggestions on how to handle this situation?

-- 
Regards,
Farrukh




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