I have a Dynamic Web Project in Eclipse. I can pack it to a WAR by right-clicking the project and choosing Export > WAR File. This creates the WAR file as expected and it works.
The problem is that Eclipse includes all the .svn folders of the project into the WAR file.
Is there a way to tell Eclipse to ignore .svn folders in the WAR exporting process? Or even better, tell it to ignore all files or folders that match some given regular expression?
Enter the project properties > Resource > Resource Filters > Add... > Exclude All > Files and Folders > All children (recursive) > Name matches *.svn > OK.
All .svn files and folders will be ignored, including when you export WAR files.
This seems to be documented in bug 182534 (2007! And still opened).
A custom separate ant script would be needed for now in order to build the exact war.
The internal "Export War" eclipse feature is not yet good enough for this scenario.
Installing the Subclipse plugin will make Eclipse aware of the SVN folders. This also includes ignoring them in a WAR export.
You could use an svn client to do the trick. For example TortoiseSVN let you export a directory without .svn folders and files.
So what you could do is:
This is not a good workaround but it saves you from checking every subfolder in your war to see if some .svn has not been removed.
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