ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Narayanan, Gopalakrishnan" <gna...@exchange.ml.com>
Subject RE: Multiple selectors in a fileset
Date Fri, 08 Nov 2002 01:06:55 GMT
Thanks for the response .
Well,let me explain my requirement in detail.

Certain packages in the java code need to go in to certain jar files and hence they need to
be omitted from the other jar files.So I started out by defining selectors like this.

	<selector id="project.selector.dms.classes" >
			<filename name="**/dms/**"/>
			<filename name="**/util/**" />
	</selector>

What I was missing here is the fact that the multiple <filename> tags need to be nested
with selector containers(<and> <or> etc.).I corrected it by enclosing the <filename>
tags in a <or> container.So
the correct peice of code would be 
	
	<selector id="project.selector.dms.classes" >
		<or>
			<filename name="**/dms/**"/>
			<filename name="**/util/**" />
		</or>
	</selector>

-----Original Message-----
From: Bruce Atherton [mailto:bruce@callenish.com]
Sent: Thursday, November 07, 2002 7:17 PM
To: Ant Users List
Subject: Re: Multiple selectors in a fileset


At 05:13 PM 11/6/2002 -0500, Narayanan, Gopalakrishnan wrote:
>I have the following script which creates a jar file including a set of 
>files.But the same set of files needs to be excluded in another jar 
>file.So, I thought it would be a better option to specify
>the criteria as a selector .
>
>         <selector id="docBANK.selector.servlet.classes" >
>                 <filename name="**/servlet/**" />
>         </selector>
>
>         <target name="generateAppJars" >
>                 <jar 
> destfile="${proj.java.library.dir}/${proj.MLDMS.jar.name}">
>                                 <fileset 
> dir="${proj.working_folder}/ejb-temp/classes" 
> includes="**/*.class">
>                                                 <selector 
> refid="proj.selector.dms.classes"/>
>                                 </fileset>
>                 </jar>
>
>         </target>
>
>But this keeps throwing an error "One and only one selector is allowed 
>within the <select> tag".Any thoughts?

Was this snippet taken directly out of your build? Notice that the selector 
id "docBANK.selector.servlet.classes" does not match the refid 
"proj.selector.dms.classes". I'm not sure that is related to the problem, 
but perhaps you could check it before I start trying to reproduce.

BTW, this also shows a bug in the error message - <select> is the wrong tag 
name. I'll fix this in any case.



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



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


Mime
View raw message