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


/ Published in: XML
Save to your folder(s)

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 :)


Copy this code and paste it in your HTML
  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">
  3.  
  4. <delete includeemptydirs="true">
  5. <fileset dir="${build.dir}">
  6. <include name="**"/>
  7. <exclude name="**/.svn/*"/>
  8. </fileset>
  9. </delete>
  10.  
  11. <delete includeemptydirs="true" followsymlinks="false">
  12. <fileset dir="${dist.dir}">
  13. <include name="**"/>
  14. <exclude name="**/.svn/*"/>
  15. </fileset>
  16. </delete>
  17.  
  18. </target>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.