announce POI 3.15-beta2

generate snipplet for download.xml

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1751103 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Andreas Beeker 2016-07-02 22:09:00 +00:00
parent 73fcbfdb68
commit 2a4b9c6728

152
build.xml
View File

@ -2402,12 +2402,15 @@ under the License.
<ant dir="build/release" inheritAll="false" inheritRefs="false" useNativeBasedir="true"> <ant dir="build/release" inheritAll="false" inheritRefs="false" useNativeBasedir="true">
<property name="DSTAMP" value="${DSTAMP}"/> <property name="DSTAMP" value="${DSTAMP}"/>
<target name="dist" /> <target name="dist" />
<target name="dist-nexus" />
</ant> </ant>
</target> </target>
<target name="release-prep3" depends="-init-svn" description="write the dist to the release candidate repo - needs Java7+"> <target name="release-prep3" depends="-init-svn" description="write the dist to the release candidate repo - needs Java7+">
<svn refid="svn.settings"> <ant dir="build/release" inheritAll="false" inheritRefs="false" useNativeBasedir="true">
<target name="dist-nexus" />
</ant>
<svn refid="svn.settings">
<import path="build/release/build/dist" <import path="build/release/build/dist"
url="https://dist.apache.org/repos/dist/dev/poi" url="https://dist.apache.org/repos/dist/dev/poi"
newEntry="${version.id}-${release.rc}" newEntry="${version.id}-${release.rc}"
@ -2451,4 +2454,149 @@ under the License.
<mapper><filtermapper><replacestring from="secring" to="pubring"/></filtermapper></mapper> <mapper><filtermapper><replacestring from="secring" to="pubring"/></filtermapper></mapper>
</pathconvert> </pathconvert>
</target> </target>
<macrodef name="loadChecksum">
<attribute name="url"/>
<attribute name="property"/>
<sequential>
<loadresource property="@{property}">
<url url="@{url}"/>
<filterchain>
<striplinebreaks/>
<replaceregex pattern=" .*" replace=""/>
</filterchain>
</loadresource>
</sequential>
</macrodef>
<scriptdef name="bytes2mega" language="javascript"
description="Convert size in bytes to megabytes">
<attribute name="property"/>
<attribute name="bytes"/>
var bytes = Number(attributes.get("bytes"));
var mega = String((bytes/(1024.0*1024.0)).toFixed(2));
project.setProperty(attributes.get("property"), mega);
</scriptdef>
<macrodef name="loadFilesize">
<attribute name="url"/>
<attribute name="property"/>
<sequential>
<local name="entityProperty"/>
<delete file="build/loadFilesize.txt"/>
<record name="build/loadFilesize.txt" action="start" loglevel="verbose" append="false"/>
<http entityProperty="entityProperty" url="@{url}" method="HEAD" expected="200" printrequestheaders="false" printresponseheaders="false"/>
<record name="build/loadFilesize.txt" action="stop"/>
<local name="fileSize"/>
<loadfile property="fileSize" srcFile="build/loadFilesize.txt">
<filterchain>
<tokenfilter>
<containsstring contains="Content-Length"/>
<replaceregex pattern=".* ([0-9]+)$" replace="\1" flags="gi"/>
</tokenfilter>
</filterchain>
</loadfile>
<bytes2mega property="@{property}" bytes="${fileSize}"/>
</sequential>
</macrodef>
<!-- TODO: currently this only saves a copy and paste snipplet to a file ...
would be nice if it really changes status.xml and download.xml -->
<target name="update-download">
<downloadfile src="http://missing-link.googlecode.com/files/ml-ant-http-1.1.3.zip" dest="${compile.lib}/ml-ant-http-1.1.3.zip"/>
<unzip src="${compile.lib}/ml-ant-http-1.1.3.zip" dest="${compile.lib}">
<patternset>
<include name="ml-ant-http-1.1.3.jar"/>
</patternset>
</unzip>
<taskdef name="http" classname="org.missinglink.ant.task.http.HttpClientTask">
<classpath>
<path location="${compile.lib}/ml-ant-http-1.1.3.jar"/>
</classpath>
</taskdef>
<tstamp>
<format property="rel_date" pattern="dd MMMM yyyy" locale="US"/>
<format property="file_date" pattern="yyyyMMdd" locale="US"/>
</tstamp>
<!-- TODO: change reltype (dev/release), depending on BETA / FINAL -->
<property name="reltype" value="dev"/>
<property name="baseurl" value="http://www.apache.org/dist/poi/${reltype}"/>
<loadChecksum property="bin-tar-md5" url="${baseurl}/bin/poi-bin-${version.id}-${file_date}.tar.gz.md5"/>
<loadChecksum property="bin-tar-sha1" url="${baseurl}/bin/poi-bin-${version.id}-${file_date}.tar.gz.sha1"/>
<loadChecksum property="bin-zip-md5" url="${baseurl}/bin/poi-bin-${version.id}-${file_date}.zip.md5"/>
<loadChecksum property="bin-zip-sha1" url="${baseurl}/bin/poi-bin-${version.id}-${file_date}.zip.sha1"/>
<loadChecksum property="src-tar-md5" url="${baseurl}/src/poi-src-${version.id}-${file_date}.tar.gz.md5"/>
<loadChecksum property="src-tar-sha1" url="${baseurl}/src/poi-src-${version.id}-${file_date}.tar.gz.sha1"/>
<loadChecksum property="src-zip-md5" url="${baseurl}/src/poi-src-${version.id}-${file_date}.zip.md5"/>
<loadChecksum property="src-zip-sha1" url="${baseurl}/src/poi-src-${version.id}-${file_date}.zip.sha1"/>
<loadFilesize property="bin-tar-size" url="${baseurl}/bin/poi-bin-${version.id}-${file_date}.tar.gz"/>
<loadFilesize property="bin-zip-size" url="${baseurl}/bin/poi-bin-${version.id}-${file_date}.zip"/>
<loadFilesize property="src-tar-size" url="${baseurl}/src/poi-src-${version.id}-${file_date}.tar.gz"/>
<loadFilesize property="src-zip-size" url="${baseurl}/src/poi-src-${version.id}-${file_date}.zip"/>
<echo file="download-snipplet.xml"><![CDATA[
<section id="POI-${version.id}"><title>${rel_date} - POI ${version.id} available</title>
<p>The Apache POI team is pleased to announce the release of ${version.id}.
Featured are a handful of new areas of functionality and numerous bug fixes.</p>
<p>A summary of changes is available in the
<link href="http://www.apache.org/dyn/closer.lua/poi/${reltype}/RELEASE-NOTES.txt">Release Notes</link>.
A full list of changes is available in the <link href="changes.html">change log</link>.
People interested should also follow the <link href="mailinglists.html">dev list</link>
to track progress.</p>
<p>
The POI source release as well as the pre-built binary deployment packages are listed below.
Pre-built versions of all <link href="index.html#components">POI components</link>
are available in the central Maven repository under Group ID "org.apache.poi" and Version
"${version.id}".
</p>
<section><title>Binary Distribution</title>
<ul>
<li><link href="http://www.apache.org/dyn/closer.lua/poi/${reltype}/bin/poi-bin-${version.id}-${file_date}.tar.gz">poi-bin-${version.id}-${file_date}.tar.gz</link>
(${bin-tar-size} MB, <link href="http://www.apache.org/dist/poi/${reltype}/bin/poi-bin-${version.id}-${file_date}.tar.gz.asc">signed</link>)
<br/>
MD5 checksum: <link href="http://www.apache.org/dist/poi/${reltype}/bin/poi-bin-${version.id}-${file_date}.tar.gz.md5">
${bin-tar-md5}</link>
<br/>
SHA1 checksum: <link href="http://www.apache.org/dist/poi/${reltype}/bin/poi-bin-${version.id}-${file_date}.tar.gz.sha1">
${bin-tar-sha1}</link>
</li>
<li><link href="http://www.apache.org/dyn/closer.lua/poi/${reltype}/bin/poi-bin-${version.id}-${file_date}.zip">poi-bin-${version.id}-${file_date}.zip</link>
(${bin-zip-size} MB, <link href="http://www.apache.org/dist/poi/${reltype}/bin/poi-bin-${version.id}-${file_date}.zip.asc">signed</link>)
<br/>
MD5 checksum: <link href="http://www.apache.org/dist/poi/${reltype}/bin/poi-bin-${version.id}-${file_date}.zip.md5">
${bin-zip-md5}</link>
<br/>
SHA1 checksum: <link href="http://www.apache.org/dist/poi/${reltype}/bin/poi-bin-${version.id}-${file_date}.zip.sha1">
${bin-zip-sha1}</link>
</li>
</ul>
</section>
<section><title>Source Distribution</title>
<ul>
<li><link href="http://www.apache.org/dyn/closer.lua/poi/${reltype}/src/poi-src-${version.id}-${file_date}.tar.gz">poi-src-${version.id}-${file_date}.tar.gz</link>
(${src-tar-size} MB, <link href="http://www.apache.org/dist/poi/${reltype}/src/poi-src-${version.id}-${file_date}.tar.gz.asc">signed</link>)
<br/>
MD5 checksum: <link href="http://www.apache.org/dist/poi/${reltype}/src/poi-src-${version.id}-${file_date}.tar.gz.md5">
${src-tar-md5}</link>
<br/>
SHA1 checksum: <link href="http://www.apache.org/dist/poi/${reltype}/src/poi-src-${version.id}-${file_date}.tar.gz.sha1">
${src-tar-sha1}</link>
</li>
<li><link href="http://www.apache.org/dyn/closer.lua/poi/${reltype}/src/poi-src-${version.id}-${file_date}.zip">poi-src-${version.id}-${file_date}.zip</link>
(${src-zip-size} MB, <link href="http://www.apache.org/dist/poi/${reltype}/src/poi-src-${version.id}-${file_date}.zip.asc">signed</link>)
<br/>
MD5 checksum: <link href="http://www.apache.org/dist/poi/${reltype}/src/poi-src-${version.id}-${file_date}.zip.md5">
${src-zip-md5}</link>
<br/>
SHA1 checksum: <link href="http://www.apache.org/dist/poi/${reltype}/src/poi-src-${version.id}-${file_date}.zip.sha1">
${src-zip-sha1}</link>
</li>
</ul>
</section>
</section>
]]></echo>
</target>
</project> </project>