NetBeans IDE
NetBeans Platform
Plugins
Docs & Support
Community
Partners
HOME
/ Bugzilla
[?]
|
New
|
Browse
|
Search
|
Reports
|
Help
|
Log In
Please use the Apache issue tracking system for new NetBeans issues (
https://issues.apache.org/jira/projects/NETBEANS0/issues
) !!
build override file to implement smart dependency checking. Import before build-impl.xml in all your non-leaf projects.
build-override.xml (text/xml), 4.55 KB, created by
parcellsharp
on 2009-02-12 16:00 UTC
(
hide
)
Description:
build override file to implement smart dependency checking. Import before build-impl.xml in all your non-leaf projects.
Filename:
MIME Type:
Creator:
parcellsharp
Created:
2009-02-12 16:00 UTC
Size:
4.55 KB
patch
obsolete
><?xml version="1.0" encoding="UTF-8"?> ><project name="BuildDepOverride" default="all-deps" basedir="."> > <description>Override for Netbeans' slow dependency stuff. > Written by Nathan Sharp in Feb 2009 > </description> > > <!-- Overriding the behavior from the build-impl. Netbeans dependencies are slow. See > http://www.netbeans.org/issues/show_bug.cgi?id=42683 > This is some fancy footwork to override that behavior. The first ant script that > gets called will not have a phx.buildlist set and will create an empty file. > Then, instead of the normal dependencies we search project.properties for the > dependencies and build our own custom on the fly ant script that calls the > dependency if it hasn't already been listed in the phx.buildlist file, listing > it in the file if it does call off. --> > <macrodef name="phx.newDeps"> > <attribute name="depName"/> > <sequential> > <echo message="Overridden deps-jar" /> > <loadproperties srcFile="${phx.@{depName}.buildlist}"/> > <!-- search the properties file for dependencies and build a target to call it on the fly --> > <loadfile srcFile="${basedir}/nbproject/project.properties" property="buildChainItems.@{depName}"> > <filterchain> > <linecontainsregexp> > <regexp pattern="^project\."/> > </linecontainsregexp> > <replaceregex pattern="^(.*)=(.*)$" replace='<target name="phxb.\1" unless="phxb.\1"><propertyfile file="__fnord__{phx.@{depName}.buildlist}"><entry key="phxb.\1" value="true"/></propertyfile><echo message="Calling dependency \1 for @{depName}"/><ant target="@{depName}" inheritall="false" antfile="${\1}/build.xml"/><loadproperties srcFile="__fnord__{phx.@{depName}.buildlist}"/></target>' flags="gi"/> > <!-- Some funny token replacement is going on in the above regex that I couldn't straighten out, so I write __fnord__ instead of $ and replace it here --> > <replaceregex pattern="__fnord__" replace="$" flags="gi"/> > </filterchain> > </loadfile> > <!-- search a second time and this time build the comma separated list of each project for the depends --> > <loadfile srcFile="${basedir}/nbproject/project.properties" property="buildChainItemsList.@{depName}"> > <filterchain> > <linecontainsregexp> > <regexp pattern="^project\."/> > </linecontainsregexp> > <replaceregex pattern="^(.*)=(.*)$" replace='phxb.\1,' flags="gi"/> > <striplinebreaks/> > </filterchain> > </loadfile> > <!-- write out the build file --> > <concat destfile="${build.dir}/deps.@{depName}.xml"><?xml version="1.0" encoding="UTF-8"?> > <project name="bogo" default="default" basedir="${basedir}"> > ${buildChainItems.@{depName}} > <target name="dummy"/> > <target name="all-deps" depends="${buildChainItemsList.@{depName}}dummy"/> > </project> > </concat> > <!-- call the temp build file --> > <ant target="all-deps" inheritall="true" antfile="${build.dir}/deps.@{depName}.xml"> > <!-- Pass this property down like this so that it forcibly stays for all sub-projects --> > <property name="phx.@{depName}.buildlist" value="${phx.@{depName}.buildlist}" /> > </ant> > </sequential> > </macrodef> > > <!-- if a build list hasn't been created, create it. Otherwise just use the existing one --> > <target name="getBuildListFile.clean" unless="phx.clean.buildlist"> > <property name="phx.clean.buildlist" value="${basedir}/${build.dir}/phx.clean.buildlist" /> > <echo>Creating build list ${phx.clean.buildlist}</echo> > <concat append="no" destfile="${phx.clean.buildlist}">#list of touched projects > </concat> > </target> > > <target name="deps-clean" depends="init,getBuildListFile.clean"> > <phx.newDeps depName="clean" /> > </target> > > <!-- if a build list hasn't been created, create it. Otherwise just use the existing one --> > <target name="getBuildListFile.jar" unless="phx.jar.buildlist"> > <property name="phx.jar.buildlist" value="${basedir}/${build.dir}/phx.jar.buildlist" /> > <echo>Creating build list ${phx.jar.buildlist}</echo> > <concat append="no" destfile="${phx.jar.buildlist}">#list of touched projects</concat> > </target> > > <target name="deps-jar" depends="init,getBuildListFile.jar"> > <phx.newDeps depName="jar" /> > </target> ></project>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
Attachments on
bug 42683
: 76925
SiteMap
About Us
Contact
Legal & Licences
By use of this website, you agree to the
NetBeans Policies and Terms of Use
. © 2014, Oracle Corporation and/or its affiliates. Sponsored by