Monday, November 10, 2008

Can't delete dist folder by using ant delete

In the Windows platform, seems like some program is using dist folder. But I can't find any except ant itself. The reason is

<path id="classpath.lib">
        <fileset refid="fileset.project.jar"/>
        <fileset refid="fileset.common.jar"/>
        <fileset dir="${root.dir}">
                 <include name="**/dist/*.jar" />
                <exclude name="${basedir}/dist/*.jar"/>
        </fileset>
  </path>

I defined classpath include all dist folder, even exclude the jar in current project, but ant still load this file which cause it can't delete dist folder.

I move the red portion into Javac task, then problem solved.

Post a Comment
Google+