You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Ian Duggan <ia...@demandtec.com> on 2002/08/15 00:05:10 UTC
with multiple and a
I'm having trouble getting the <jar> task to do what I want. I am trying to
use named filesets as the <fileset> and <lib> elements of the <jar> task.
Several things aren't going as expected:
1) The <fileset> excludes aren't picked up. Everything under the <fileset> dir
is being picked up.
2) Only the first <lib> is being honored. The files in the second <lib>
fileset are not being picked up.
3) The <jar> task complains about the "web.xml" being in the fileset to jar,
though it is specifically excluded. I think this is a consequence of (1).
Here are the relevant targets and filesets:
<fileset id="files.war.dtapps"
dir="${build.web.dir}/dtapps">
<exclude name="**/*.java,**/*.class,**/WEB-INF/web.xml"/>
</fileset>
<!-- custom jars needed by wars -->
<fileset id="libfiles.demandtec.war"
dir="${build.lib.dir}">
<include name="${dtweb.jar.file}" />
<include name="${dtclient.jar.file}" />
</fileset>
<!-- standard jars needed by wars -->
<fileset id="libfiles.standard.war"
dir="${build.lib.dir}">
<include name="struts.jar" />
<include name="multipart.jar" />
</fileset>
<target name="war-dtapps" depends="compile-dtapps">
<war warfile="${build.archive.dir}/${dtapps.war.file}"
update="true"
manifest="${config.metadata.dir}/dtapps-manifest.mf"
webxml="${build.web.dir}/dtapps/WEB-INF/web.xml">
<fileset refid="files.war.dtapps"/>
<lib refid="libfiles.standard.war"/>
<lib refid="libfiles.demandtec.war"/>
</war>
</target>
-- Ian
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ian Duggan ian.duggan@demandtec.com http://www.demandtec.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DemandTec, Inc.
1 Circle Star Way Suite 200
San Carlos, CA 94070
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: with multiple and a
Posted by Jacob Kjome <ho...@visi.com>.
I believe that "exclude" is singular for a reason. It doesn't take a
list. Unless the stuff you are trying to exclude has commas in it, Ant is
doing exactly the right thing by not working with your last case.
Jake
At 03:33 PM 8/14/2002 -0700, you wrote:
>Thanks to all who watched the saga unfold. I have the answer. It seems that
>either of these works:
>
> <fileset id="files.war.dtapps"
> dir="${build.web.dir}/dtapps"
> excludes="**/*.java,**/*.class,**/WEB-INF/web.xml"/>
>
>or
>
> <fileset id="files.war.dtapps"
> dir="${build.web.dir}/dtapps">
> <exclude name="**/*.java"/>
> <exclude name="**/*.class"/>
> <exclude name="**/WEB-INF/web.xml"/>
> </fileset>
>
>but this doesn't.
>
> <fileset id="files.war.dtapps"
> dir="${build.web.dir}/dtapps">
> <exclude name="**/*.java,**/*.class,**/WEB-INF/web.xml"/>
> </fileset>
>
>Just some syntacitcal confusion, though I must admit it seems a bit nitpicky.
>
>-- Ian
>
>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>Ian Duggan ian.duggan@demandtec.com http://www.demandtec.com
>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>DemandTec, Inc.
>1 Circle Star Way Suite 200
>San Carlos, CA 94070
>
>
>
>--
>To unsubscribe, e-mail: <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: with multiple and a
Posted by Ian Duggan <ia...@demandtec.com>.
Thanks to all who watched the saga unfold. I have the answer. It seems that
either of these works:
<fileset id="files.war.dtapps"
dir="${build.web.dir}/dtapps"
excludes="**/*.java,**/*.class,**/WEB-INF/web.xml"/>
or
<fileset id="files.war.dtapps"
dir="${build.web.dir}/dtapps">
<exclude name="**/*.java"/>
<exclude name="**/*.class"/>
<exclude name="**/WEB-INF/web.xml"/>
</fileset>
but this doesn't.
<fileset id="files.war.dtapps"
dir="${build.web.dir}/dtapps">
<exclude name="**/*.java,**/*.class,**/WEB-INF/web.xml"/>
</fileset>
Just some syntacitcal confusion, though I must admit it seems a bit nitpicky.
-- Ian
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ian Duggan ian.duggan@demandtec.com http://www.demandtec.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DemandTec, Inc.
1 Circle Star Way Suite 200
San Carlos, CA 94070
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: with multiple and a
Posted by Ian Duggan <ia...@demandtec.com>.
> 2) Only the first <lib> is being honored. The files in the second <lib>
> fileset are not being picked up.
This was a typo in the build file and has been corrected. I still am having
problems with the "excludes" not being picked up.
--ian
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ian Duggan ian.duggan@demandtec.com http://www.demandtec.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DemandTec, Inc.
1 Circle Star Way Suite 200
San Carlos, CA 94070
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: with multiple and a
Posted by Ian Duggan <ia...@demandtec.com>.
Correction. I mean <war> where I say <jar> here...
On Wednesday 14 August 2002 3:05 pm, Ian Duggan wrote:
> I'm having trouble getting the <jar> task to do what I want. I am trying to
> use named filesets as the <fileset> and <lib> elements of the <jar> task.
> Several things aren't going as expected:
>
> 1) The <fileset> excludes aren't picked up. Everything under the <fileset>
> dir is being picked up.
>
> 2) Only the first <lib> is being honored. The files in the second <lib>
> fileset are not being picked up.
>
> 3) The <jar> task complains about the "web.xml" being in the fileset to
> jar, though it is specifically excluded. I think this is a consequence of
> (1).
>
> Here are the relevant targets and filesets:
>
> <fileset id="files.war.dtapps"
> dir="${build.web.dir}/dtapps">
> <exclude name="**/*.java,**/*.class,**/WEB-INF/web.xml"/>
> </fileset>
>
> <!-- custom jars needed by wars -->
> <fileset id="libfiles.demandtec.war"
> dir="${build.lib.dir}">
> <include name="${dtweb.jar.file}" />
> <include name="${dtclient.jar.file}" />
> </fileset>
>
> <!-- standard jars needed by wars -->
> <fileset id="libfiles.standard.war"
> dir="${build.lib.dir}">
> <include name="struts.jar" />
> <include name="multipart.jar" />
> </fileset>
>
>
> <target name="war-dtapps" depends="compile-dtapps">
> <war warfile="${build.archive.dir}/${dtapps.war.file}"
> update="true"
> manifest="${config.metadata.dir}/dtapps-manifest.mf"
> webxml="${build.web.dir}/dtapps/WEB-INF/web.xml">
> <fileset refid="files.war.dtapps"/>
> <lib refid="libfiles.standard.war"/>
> <lib refid="libfiles.demandtec.war"/>
> </war>
> </target>
>
> -- Ian
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Ian Duggan ian.duggan@demandtec.com http://www.demandtec.com
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> DemandTec, Inc.
> 1 Circle Star Way Suite 200
> San Carlos, CA 94070
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ian Duggan ian.duggan@demandtec.com http://www.demandtec.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DemandTec, Inc.
1 Circle Star Way Suite 200
San Carlos, CA 94070
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>