NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Speeding up Ant release target for modules

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Platform Users
View previous topic :: View next topic  
Author Message
Steven Yi
Posted via mailing list.





PostPosted: Thu Jan 19, 2017 9:16 pm    Post subject: Speeding up Ant release target for modules Reply with quote

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
Back to top
Steven Yi
Posted via mailing list.





PostPosted: Thu Jan 19, 2017 9:28 pm    Post subject: Speeding up Ant release target for modules Reply with quote

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 <address-removed> wrote:
Quote:
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
Back to top
Enrico Scantamburlo
Posted via mailing list.





PostPosted: Fri Jan 20, 2017 9:42 pm    Post subject: Speeding up Ant release target for modules Reply with quote

thanks!


On Thu, Jan 19, 2017 at 10:27 PM, Steven Yi <address-removed ([email]address-removed[/email])> wrote:
Quote:
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 <address-removed ([email]address-removed[/email])> wrote:
Quote:
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


Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Platform Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo