ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Loughran <ste...@apache.org>
Subject Re: war task add folders that be should avoid/ignore it
Date Wed, 07 Mar 2007 10:24:24 GMT
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


Mime
View raw message