ebarboni commented on a change in pull request #2421:
URL: https://github.com/apache/netbeans/pull/2421#discussion_r500437669
##########
File path: nbbuild/build.xml
##########
@@ -109,48 +109,59 @@
<zipfileset dir="${nb_all}/nbbuild" includes="notice-stub.txt"
fullpath="META-INF/NOTICE"/>
</jar>
<taskdef name="createlicensesummary"
classname="org.netbeans.nbbuild.extlibs.CreateLicenseSummary"
classpath="${nbantext.jar}"/>
- <!-- get all json info we have on apache gitbox -->
+
+ <!-- prepare task to create properties files-->
+ <taskdef name="releasejson"
classname="org.netbeans.nbbuild.ReleaseJsonProperties" >
+ <classpath>
+ <pathelement location="${nbantext.jar}"/>
+ <fileset dir="${nb_all}/nbbuild/external">
+ <include name="json*.jar"/>
+ </fileset>
+ </classpath>
+ </taskdef>
+ <!-- task to alter cluster definition for javadoc -->
+ <taskdef name="setjavadoc"
classname="org.netbeans.nbbuild.SetApidocClustersConfig"
classpath="${nbantext.jar}"/>
+
+ <antcall target="getjsonfile" />
+ <!-- get branches and git information as previous not overrided this will
take new-->
+ <antcall target="getgitinformation" />
+
+ <echo message="Building branch: ${metabuild.branch}"/>
+ <property name="releasejson"
value="${nb_all}/nbbuild/build/netbeansrelease.json"/>
+ <property name="xmlrelease"
value="${nb_all}/nbbuild/build/netbeansrelease.xml"/>
+ <property name="propertiesrelease"
value="${nb_all}/nbbuild/build/netbeansrelease.properties"/>
+ <property file="${nb_all}/nbbuild/build/gitinfo.properties"/>
+ <property file="${nb_all}/nbbuild/build/netbeansrelease.properties"/>
+ <releasejson file="${releasejson}" xmloutput="${xmlrelease}"
propertiesoutput="${propertiesrelease}" branch="${metabuild.branch}"
hash="${metabuild.hash}"/>
+ <!-- javadoc content filtering -->
+
+ <setjavadoc branch="${metabuild.branch}"/>
+ </target>
+ <target name="getjsonfile">
+ <!-- copy all related release properties -->
+ <copy file="${nb_all}/nbbuild/netbeansrelease.json"
tofile="${nb_all}/nbbuild/build/netbeansrelease.json" failonerror="false"/>
+ <!-- read info from gitinfo.properties , if present in source bundle copy
gitinfo-->
+ <copy file="${nb_all}/nbbuild/gitinfo.properties"
tofile="${nb_all}/nbbuild/build/gitinfo.properties" failonerror="false"/>
+ <copy file="${nb_all}/nbbuild/netbeansrelease.properties"
tofile="${nb_all}/nbbuild/build/netbeansrelease.properties"
failonerror="false"/>
Review comment:
I tried not duplicating.
##########
File path: nbbuild/build.xml
##########
@@ -141,7 +119,49 @@
</fileset>
</classpath>
</taskdef>
+ <!-- task to alter cluster definition for javadoc -->
+ <taskdef name="setjavadoc"
classname="org.netbeans.nbbuild.SetApidocClustersConfig"
classpath="${nbantext.jar}"/>
+
+ <antcall target="getjsonfile" />
+ <!-- get branches and git information as previous not overrided this will
take new-->
+ <antcall target="getgitinformation" />
+
+ <echo message="Building branch: ${metabuild.branch}"/>
+ <property name="releasejson"
value="${nb_all}/nbbuild/build/netbeansrelease.json"/>
+ <property name="xmlrelease"
value="${nb_all}/nbbuild/build/netbeansrelease.xml"/>
+ <property name="propertiesrelease"
value="${nb_all}/nbbuild/build/netbeansrelease.properties"/>
+ <property file="${nb_all}/nbbuild/build/gitinfo.properties"/>
+ <property file="${nb_all}/nbbuild/build/netbeansrelease.properties"/>
<releasejson file="${releasejson}" xmloutput="${xmlrelease}"
propertiesoutput="${propertiesrelease}" branch="${metabuild.branch}"
hash="${metabuild.hash}"/>
+ <!-- javadoc content filtering -->
+
+ <setjavadoc branch="${metabuild.branch}"/>
+ </target>
+ <target name="getjsonfile">
+ <!-- copy all related release properties -->
+ <copy file="${nb_all}/nbbuild/netbeansrelease.json"
tofile="${nb_all}/nbbuild/build/netbeansrelease.json" failonerror="false"/>
+ <!-- read info from gitinfo.properties , if present in source bundle copy
gitinfo-->
+ <copy file="${nb_all}/nbbuild/gitinfo.properties"
tofile="${nb_all}/nbbuild/build/gitinfo.properties" failonerror="false"/>
+ <copy file="${nb_all}/nbbuild/netbeansrelease.properties"
tofile="${nb_all}/nbbuild/build/netbeansrelease.properties"
failonerror="false"/>
+
+ <property name="metabuild.releasejson"
value="${nb_all}/nbbuild/build/netbeansrelease.json"/>
+ <!-- get all json info we have on apache gitbox -->
+ <condition property="metabuild.jsonurl"
value="https://gitbox.apache.org/repos/asf?p=netbeans-jenkins-lib.git;a=blob_plain;f=meta/netbeansrelease.json">
+ <not>
+ <isset property="metabuild.jsonurl"/>
+ </not>
+ </condition>
+ <condition property="needjsondownload" value="true" else="false">
+ <not>
+ <available file="${nb_all}/nbbuild/build/netbeansrelease.json" />
+ </not>
+ </condition>
+ <sequential if:true="${needjsondownload}" >
+ <configureproxy connectTo="${metabuild.jsonurl}"
hostProperty="proxyHost" portProperty="proxyPort"/>
+ <setproxy proxyhost="${proxyHost}" proxyPort="${proxyPort}"/>
+ <get dest="${metabuild.releasejson}" skipexisting="false"
src="${metabuild.jsonurl}" />
+ <copy file="${metabuild.releasejson}"
tofile="${nb_all}/nbbuild/netbeansrelease.json" />
Review comment:
may still need polish but caching by default is not hurting for me.
Implemented 2 explicit target by the way.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists