Speeding up Ant release target for modules

Steven Yi <[email protected]>
Newsgroups gmane.comp.java.netbeans.modules.openide.devel
Message-ID <CANtcCs7BmF8zGNy5DL-icyCtjATSgmUdzvaCnNVUupA8DnKJUw@mail.gmail.com>
Hi All,

I'm not sure if this is something that's been mentioned already, but
for ant-based NB Platform builds, I updated some module's build.xml
files here to only copy modified files within release/ folders.  The
ant XML I used was:

    <target name="release" depends="files-init" if="has.release.dir">
        <mkdir dir="${cluster}"/>
        <copy todir="${cluster}">
            <fileset dir="${release.dir}">
                <patternset includes="${release.files}"/>
                <modified/>
            </fileset>
        </copy>
    </target>

    <target name="clean" depends="projectized-common.clean">
        <delete file="cache.properties"/>
    </target>

The addition of <modified/> does the tracking of file changes, and the
overriding of clean to delete cache.properties ensures that files will
be recopied into the cluster's build folder after a clean.

The issue I had is that for a few of my modules, I had a large amount
of files in the release/ folders (e.g., a user manual module that had
1000's of html and resource files, a Jython module that had the
expanded pythonLib that goes with jython, etc.).  Doing full builds
during develop was slowed down due to copying of files.  Using this
seems to speed things up here.

Anyways, hope that's useful!  If anyone sees an issue with this, I'd
welcome any feedback.

Thanks!
steven
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.