As described into question title, I've an Eclipse Java EE Web Application project. Into WebContent folder I've some files and subfolder in which there are .DS_store OsX system files that cause some problem because they are always included when I export into war file.
I know that there is a way for excluding a file or folder but only into src folder, not into WebContent!
Any ideas?
Regards
Why not remove the from (delete or just move to another folder) if they shouldnt be in your webcontent folder?
Otherwise you could use the Deployment Assembly settings. Open it from your project properties, and remove the top WebContent and add what you really want to get packaged.
Also you can exclude the files/folder by setting a resource filter. Add a filter... as shown below:
you can use war task of ant. say you located your ant build file directly inside your web-project then the following work for you which excludes folder .DS_store and all its contents from exported war file.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project basedir="." default="war" name="TestWeb">
<target description="export-war" name="war">
<war destfile="/home/guest/Desktop/TestWeb1.war" webxml="WebContent/WEB-INF/web.xml">
<fileset dir="WebContent">
<exclude name="**/.DS_store/**"/>
</fileset>
<classes dir="build" />
</war>
</target>
</project>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With