Why does Netbeans delete my CVS folder when I do a clean?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Why does Netbeans delete my CVS folder when I do a clean?

TheKurgan
Everytime I do a clean and rebuild of my visual web project, Netbeans will delete the CVS folder.  CVS uses this folder to track changes so when Netbeans deletes this folder then the CVS repository can't track the changes in the build directory.  

I do not wish for this behavior.   Is there some way to tell Netbeans to not delete the CVS folder when doing a clean?  I tried a couple tricks with the build.xml script and got it to not delete the CVS folder itself but it will still delete the files in CVS folder. ( I did this using <delete dir="${build.dir}" defaultexcludes="no"/>)
Reply | Threaded
Open this post in threaded view
|

Re: Why does Netbeans delete my CVS folder when I do a clean?

TheKurgan
Fixed this by setting the defaultexcludes="yes".  Not sure why it is set to no by default.  Had to change it for every directory that ant is set to clean.

    <target depends="init" if="no.dist.ear.dir" name="deps-clean" unless="no.deps"/>
    <target depends="init" name="do-clean">
        <condition property="build.dir.to.clean" value="${build.web.dir}">
            <isset property="dist.ear.dir"/>
        </condition>
        <property name="build.dir.to.clean" value="${build.web.dir}"/>
        <delete includeEmptyDirs="true" quiet="true" defaultexcludes="yes">
            <fileset dir="${build.dir.to.clean}/WEB-INF/lib"/>
        </delete>
        <delete dir="${build.dir}" defaultexcludes="yes"/>
        <available file="${build.dir.to.clean}/WEB-INF/lib" property="status.clean-failed" type="dir"/>
        <delete dir="${dist.dir}" defaultexcludes="yes"/>
    </target>
    <target depends="do-clean" if="status.clean-failed" name="check-clean">
        <echo message="Warning: unable to delete some files in ${build.web.dir}/WEB-INF/lib - they are probably locked by the J2EE server. "/>
        <echo level="info" message="To delete all files undeploy the module from Server Registry in Runtime tab and then use Clean again."/>
    </target>
    <target name="-post-clean">
       
       
    </target>