Re: Speeding up Ant release target for modules
Steven Yi <[email protected]>
| Newsgroups | gmane.comp.java.netbeans.modules.openide.devel |
|---|---|
| Message-ID | <CANtcCs6QumnW0mj_VB_jwGW_vD6dj9GFm=oSRBs2Wu4Mr_fvuw@mail.gmail.com> |
One additional note, I just modified the use of <modified/> to be <modified update="true"/>. This is my first time using the modified tag but it seems like updating the cache in this instance is the right thing to do, and the default is false. On Thu, Jan 19, 2017 at 4:15 PM, Steven Yi <[email protected]> wrote: > 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