ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jackson, Paul R" <paul.r.jacks...@boeing.com>
Subject RE: fileset and filename under copy task
Date Thu, 22 Feb 2007 15:07:00 GMT
To all,

Thanks for your help everyone. I did finally get the jar target to work the way I wanted it
to, preserving the module name(top directory) in the jar files. Using...

    <target name="jars" >
        <jar jarfile="${libBuild.dir}/commonGUI.jar">
            <fileset dir="${build.classes.dir}" includes="commonGUI/**/*.class" />
        </jar>
        <jar jarfile="${libBuild.dir}/configuration.jar">
            <fileset dir="${build.classes.dir}" includes="configuration/**/*.class" />
        </jar>
    </target>  

Thanks again,
Paul

-----Original Message-----
From: Mathieu Champlon [mailto:m.champlon@free.fr] 
Sent: Wednesday, February 21, 2007 1:25 AM
To: Ant Users List
Subject: Re: fileset and filename under copy task

bill/wilandra a écrit :
> >From the examples in the 1.6.5 manual I would assume that the 
> >following
> should work. I did not try it.
>      <copy todir="${bin}">
>        <fileset dir="${src}">
>          <filename name="hibernate.cfg.xml"/>
>          <filename name="**/*.hbm.xml"/>
>          <filename name="**/*.html"/>
>        </fileset> 
>      </copy>
>
> HTH Bill

Hello,

Unfortunatly this won't work as a fileset behaves like an 'and' selector container.
Therefore quoting http://ant.apache.org/manual/CoreTypes/fileset.html : 
"If any of the selectors within the FileSet do not select the file, the file is not considered
part of the FileSet"


MAT.


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


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


Mime
View raw message