Posted By

studioevoque on 10/16/10


svn ant netbeans

Versions (?)

Overriding Netbeans build.xml to address SVN folder clean-up

 / Published in: XML

This is used in the build.xml file generated by a Netbeans project, to override the default clean-up behaviour that deletes the 'build' and 'dist' folders. In case these folders are to be maintained in SVN, the following ensures that only the contents of the folders are cleared, leaving the SVN information intact.

Of course, the easiest option is to NOT check in the 'build' and 'dist' folders :)

  1. <!-- overrriding the clean-up code to not delete the build and dist folders since svn gets screwed up-->
  2. <target depends="init" name="-do-clean">
  4. <delete includeemptydirs="true">
  5. <fileset dir="${build.dir}">
  6. <include name="**"/>
  7. <exclude name="**/.svn/*"/>
  8. </fileset>
  9. </delete>
  11. <delete includeemptydirs="true" followsymlinks="false">
  12. <fileset dir="${dist.dir}">
  13. <include name="**"/>
  14. <exclude name="**/.svn/*"/>
  15. </fileset>
  16. </delete>
  18. </target>

Report this snippet  

You need to login to post a comment.