XML   18

ApproveFalcon.xml

Guest on 24th June 2022 02:47:37 AM

  1. <!--
  2.  
  3.  Licensed to the Apache Software Foundation (ASF) under one or more
  4.  contributor license agreements.  See the NOTICE file distributed with
  5.  this work for additional information regarding copyright ownership.
  6.  The ASF licenses this file to You under the Apache License, Version 2.0
  7.  (the "License"); you may not use this file except in compliance with
  8.  the License.  You may obtain a copy of the License at
  9.  
  10.      http://www.apache.org/licenses/LICENSE-2.0
  11.  
  12.  Unless required by applicable law or agreed to in writing, software
  13.  distributed under the License is distributed on an "AS IS" BASIS,
  14.  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15.  See the License for the specific language governing permissions and
  16.  limitations under the License.
  17.  
  18. -->
  19. <project name="ApproveApacheFlexFalcon" default="main" basedir=".">
  20. <!--  Required for OSX 10.6 / Snow Leopard Performance.  -->
  21. <!--  Java 7 on Mac requires OSX 10.7.3 or higher and is 64-bit only  -->
  22. <!--  local.d32 is set/used in build.properties so this needs to be done first.  -->
  23. <condition property="local.d32" value="-d32">
  24. <and>
  25. <os family="windows"/>
  26. <equals arg1="${sun.arch.data.model}" arg2="64"/>
  27. <equals arg1="${os.arch}" arg2="x86_64"/>
  28. <equals arg1="${ant.java.version}" arg2="1.6"/>
  29. </and>
  30. </condition>
  31. <condition property="isMac" value="mac">
  32. <os family="mac"/>
  33. </condition>
  34. <condition property="isWindows" value="windows">
  35. <os family="windows"/>
  36. </condition>
  37. <condition property="isLinux" value="linux">
  38. <and>
  39. <os family="unix"/>
  40. <not>
  41. <isset property="isMac"/>
  42. </not>
  43. </and>
  44. </condition>
  45. <condition property="package.suffix" value="zip">
  46. <os family="windows"/>
  47. </condition>
  48. <property name="package.suffix" value="tar.gz"/>
  49. <property name="src.rat.report" value="${basedir}/rat-report-src.txt"/>
  50. <property name="bin.rat.report" value="${basedir}/rat-report-bin.txt"/>
  51. <property name="apache.rat.jar" value="apache-rat-0.11.jar"/>
  52. <property name="apache.rat.tasks.jar" value="apache-rat-tasks-0.11.jar"/>
  53. <property name="apache.rat.url" value="http://search.maven.org/remotecontent?filepath=org/apache/rat/apache-rat/0.11"/>
  54. <property name="apache.rat.tasks.url" value="http://search.maven.org/remotecontent?filepath=org/apache/rat/apache-rat-tasks/0.11"/>
  55. <property file="${basedir}/approvefalcon.properties"/>
  56. <property name="mac.text.display" value="cat"/>
  57. <property name="win.text.display" value="type"/>
  58. <property name="linux.text.display" value="cat"/>
  59. <property environment="env"/>
  60. <property name="build.target" value="main"/>
  61. <condition property="do.copy.downloads">
  62. <isset property="download.cache.dir"/>
  63. </condition>
  64. <fail message="The ANT_HOME environment variable is not set." unless="env.ANT_HOME"/>
  65. <available file="${env.AIR_HOME}" type="dir" property="AIR_HOME" value="${env.AIR_HOME}"/>
  66. <fail message="The AIR_HOME property is not set in environment or command-line." unless="AIR_HOME"/>
  67. <available file="${env.PLAYERGLOBAL_HOME}" type="dir" property="PLAYERGLOBAL_HOME" value="${env.PLAYERGLOBAL_HOME}"/>
  68. <fail message="The PLAYERGLOBAL_HOME property is not set in environment or command-line." unless="PLAYERGLOBAL_HOME"/>
  69. <available file="${env.FLASHPLAYER_DEBUGGER}" type="dir" property="FLASHPLAYER_DEBUGGER" value="${env.FLASHPLAYER_DEBUGGER}"/>
  70. <available file="${env.FLASHPLAYER_DEBUGGER}" type="file" property="FLASHPLAYER_DEBUGGER" value="${env.FLASHPLAYER_DEBUGGER}"/>
  71. <fail message="The FLASHPLAYER_DEBUGGER property is not set in environment or command-line." unless="FLASHPLAYER_DEBUGGER"/>
  72. <available file="${env.ANT_HOME}/lib/${apache.rat.jar}" type="file" property="apache.rat.found"/>
  73. <available file="${env.ANT_HOME}/lib/${apache.rat.tasks.jar}" type="file" property="apache.rat.tasks.found"/>
  74. <fail message="The release version is not set. Specify -Drelease.version=<release version (e.g. 3.1, 3.2, etc)>" unless="release.version"/>
  75. <condition property="package.url.path" value="http://apacheflexbuild.cloudapp.net:8080/job/flex-falcon/lastSuccessfulBuild/artifact/out">
  76. <not>
  77. <isset property="rc"/>
  78. </not>
  79. </condition>
  80. <condition property="bin.package.url.path" value="${package.url.path}">
  81. <not>
  82. <isset property="rc"/>
  83. </not>
  84. </condition>
  85. <property name="package.url.path" value="https://dist.apache.org/repos/dist/dev/flex/falcon/${release.version}/rc${rc}"/>
  86. <property name="src.package.url.path" value="${package.url.path}"/>
  87. <property name="bin.package.url.path" value="${package.url.path}/binaries"/>
  88. <property name="src.package.url.name" value="apache-flex-falconjx-${release.version}-src"/>
  89. <property name="bin.package.url.name" value="apache-flex-falconjx-${release.version}-bin"/>
  90. <condition property="zip.package">
  91. <equals arg1="zip" arg2="${package.suffix}"/>
  92. </condition>
  93. <target name="display-text-mac" if="isMac">
  94. <echo>========================= Begin ${file} ==============================</echo>
  95. <exec executable="${mac.text.display}">
  96. <arg value="${file}"/>
  97. </exec>
  98. <echo>========================= End ${file} ==============================</echo>
  99. </target>
  100. <target name="display-text-win" if="isWindows">
  101. <pathconvert targetos="windows" property="winfile">
  102. <path path="${file}"/>
  103. </pathconvert>
  104. <echo>========================= Begin ${winfile} ==============================</echo>
  105. <exec executable="cmd.exe">
  106. <arg value="/c"/>
  107. <arg value="${win.text.display}"/>
  108. <arg value="${winfile}"/>
  109. </exec>
  110. <echo>========================= End ${winfile} ==============================</echo>
  111. </target>
  112. <target name="display-text-linux" if="isLinux">
  113. <echo>========================= Begin ${file} ==============================</echo>
  114. <exec executable="${linux.text.display}">
  115. <arg value="${file}"/>
  116. </exec>
  117. <echo>========================= End ${file} ==============================</echo>
  118. </target>
  119. <target name="install-rat" depends="install-rat.jar,install-rat.tasks.jar"/>
  120. <target name="install-rat.jar" unless="apache.rat.found">
  121. <get src="${apache.rat.url}/${apache.rat.jar}" dest="${env.ANT_HOME}/lib/${apache.rat.jar}"/>
  122. </target>
  123. <target name="install-rat.tasks.jar" unless="apache.rat.tasks.found">
  124. <get src="${apache.rat.tasks.url}/${apache.rat.tasks.jar}" dest="${env.ANT_HOME}/lib/${apache.rat.tasks.jar}"/>
  125. </target>
  126. <target name="rat-taskdef" description="Rat taskdef">
  127. <typedef resource="org/apache/rat/anttasks/antlib.xml" uri="antlib:org.apache.rat.anttasks" classpathref="anttask.classpath"/>
  128. </target>
  129. <target name="main" depends="write-out-jars-list,install-rat,download,check-sigs,uncompress,rat-check,examine-jars,check-notices,build,approve" description="Perform required release approval steps"> </target>
  130. <target name="main-no-download" depends="write-out-jars-list,install-rat,check-sigs,uncompress,rat-check,examine-jars,check-notices,build,approve" description="Perform required release approval steps"> </target>
  131. <target name="test">
  132. <echo>${rat.report}.bin.txt</echo>
  133. <replaceregexp file="${rat.report}.bin.txt" match="..AL.*" replace="" byline="true"/>
  134. </target>
  135. <target name="write-out-jars-list">
  136. <delete file="jars.txt"/>
  137. <!--  this is a comma-delimited, no spaces, no-line-breaks list used to decide which jars
  138.         to skip in the rat-check of the binaries and which jars to examine before approval  -->
  139. <property name="jars-list" value="compiler/generated/dist/sdk/ant/lib/falcon-flexTasks.jar,compiler/generated/dist/sdk/lib/compc.jar,compiler/generated/dist/sdk/lib/compiler.jar,compiler/generated/dist/sdk/lib/falcon-asc.jar,compiler/generated/dist/sdk/lib/falcon-compc.jar,compiler/generated/dist/sdk/lib/falcon-flexTasks.jar,compiler/generated/dist/sdk/lib/falcon-mxmlc.jar,compiler/generated/dist/sdk/lib/falcon-optimizer.jar,compiler/generated/dist/sdk/lib/falcon-swfdump.jar,compiler/generated/dist/sdk/lib/fdb.jar,compiler/generated/dist/sdk/lib/flex-compiler-oem.jar,compiler/generated/dist/sdk/lib/swfutils.jar,js/lib/compc.jar,js/lib/externc.jar,js/lib/jsc.jar,js/lib/mxmlc.jar"/>
  140. <echo file="${basedir}/jars.txt" message="${jars-list}"/>
  141. <echo file="${basedir}/jarexcludes.txt" message="${jars-list}"/>
  142. <replaceregexp file="${basedir}/jarexcludes.txt" match="," flags="g" replace="${line.separator}"/>
  143. </target>
  144. <target name="display-text">
  145. <antcall target="display-text-mac"/>
  146. <antcall target="display-text-win"/>
  147. <antcall target="display-text-linux"/>
  148. </target>
  149. <target name="display-text-test">
  150. <antcall target="display-text">
  151. <param name="file" value="${basedir}/rat-report.txt"/>
  152. </antcall>
  153. </target>
  154. <target name="download" description="download the release package">
  155. <get src="${src.package.url.path}/${src.package.url.name}.${package.suffix}" dest="${basedir}/${src.package.url.name}.${package.suffix}"/>
  156. <get src="${src.package.url.path}/${src.package.url.name}.${package.suffix}.md5" dest="${basedir}/${src.package.url.name}.${package.suffix}.md5"/>
  157. <get src="${bin.package.url.path}/${bin.package.url.name}.${package.suffix}" dest="${basedir}/${bin.package.url.name}.${package.suffix}"/>
  158. <get src="${bin.package.url.path}/${bin.package.url.name}.${package.suffix}.md5" dest="${basedir}/${bin.package.url.name}.${package.suffix}.md5"/>
  159. <antcall target="asc_get"/>
  160. </target>
  161. <target name="asc_get" if="rc">
  162. <get src="${src.package.url.path}/${src.package.url.name}.${package.suffix}.asc" dest="${basedir}/${src.package.url.name}.${package.suffix}.asc"/>
  163. <get src="${bin.package.url.path}/${bin.package.url.name}.${package.suffix}.asc" dest="${basedir}/${bin.package.url.name}.${package.suffix}.asc"/>
  164. </target>
  165. <target name="check-sigs" description="check md5 and gpg sigs">
  166. <replace file="${basedir}/${src.package.url.name}.${package.suffix}.md5" token=" "/>
  167. <checksum file="${basedir}/${src.package.url.name}.${package.suffix}" algorithm="md5" verifyproperty="src.md5.ok"/>
  168. <condition property="SourceMD5Invalid">
  169. <not>
  170. <equals arg1="${src.md5.ok}" arg2="true"/>
  171. </not>
  172. </condition>
  173. <fail message="Source Package MD5 checksum did not match" if="SourceMD5Invalid"/>
  174. <replace file="${basedir}/${bin.package.url.name}.${package.suffix}.md5" token=" "/>
  175. <checksum file="${basedir}/${bin.package.url.name}.${package.suffix}" algorithm="md5" verifyproperty="bin.md5.ok"/>
  176. <condition property="BinaryMD5Invalid">
  177. <not>
  178. <equals arg1="${bin.md5.ok}" arg2="true"/>
  179. </not>
  180. </condition>
  181. <fail message="Binary Package MD5 checksum did not match" if="BinaryMD5Invalid"/>
  182. <echo>rc is ${rc}</echo>
  183. <antcall target="gpg_check"/>
  184. </target>
  185. <target name="gpg_check" if="rc">
  186. <exec executable="gpg" failonerror="true">
  187. <arg value="--verify"/>
  188. <arg value="${basedir}/${src.package.url.name}.${package.suffix}.asc"/>
  189. <arg value="${basedir}/${src.package.url.name}.${package.suffix}"/>
  190. </exec>
  191. <exec executable="gpg" failonerror="true">
  192. <arg value="--verify"/>
  193. <arg value="${basedir}/${bin.package.url.name}.${package.suffix}.asc"/>
  194. <arg value="${basedir}/${bin.package.url.name}.${package.suffix}"/>
  195. </exec>
  196. </target>
  197. <target name="uncompress" depends="pre-clean, untar-file, unzip-file"/>
  198. <target name="pre-clean" description="remove old uncompressed package">
  199. <delete dir="${basedir}/${src.package.url.name}" failonerror="false"/>
  200. <delete dir="${basedir}/${bin.package.url.name}" failonerror="false"/>
  201. </target>
  202. <target name="untar-file" unless="zip.package" description="Untars zipFile">
  203. <untar src="${basedir}/${src.package.url.name}.${package.suffix}" dest="${basedir}" compression="gzip"/>
  204. <untar src="${basedir}/${bin.package.url.name}.${package.suffix}" dest="${basedir}" compression="gzip"/>
  205. </target>
  206. <target name="unzip-file" if="zip.package" description="Unzips zipFile">
  207. <unzip src="${basedir}/${src.package.url.name}.${package.suffix}" dest="${basedir}/${src.package.url.name}"/>
  208. <unzip src="${basedir}/${bin.package.url.name}.${package.suffix}" dest="${basedir}/${bin.package.url.name}"/>
  209. </target>
  210. <target name="rat-check">
  211. <echo message="Checking files at ${basedir}/${src.package.url.name}, report is ${src.rat.report}"/>
  212. <rat:report xmlns:rat="antlib:org.apache.rat.anttasks" reportFile="${src.rat.report}">
  213. <fileset dir="${basedir}/${src.package.url.name}">
  214. <!--  exclude media (png, gif, jpg, mp3, flv)  -->
  215. <exclude name="**/*.png"/>
  216. <exclude name="**/*.gif"/>
  217. <exclude name="**/*.jpg"/>
  218. <exclude name="**/*.mp3"/>
  219. <exclude name="**/*.flv"/>
  220. <exclude name="**/org.apache.flex.tools.FlexToolGroup"/>
  221. <exclude name="debugger/META-INF/MANIFEST.MF"/>
  222. <exclude name="RELEASE_NOTES_JX"/>
  223. <exclude name="LICENSE.jx.bin"/>
  224. <exclude name="NOTICE.jx"/>
  225. <exclude name="README_JX"/>
  226. <exclude name="NOTICE.base"/>
  227. <exclude name="NOTICE.fdb"/>
  228. <exclude name="NOTICE.oem"/>
  229. <exclude name="NOTICE.swfutils"/>
  230. </fileset>
  231. </rat:report>
  232. <antcall target="display-text">
  233. <param name="file" value="${src.rat.report}"/>
  234. </antcall>
  235. <input message="Check that there are no unknown or unapproved licenses or archives. Is it ok?" validargs="y,n" defaultvalue="y" addproperty="rat.src.license.ok"/>
  236. <echo>filtering out AL files to make it easier to see binary files</echo>
  237. <copy file="${src.rat.report}" tofile="${src.rat.report}.bin.txt"/>
  238. <replaceregexp file="${src.rat.report}.bin.txt" match="..AL.*" replace="__AL" byline="true"/>
  239. <replaceregexp file="${src.rat.report}.bin.txt" flags="gs" match="__AL." replace="" byline="false"/>
  240. <antcall target="display-text">
  241. <param name="file" value="${src.rat.report}.bin.txt"/>
  242. </antcall>
  243. <input message="Check that there are no unexpected binaries. Is it ok?" validargs="y,n" defaultvalue="n" addproperty="rat.src.binaries.ok"/>
  244. <echo message="Checking files at ${basedir}/${bin.package.url.name}, report is ${bin.rat.report}"/>
  245. <antcall target="binary-rat"/>
  246. <antcall target="display-text">
  247. <param name="file" value="${bin.rat.report}"/>
  248. </antcall>
  249. <input message="Check that there are no unknown or unapproved licenses or archives. Is it ok?" validargs="y,n" defaultvalue="y" addproperty="rat.bin.license.ok"/>
  250. <echo>filtering out AL files to make it easier to see binary files</echo>
  251. <copy file="${bin.rat.report}" tofile="${bin.rat.report}.bin.txt"/>
  252. <replaceregexp file="${bin.rat.report}.bin.txt" match="..AL.*" replace="__AL" byline="true"/>
  253. <replaceregexp file="${bin.rat.report}.bin.txt" flags="gs" match="__AL." replace="" byline="false"/>
  254. <antcall target="display-text">
  255. <param name="file" value="${bin.rat.report}.bin.txt"/>
  256. </antcall>
  257. <input message="Check that there are no unexpected binaries. Is it ok?" validargs="y,n" defaultvalue="n" addproperty="rat.bin.binaries.ok"/>
  258. </target>
  259. <target name="binary-rat">
  260. <echo>${jars-list}</echo>
  261. <rat:report xmlns:rat="antlib:org.apache.rat.anttasks" reportFile="${bin.rat.report}">
  262. <fileset dir="${basedir}/${bin.package.url.name}">
  263. <!--  exclude media (png, gif, jpg, mp3, flv)  -->
  264. <exclude name="**/*.png"/>
  265. <exclude name="**/*.gif"/>
  266. <exclude name="**/*.jpg"/>
  267. <exclude name="**/*.mp3"/>
  268. <exclude name="**/*.flv"/>
  269. <exclude name="**/org.apache.flex.tools.FlexToolGroup"/>
  270. <exclude name="debugger/META-INF/MANIFEST.MF"/>
  271. <exclude name="LICENSE.jx.bin"/>
  272. <exclude name="RELEASE_NOTES_JX"/>
  273. <exclude name="NOTICE.jx"/>
  274. <exclude name="README_JX"/>
  275. <exclude name="NOTICE.base"/>
  276. <exclude name="NOTICE.fdb"/>
  277. <exclude name="NOTICE.oem"/>
  278. <exclude name="NOTICE.swfutils"/>
  279. <exclude name="externs/js/externs/svg.js"/>
  280. <exclude name="externs/createjs/externs/**/*.js"/>
  281. <exclude name="js/libs/cordova.swc"/>
  282. <exclude name="js/libs/createjs.swc"/>
  283. <exclude name="js/libs/GCL.swc"/>
  284. <exclude name="js/libs/google_maps.swc"/>
  285. <exclude name="js/libs/jasmine.swc"/>
  286. <exclude name="js/libs/jquery.swc"/>
  287. <exclude name="js/libs/js.swc"/>
  288. <exclude name="js/libs/node.swc"/>
  289. <excludesfile name="${basedir}/jarexcludes.txt"/>
  290. </fileset>
  291. </rat:report>
  292. </target>
  293. <!--  someday figure out how to use
  294.        find . -name "*.jar" -exec tar ft {} \; | sort -u > paths.txt  -->
  295. <!--  how to do tar and sort on Windows?  -->
  296. <target name="examine-jars" if="isMac">
  297. <!--  comma delimited list, no spaces, not one file per line  -->
  298. <copy file="jars.txt" tofile="loop.txt"/>
  299. <ant antfile="ApproveFalcon.xml" target="loopOnce" inheritAll="false"/>
  300. </target>
  301. <target name="loopOnce">
  302. <!--  make a copy of the list so we can munge it to
  303.             get the first item in the list  -->
  304. <delete file="loop1.txt"/>
  305. <copy file="loop.txt" tofile="loop1.txt"/>
  306. <loadfile srcFile="loop.txt" property="checkiflast"/>
  307. <condition property="islast" value="true">
  308. <not>
  309. <contains string="${checkiflast}" substring=","/>
  310. </not>
  311. </condition>
  312. <antcall target="notlast"/>
  313. <antcall target="lastone"/>
  314. </target>
  315. <target name="notlast" unless="islast">
  316. <loadfile srcFile="loop1.txt" property="echoFile"/>
  317. <replaceregexp file="loop1.txt" match="^(.*),(.*)" replace="\2"/>
  318. <loadfile srcFile="loop1.txt" property="thisFile"/>
  319. <antcall target="jar-check"/>
  320. <replaceregexp file="loop.txt" match="^(.*),(.*)" replace="\1"/>
  321. <ant antfile="ApproveFalcon.xml" target="loopOnce" inheritAll="false"/>
  322. </target>
  323. <target name="lastone" if="islast">
  324. <loadfile srcFile="loop1.txt" property="thisFile"/>
  325. <antcall target="jar-check"/>
  326. <delete file="loop.txt"/>
  327. <delete file="loop1.txt"/>
  328. </target>
  329. <target name="jar-check">
  330. <delete dir="${basedir}/jar" failonerror="false"/>
  331. <mkdir dir="${basedir}/jar"/>
  332. <unjar src="${basedir}/${bin.package.url.name}/${thisFile}" dest="${basedir}/jar"/>
  333. <exec executable="tar" output="${basedir}/jarclasses.txt">
  334. <arg value="tf"/>
  335. <arg value="${basedir}/${bin.package.url.name}/${thisFile}"/>
  336. </exec>
  337. <replaceregexp file="${basedir}/jarclasses.txt" match="(.*)/(.*)" replace="\1" flags="m" byline="true"/>
  338. <exec executable="sort" output="${basedir}/jarpaths.txt">
  339. <arg value="-u"/>
  340. <arg value="${basedir}/jarclasses.txt"/>
  341. </exec>
  342. <antcall target="display-text">
  343. <param name="file" value="${basedir}/jarpaths.txt"/>
  344. </antcall>
  345. <input message="Above is the list of folders in this ${thisFile}. Folder names can sometimes indicate presence of third-party content that needs to be in LICENSE and/or NOTICE files. Press the Enter key to see the LICENSE for this jar."/>
  346. <fail message="LICENSE not in ${basedir}/${bin.package.url.name}/${thisFile}">
  347. <condition>
  348. <not>
  349. <available file="${basedir}/jar/META-INF/LICENSE"/>
  350. </not>
  351. </condition>
  352. </fail>
  353. <fail message="NOTICE not in ${basedir}/${bin.package.url.name}/${thisFile}">
  354. <condition>
  355. <not>
  356. <available file="${basedir}/jar/META-INF/NOTICE"/>
  357. </not>
  358. </condition>
  359. </fail>
  360. <antcall target="display-text">
  361. <param name="file" value="${basedir}/jar/META-INF/LICENSE"/>
  362. </antcall>
  363. <input message="Check the LICENSE for the Apache License and third-party licenses. Is it ok?" validargs="y,n" defaultvalue="y" addproperty="jar.license.ok"/>
  364. <fail message="LICENSE for ${basedir}/${bin.package.url.name}/${thisFile} not correct">
  365. <condition>
  366. <not>
  367. <equals arg1="${jar.license.ok}" arg2="y"/>
  368. </not>
  369. </condition>
  370. </fail>
  371. <antcall target="display-text">
  372. <param name="file" value="${basedir}/jar/META-INF/NOTICE"/>
  373. </antcall>
  374. <input message="Check the NOTICE for required notices from third-parties. Is it ok?" validargs="y,n" defaultvalue="y" addproperty="jar.notice.ok"/>
  375. <fail message="NOTICE for ${basedir}/${bin.package.url.name}/${thisFile} not correct">
  376. <condition>
  377. <not>
  378. <equals arg1="${jar.notice.ok}" arg2="y"/>
  379. </not>
  380. </condition>
  381. </fail>
  382. </target>
  383. <target name="check-notices" description="open each notice file for review, grep for a few things">
  384. <fail message="README not in source package">
  385. <condition>
  386. <not>
  387. <available file="${basedir}/${src.package.url.name}/README"/>
  388. </not>
  389. </condition>
  390. </fail>
  391. <fail message="README_JX not in source package">
  392. <condition>
  393. <not>
  394. <available file="${basedir}/${src.package.url.name}/README_JX"/>
  395. </not>
  396. </condition>
  397. </fail>
  398. <fail message="RELEASE_NOTES not in source package">
  399. <condition>
  400. <not>
  401. <available file="${basedir}/${src.package.url.name}/RELEASE_NOTES"/>
  402. </not>
  403. </condition>
  404. </fail>
  405. <fail message="RELEASE_NOTES_JX not in source package">
  406. <condition>
  407. <not>
  408. <available file="${basedir}/${src.package.url.name}/RELEASE_NOTES_JX"/>
  409. </not>
  410. </condition>
  411. </fail>
  412. <fail message="NOTICE not in source package">
  413. <condition>
  414. <not>
  415. <available file="${basedir}/${src.package.url.name}/NOTICE"/>
  416. </not>
  417. </condition>
  418. </fail>
  419. <fail message="NOTICE.JX not in source package">
  420. <condition>
  421. <not>
  422. <available file="${basedir}/${src.package.url.name}/NOTICE.JX"/>
  423. </not>
  424. </condition>
  425. </fail>
  426. <fail message="LICENSE not in source package">
  427. <condition>
  428. <not>
  429. <available file="${basedir}/${src.package.url.name}/LICENSE"/>
  430. </not>
  431. </condition>
  432. </fail>
  433. <fail message="README not in binary package">
  434. <condition>
  435. <not>
  436. <available file="${basedir}/${bin.package.url.name}/README"/>
  437. </not>
  438. </condition>
  439. </fail>
  440. <fail message="README_JX not in binary package">
  441. <condition>
  442. <not>
  443. <available file="${basedir}/${bin.package.url.name}/README_JX"/>
  444. </not>
  445. </condition>
  446. </fail>
  447. <fail message="RELEASE_NOTES not in binary package">
  448. <condition>
  449. <not>
  450. <available file="${basedir}/${bin.package.url.name}/RELEASE_NOTES"/>
  451. </not>
  452. </condition>
  453. </fail>
  454. <fail message="RELEASE_NOTES_JX not in binary package">
  455. <condition>
  456. <not>
  457. <available file="${basedir}/${bin.package.url.name}/RELEASE_NOTES_JX"/>
  458. </not>
  459. </condition>
  460. </fail>
  461. <fail message="NOTICE not in binary package">
  462. <condition>
  463. <not>
  464. <available file="${basedir}/${bin.package.url.name}/NOTICE"/>
  465. </not>
  466. </condition>
  467. </fail>
  468. <fail message="NOTICE.JX not in binary package">
  469. <condition>
  470. <not>
  471. <available file="${basedir}/${bin.package.url.name}/NOTICE.JX"/>
  472. </not>
  473. </condition>
  474. </fail>
  475. <fail message="LICENSE not in binary package">
  476. <condition>
  477. <not>
  478. <available file="${basedir}/${bin.package.url.name}/LICENSE"/>
  479. </not>
  480. </condition>
  481. </fail>
  482. <checksum file="${basedir}/${src.package.url.name}/RELEASE_NOTES_JX" property="src.rnjxmd5"/>
  483. <checksum file="${basedir}/${bin.package.url.name}/RELEASE_NOTES_JX" property="bin.rnjxmd5"/>
  484. <fail message="RELEASE_NOTES_JX in binary package does not match source package">
  485. <condition>
  486. <not>
  487. <equals arg1="${src.rnjxmd5}" arg2="${bin.rnjxmd5}"/>
  488. </not>
  489. </condition>
  490. </fail>
  491. <checksum file="${basedir}/${src.package.url.name}/RELEASE_NOTES" property="src.rnmd5"/>
  492. <checksum file="${basedir}/${bin.package.url.name}/RELEASE_NOTES" property="bin.rnmd5"/>
  493. <fail message="RELEASE_NOTES in binary package does not match source package">
  494. <condition>
  495. <not>
  496. <equals arg1="${src.rnmd5}" arg2="${bin.rnmd5}"/>
  497. </not>
  498. </condition>
  499. </fail>
  500. <checksum file="${basedir}/${src.package.url.name}/README_JX" property="src.rjxmd5"/>
  501. <checksum file="${basedir}/${bin.package.url.name}/README_JX" property="bin.rjxmd5"/>
  502. <fail message="README_JX in binary package does not match source package">
  503. <condition>
  504. <not>
  505. <equals arg1="${src.rjxmd5}" arg2="${bin.rjxmd5}"/>
  506. </not>
  507. </condition>
  508. </fail>
  509. <checksum file="${basedir}/${src.package.url.name}/README" property="src.rmd5"/>
  510. <checksum file="${basedir}/${bin.package.url.name}/README" property="bin.rmd5"/>
  511. <fail message="README in binary package does not match source package">
  512. <condition>
  513. <not>
  514. <equals arg1="${src.rmd5}" arg2="${bin.rmd5}"/>
  515. </not>
  516. </condition>
  517. </fail>
  518. <antcall target="display-text">
  519. <param name="file" value="${basedir}/${src.package.url.name}/README"/>
  520. </antcall>
  521. <input message="Check the README for version numbers, spelling, grammar, accuracy. Is it ok?" validargs="y,n" defaultvalue="y" addproperty="readme.ok"/>
  522. <antcall target="display-text">
  523. <param name="file" value="${basedir}/${src.package.url.name}/README_JX"/>
  524. </antcall>
  525. <input message="Check the README_JX for version numbers, spelling, grammar, accuracy. Is it ok?" validargs="y,n" defaultvalue="y" addproperty="readmejx.ok"/>
  526. <antcall target="display-text">
  527. <param name="file" value="${basedir}/${src.package.url.name}/RELEASE_NOTES"/>
  528. </antcall>
  529. <input message="Check the RELEASE_NOTES for copyright years, spelling, grammar, accuracy. Is it ok?" validargs="y,n" defaultvalue="y" addproperty="releasenotes.ok"/>
  530. <antcall target="display-text">
  531. <param name="file" value="${basedir}/${src.package.url.name}/RELEASE_NOTES_JX"/>
  532. </antcall>
  533. <input message="Check the RELEASE_NOTES_JX for copyright years, spelling, grammar, accuracy. Is it ok?" validargs="y,n" defaultvalue="y" addproperty="releasenotesjx.ok"/>
  534. <antcall target="display-text">
  535. <param name="file" value="${basedir}/${src.package.url.name}/NOTICE"/>
  536. </antcall>
  537. <input message="Check the source package NOTICE for required notices from third-parties. Is it ok?" validargs="y,n" defaultvalue="y" addproperty="src.notice.ok"/>
  538. <antcall target="display-text">
  539. <param name="file" value="${basedir}/${src.package.url.name}/LICENSE"/>
  540. </antcall>
  541. <input message="Check the source package LICENSE for the Apache License and third-party licenses. Is it ok?" validargs="y,n" defaultvalue="y" addproperty="src.license.ok"/>
  542. <antcall target="display-text">
  543. <param name="file" value="${basedir}/${bin.package.url.name}/NOTICE"/>
  544. </antcall>
  545. <input message="Check the binary package NOTICE for required notices from third-parties. Is it ok?" validargs="y,n" defaultvalue="y" addproperty="bin.notice.ok"/>
  546. <antcall target="display-text">
  547. <param name="file" value="${basedir}/${bin.package.url.name}/LICENSE"/>
  548. </antcall>
  549. <input message="Check the binary package LICENSE for the Apache License and third-party licenses. Is it ok?" validargs="y,n" defaultvalue="y" addproperty="bin.license.ok"/>
  550. </target>
  551. <target name="build" depends="copy.downloads">
  552. <input message="The final step is to run the build and any tests the build script runs. This can take several minutes. Press y to start the build." validargs="y" defaultvalue="y"/>
  553. <ant dir="${basedir}/${src.package.url.name}" target="all"/>
  554. </target>
  555. <target name="copy.downloads" if="${do.copy.downloads}" description="instead of actually downloading all of the dependencies, you can save lots of time by just copying from some other folder in some other SDK.">
  556. <echo>Copying downloads</echo>
  557. <copy todir="${basedir}/${src.package.url.name}/in">
  558. <fileset dir="${download.cache.dir}"/>
  559. </copy>
  560. </target>
  561. <target name="approve">
  562. <condition property="vote" value="+1">
  563. <and>
  564. <equals arg1="${rat.src.license.ok}" arg2="y"/>
  565. <equals arg1="${rat.src.binaries.ok}" arg2="y"/>
  566. <equals arg1="${rat.bin.license.ok}" arg2="y"/>
  567. <equals arg1="${rat.bin.binaries.ok}" arg2="y"/>
  568. <equals arg1="${readme.ok}" arg2="y"/>
  569. <equals arg1="${releasenotes.ok}" arg2="y"/>
  570. <equals arg1="${src.notice.ok}" arg2="y"/>
  571. <equals arg1="${bin.notice.ok}" arg2="y"/>
  572. <equals arg1="${readmejx.ok}" arg2="y"/>
  573. <equals arg1="${releasenotesjx.ok}" arg2="y"/>
  574. <equals arg1="${src.license.ok}" arg2="y"/>
  575. <equals arg1="${bin.license.ok}" arg2="y"/>
  576. </and>
  577. </condition>
  578. <property name="vote" value="-1"/>
  579. <echo> ${vote} Package ${src.package.url.path}/${src.package.url.name}.${package.suffix} Java ${ant.java.version} OS: ${os.name} ${os.arch} ${os.version} Source kit signatures match: y Source kit builds: y README is ok: ${readme.ok} README_JX is ok: ${readmejx.ok} RELEASE_NOTES is ok: ${releasenotes.ok} RELEASE_NOTES_JX is ok: ${releasenotesjx.ok} NOTICE is ok: ${src.notice.ok} LICENSE is ok: ${src.license.ok} No unapproved licenses or archives in source package: ${rat.src.license.ok} No unapproved binaries in source package: ${rat.src.binaries.ok} Package ${bin.package.url.path}/${bin.package.url.name}.${package.suffix} Binary kit signatures match: y NOTICE is ok: ${bin.notice.ok} LICENSE is ok: ${bin.license.ok} No unapproved licenses or files in jars: y No unapproved licenses or archives in binary package: ${rat.bin.license.ok} No unapproved binaries in binary package: ${rat.bin.binaries.ok} </echo>
  580. <fail>
  581. <condition>
  582. <equals arg1="-1" arg2="${vote}"/>
  583. </condition>
  584. </fail>
  585. </target>
  586. </project>

Raw Paste


Login or Register to edit or fork this paste. It's free.