update release-guide and build.xml to the new release process

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1738198 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Andreas Beeker 2016-04-07 23:11:22 +00:00
parent 3718d45538
commit f18e11db77

199
build.xml
View File

@ -42,6 +42,7 @@ under the License.
<description>The Apache POI project Ant build.</description> <description>The Apache POI project Ant build.</description>
<property name="version.id" value="3.15-beta2"/> <property name="version.id" value="3.15-beta2"/>
<property name="release.rc" value="RC1"/>
<property environment="env"/> <property environment="env"/>
<!-- the repository to download jars from --> <!-- the repository to download jars from -->
@ -1636,19 +1637,47 @@ under the License.
</target> </target>
<target name="assemble" depends="jar,jar-src,jar-javadocs"> <target name="assemble" depends="jar,jar-src,jar-javadocs">
<property name="zipdir" value="${jar.name}-${version.id}"/>
<mappedresources id="legal-files" cache="true">
<fileset dir="legal"/>
<globmapper from="*" to="${zipdir}/*"/>
</mappedresources>
<!-- jars to include in binary assemblies --> <!-- jars to include in binary assemblies -->
<patternset id="bin.dist.jars"> <union id="bin-files" cache="true">
<include name="${jar.name}-${version.id}-${DSTAMP}.jar"/> <mappedresources refid="legal-files"/>
<include name="${jar.name}-scratchpad-${version.id}-${DSTAMP}.jar"/> <mappedresources cache="true">
<include name="${jar.name}-ooxml-${version.id}-${DSTAMP}.jar"/> <fileset dir="${main.lib}">
<include name="${jar.name}-examples-${version.id}-${DSTAMP}.jar"/> <include name="commons-codec-*.jar"/>
<include name="${jar.name}-ooxml-schemas-${version.id}-${DSTAMP}.jar"/> <include name="commons-logging-*.jar"/>
<include name="${jar.name}-excelant-${version.id}-${DSTAMP}.jar"/> <include name="junit-*.jar"/>
</patternset> <include name="log4j-*.jar"/>
</fileset>
<globmapper from="*" to="${zipdir}/lib/*"/>
</mappedresources>
<mappedresources cache="true">
<fileset dir="${ooxml.lib}" includes="xmlbeans-2.6.0.jar.orig,curvesapi-*.jar"/>
<regexpmapper from="^(.*\.jar)(\.orig)?$$" to="${zipdir}/ooxml-lib/\1"/>
</mappedresources>
<mappedresources cache="true">
<fileset dir="${dist.dir}/maven" includes="**/*.jar" excludes="**/*-javadoc.jar,**/*-sources.jar"/>
<chainedmapper>
<flattenmapper/>
<globmapper from="*" to="${zipdir}/*"/>
</chainedmapper>
</mappedresources>
<mappedresources cache="true">
<fileset dir="${build.site}"/>
<globmapper from="*" to="${zipdir}/docs/*"/>
</mappedresources>
</union>
<!-- patterns to exclude from source assemblies --> <!-- patterns to exclude from source assemblies -->
<patternset id="src.dist.patterns" <union id="src-files" cache="true">
excludes="build/**, <mappedresources refid="legal-files"/>
<mappedresources cache="true">
<fileset dir="." excludes="build/**,
dist*/**, dist*/**,
maven/**, maven/**,
lib/**, lib/**,
@ -1666,71 +1695,31 @@ under the License.
.classpath, .classpath,
.settings/**, .settings/**,
.project"/> .project"/>
<globmapper from="*" to="${zipdir}/*"/>
<property name="zipdir" value="${jar.name}-${version.id}"/> </mappedresources>
</union>
<zip destfile="${dist.dir}/${jar.name}-bin-${version.id}-${DSTAMP}.zip"> <zip destfile="${dist.dir}/${jar.name}-bin-${version.id}-${DSTAMP}.zip">
<zipfileset dir="legal/" prefix="${zipdir}"/> <union refid="bin-files"/>
<zipfileset dir="${main.lib}" prefix="${zipdir}/lib">
<include name="commons-codec-*.jar"/>
<include name="commons-logging-*.jar"/>
<include name="junit-*.jar"/>
<include name="log4j-*.jar"/>
</zipfileset>
<zipfileset dir="${ooxml.lib}" prefix="${zipdir}/ooxml-lib">
<include name="xmlbeans-2.6*.jar"/>
<include name="curvesapi-*.jar"/>
</zipfileset>
<zipfileset dir="${dist.dir}" prefix="${zipdir}">
<patternset refid="bin.dist.jars"/>
</zipfileset>
<zipfileset dir="${build.site}" prefix="${zipdir}/docs"/>
</zip> </zip>
<tar destfile="${dist.dir}/${jar.name}-bin-${version.id}-${DSTAMP}.tar.gz" longfile="gnu" compression="gzip">
<union refid="bin-files"/>
</tar>
<zip destfile="${dist.dir}/${jar.name}-src-${version.id}-${DSTAMP}.zip"> <zip destfile="${dist.dir}/${jar.name}-src-${version.id}-${DSTAMP}.zip">
<zipfileset dir="legal/" prefix="${zipdir}" /> <union refid="src-files"/>
<zipfileset dir="." prefix="${zipdir}">
<patternset refid="src.dist.patterns"/>
</zipfileset>
</zip> </zip>
<tar destfile="${dist.dir}/${jar.name}-bin-${version.id}-${DSTAMP}.tar.gz" <tar destfile="${dist.dir}/${jar.name}-src-${version.id}-${DSTAMP}.tar.gz" longfile="gnu" compression="gzip">
longfile="gnu" <union refid="src-files"/>
compression="gzip">
<tarfileset dir="legal/" prefix="${zipdir}"/>
<zipfileset dir="${main.lib}" prefix="${zipdir}/lib">
<include name="commons-codec-*.jar"/>
<include name="commons-logging-*.jar"/>
<include name="junit-*.jar"/>
<include name="log4j-*.jar"/>
</zipfileset>
<tarfileset dir="${ooxml.lib}" prefix="${zipdir}/ooxml-lib">
<include name="xmlbeans-2.6*.jar"/>
<include name="curvesapi-*.jar"/>
</tarfileset>
<tarfileset dir="${build.site}" prefix="${zipdir}/docs"/>
<tarfileset dir="${dist.dir}" prefix="${zipdir}">
<patternset refid="bin.dist.jars"/>
</tarfileset>
</tar> </tar>
<tar destfile="${dist.dir}/${jar.name}-src-${version.id}-${DSTAMP}.tar.gz"
longfile="gnu"
compression="gzip">
<tarfileset dir="legal/" prefix="${zipdir}" />
<tarfileset dir="." prefix="${zipdir}">
<patternset refid="src.dist.patterns"/>
</tarfileset>
</tar>
<!-- script to create signatures and hashes -->
<copy file="maven/multisign.sh" todir="${dist.dir}"/>
<echo>Creating Maven POMs</echo> <echo>Creating Maven POMs</echo>
<antcall target="maven-poms"/> <antcall target="maven-poms"/>
<echo>Distribution located in ${dist.dir}</echo> <echo>Distribution located in ${dist.dir}</echo>
<echo>Use ${dist.dir}/multisign.sh to create md5 checksums and GPG signatures</echo> <echo>Use "ant dist-checksum" to create md5/sha1 checksums and GPG signatures</echo>
</target> </target>
<target name="osgi" depends="mvn-install"> <target name="osgi" depends="mvn-install">
@ -2025,8 +2014,33 @@ under the License.
<nexus-upload artifactId="poi-scratchpad"/> <nexus-upload artifactId="poi-scratchpad"/>
</target> </target>
<!-- experimentel release preparation ... tbd. ... --> <target name="-init-svn" depends="init,fetch-svn-jars,load-maven-server-settings">
<target name="release-prep" depends="init,fetch-svn-jars,load-maven-server-settings"> <!-- JAVA_HOME needs to point to a JRE/JDK7+, otherwise the svn/https connection throws a "Could not generate DH keypair"-->
<fail message="Environment needs to point to a java 7+">
<condition>
<or>
<equals arg1="${ant.java.version}" arg2="1.6"/>
<equals arg1="${ant.java.version}" arg2="1.5"/>
</or>
</condition>
</fail>
<path id="path.svnant">
<fileset dir="${compile.lib}/svnant" includes="*.jar"/>
</path>
<taskdef resource="org/tigris/subversion/svnant/svnantlib.xml" classpathref="path.svnant"/>
<svnSetting
svnkit="true"
javahl="false"
username="${settings.apache-id.username}"
password="${settings.apache-id.password}"
id="svn.settings"
/>
</target>
<!-- experimental release preparation ... tbd. ... -->
<target name="release-prep1" depends="-init-svn" description="update the documentation and create the svn tag - needs Java7+">
<local name="tstamp_rel"/> <local name="tstamp_rel"/>
<local name="tstamp_next"/> <local name="tstamp_next"/>
<local name="rel_next"/> <local name="rel_next"/>
@ -2057,19 +2071,6 @@ under the License.
<fixcrlf srcdir="." includes="src/documentation/content/xdocs/status.xml" eol="unix" eof="remove" /> <fixcrlf srcdir="." includes="src/documentation/content/xdocs/status.xml" eol="unix" eof="remove" />
<path id="path.svnant">
<fileset dir="${compile.lib}/svnant" includes="*.jar"/>
</path>
<taskdef resource="org/tigris/subversion/svnant/svnantlib.xml" classpathref="path.svnant"/>
<svnSetting
svnkit="true"
javahl="false"
username="${settings.apache-id.username}"
password="${settings.apache-id.password}"
id="svn.settings"
/>
<!-- can't combine updating and pinning of the documentation ... so we need two commits --> <!-- can't combine updating and pinning of the documentation ... so we need two commits -->
<!-- (revision)properties can't be set and read within one svn block --> <!-- (revision)properties can't be set and read within one svn block -->
<echo message="updating build.xml and status.xml"/> <echo message="updating build.xml and status.xml"/>
@ -2119,6 +2120,50 @@ under the License.
<dirset dir="src"/> <dirset dir="src"/>
</commit> </commit>
</svn> </svn>
<mkdir dir="build/release"/>
<svn refid="svn.settings">
<checkout url="https://svn.apache.org/repos/asf/poi/tags/${RELEASE_TAG}" destPath="build/release"/>
</svn>
<svn refid="svn.settings">
<mkdir url="https://dist.apache.org/repos/dist/dev/poi/${version.id}-${release.rc}"
message="release candidate POI ${version.id}"/>
<import path="build/release/build/dist"
url="https://dist.apache.org/repos/dist/dev/poi/${version.id}-${release.rc}"
message="release candidate POI ${version.id}"/>
</svn>
</target>
<target name="release-prep2" depends="init" description="compile the freshly checked out svn tag and upload it to the nexus - needs a JDK6">
<!-- JAVA_HOME needs to point to a JDK6, otherwise the ant invocation is failing on a missing javac -->
<fail message="Environment needs to point to a java 6 jdk">
<condition>
<not><equals arg1="${ant.java.version}" arg2="1.6"/></not>
</condition>
</fail>
<local name="DSTAMP"/>
<tstamp>
<format property="DSTAMP" pattern="yyyyMMdd" offset="7" unit="day"/>
</tstamp>
<ant dir="build/release" inheritAll="false" inheritRefs="false" useNativeBasedir="true">
<property name="DSTAMP" value="${DSTAMP}"/>
<target name="dist" />
<target name="dist-nexus" />
</ant>
</target>
<target name="release-prep3" depends="-init-svn" description="write the dist to the release candidate repo - needs Java7+">
<svn refid="svn.settings">
<import path="build/release/build/dist"
url="https://dist.apache.org/repos/dist/dev/poi"
newEntry="${version.id}-${release.rc}-tmp"
message="release candidate POI ${version.id}"/>
</svn>
</target> </target>
<target name="-update-build.xml"> <target name="-update-build.xml">