开发者

a way to mask/remove .svn directories from war exported from eclipse [duplicate]

开发者 https://www.devze.com 2023-01-25 04:16 出处:网络
This question already has answers h开发者_运维知识库ere: Closed 11 years ago. Possible Duplicate:
This question already has answers h开发者_运维知识库ere: Closed 11 years ago.

Possible Duplicate:

Ignore SVN files when exporting a WAR file from Eclipse?

Using eclipse + tomcat.

When I export a tomcat war file for my project, the war file contains all the .svn directories. This is doubling the size of the war file and making deployments much longer than they need to be.

Is there a way to either mask these directories from the export mechanism (like a tar --exclude-from) or remove them from the war (tar --delete) ?


Go to 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.


Go to the project properties, Java Build Path, select the Source tab. For each source directory, there are Included: and Excluded: lines. Put a pattern into the exclusions (something like **/.svn).

What happens is that the builder copies anything that isn't a Java source file into the output folder as part of the build, unless it is in the exclusion list.


I usually build war's with ant even if I use Eclipse, have in mind that the svn specific directories is only part of it... you may find jar's you don't want in your application (shared JAR's for aexample) and ant has got a lot of fileset options to exclude files.

0

精彩评论

暂无评论...
验证码 换一张
取 消