ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dr_pompeii <dr_pomp...@yahoo.com>
Subject Re: [SEC=UNCLASSIFIED] war task add folders that be should avoid/ignore it
Date Wed, 07 Mar 2007 11:54:22 GMT

Hi steve 

thanks for the reply

well your way doesnt work, ;(

a friend help me, and this is the right solution
<exclude name="**/WEB-INF/src*/**"/>

anyway, thanks for your time

regards


Steve Loughran wrote:
> 
> dr_pompeii wrote:
>> Hi guys
>> 
>> i have a problem with ant [b]war[/b] task
>> my build.xml are located in
>> 
>> [code]
>> myapp
>> 	WEB-INF
>> 		build.xml
>> [/code]
>> 
>> this is my war task target
>> 
>> [code]
>> <target name="war-creatror">
>> 	<war basedir="${basedir}/../" destfile="myapp.war" webxml="web.xml" >
>> 		<fileset dir="${sourcedir}" >
>> 			<exclude name="**/*.java" />
>> 		</fileset>	
>> 	</war>
>> </target>
>> [/code]
>> 
>> where 
>> [b]<property name="sourcedir" value="${basedir}/src" />[/b]
>> 
>> well the weird part is that the war file [b]has include the src
>> folder!!!![/b]
>> thats mean
>> 
>> [code]
>> myapp.war
>> 	jsp
>> 	js
>> 	css
>> 	WEB-INF/
>> 		src <---- it shouldnt be there
>> 		...
>> 		more folders
>> 		...
>> [/code]
>> 
>> so please, what is wrong??????
>> according with 2 books my code shown should work
> 
> 1. I hope its not my book :)
> 
> 2.  the declaration
> 		<fileset dir="${sourcedir}" >
>   			<exclude name="**/*.java" />
>   		</fileset>	
> 
> Is pulling the src/ dir in, excluding all Java files. Presumably thats 
> where the jsp, js and cs files are coming from. If there is a src dir 
> under WEB-INF, that means you have a directory WEB-INF/src . Even if any 
> .java files under there are excluded, you will still probably get the 
> directory tree pulled in.
> 
> Try excluding it by name
> 		<fileset dir="${sourcedir}" >
>   			<exclude name="**/*.java" />
>   			<exclude name="WEB-INF/src" />
>   		</fileset>	
> 
> 
> 
> -steve
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/war-task-add-folders-that-be-should-avoid-ignore-it-tf3356653.html#a9351454
Sent from the Ant - Users mailing list archive at Nabble.com.


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


Mime
View raw message