Update of /cvsroot/mocklib/mocklib2/bldfiles
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8881/bldfiles
Modified Files:
build.xml
Added Files:
release.xml
Log Message:
creating ability to do release builds
Index: build.xml
===================================================================
RCS file: /cvsroot/mocklib/mocklib2/bldfiles/build.xml,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** build.xml 21 Dec 2005 18:50:39 -0000 1.4
--- build.xml 21 Dec 2005 19:05:55 -0000 1.5
***************
*** 3,7 ****
Run "ant -projecthelp" to view all the possible targets and descriptions.
-->
! <project name="std_buildfile" default="testall" basedir="..">
<!-- Now allow any of the properties to be overridden -->
--- 3,7 ----
Run "ant -projecthelp" to view all the possible targets and descriptions.
-->
! <project name="std_buildfile" default="release" basedir="..">
<!-- Now allow any of the properties to be overridden -->
***************
*** 419,425 ****
***********************************************************************
-->
-
-
-
<target name="testall" depends="instrumentation" description="Run ALL junit and abbot tests after compiling code">
<mkdir dir="${junit.results}"/>
--- 419,422 ----
--- NEW FILE: release.xml ---
<!-- This file is run after testall. It is primarily so you can
move the distribution built in createdist.xml and code coverage
web pages anywhere you want after the build is done -->
<project name="std_buildfile" default="createdist" basedir="..">
<property name="misc" value="${input}/misc"/>
<property name="javadoc.examples.title" value="MockLib Examples"/>
<!-- temporary until we fix buildtemplate to not erase every folder in tools -->
<property name="taglet" value="${tool.dir}/taglet"/>
<property name="user" value="fastdragon"/>
<!--
***********************************************************************
JAVADOC TARGET
***********************************************************************
-->
<target name="javadocimpl" description="Generate JavaDoc">
<mkdir dir="${projstaging}/impl"/>
<copy todir="${projstaging}/impl">
<fileset dir="${javacode}" excludes="**\*.java"/>
</copy>
<echo message="list is at ${misc}"/>
<echo message="package lists in=${package.list}"/>
<javadoc packagenames="biz.xsoftware.mock.*"
sourcepath="${javacode}"
destdir="${projstaging}/impl"
author="true"
version="true"
use="true"
public="yes"
overview="${misc}/mockoverview.html"
windowtitle="${javadoc.title} ${version}"
doctitle="${javadoc.title} ${version}"
Verbose="true">
<!-- classpath needed to link up to third_party libs without 100's of warnings -->
<classpath>
<path refid="tool.and.lib"/>
</classpath>
<fileset dir="${javacode}">
<include name="**/.java"/>
</fileset>
<doctitle><![CDATA[<h1>${javadoc.title} ${version}</h1>]]></doctitle>
<bottom><![CDATA[<i>${copyright}</i><br>
${javadoc.bottom}]]>
</bottom>
<link offline="true" href="http://java.sun.com/j2se/1.4.2/docs/api" packagelistLoc="${package.list}/jdk"/>
<link offline="true" href="http://www.junit.org/junit/javadoc/3.8.1" packagelistLoc="${package.list}/junit"/>
</javadoc>
</target>
<target name="javadocexamples" depends="javadocimpl" description="Generate JavaDoc">
<mkdir dir="${projstaging}/examples"/>
<copy todir="${projstaging}/examples">
<fileset dir="${javacode}" excludes="**\*.java"/>
</copy>
<echo message="list is at ${misc}"/>
<javadoc packagenames="biz.xsoftware.examples.*"
sourcepath="${javacode}"
destdir="${projstaging}/examples"
author="true"
version="true"
use="true"
private="yes"
overview="${misc}/examplesoverview.html"
windowtitle="${javadoc.examples.title} ${version}"
doctitle="${javadoc.examples.title} ${version}"
Verbose="true"
breakiterator="yes"
stylesheetfile="${taglet}/stylesheet.css">
<taglet name="biz.xsoftware.showcode.ShowCodeTaglet" path="${taglet}/showcode.jar"/>
<!-- classpath needed to link up to third_party libs without 100's of warnings -->
<classpath>
<path refid="tool.and.lib"/>
</classpath>
<fileset dir="${javacode}">
<include name="**/.java"/>
</fileset>
<doctitle><![CDATA[<h1>${javadoc.examples.title} ${version}</h1>]]></doctitle>
<bottom><![CDATA[<i>${copyright}</i><br>
${javadoc.bottom}]]>
</bottom>
<link offline="true" href="http://java.sun.com/j2se/1.4.2/docs/api" packagelistLoc="${package.list}/jdk"/>
<link offline="true" href="http://www.junit.org/junit/javadoc/3.8.1" packagelistLoc="${package.list}/junit"/>
<link offline="false" href="../impl"/>
</javadoc>
</target>
<target name="createdist" depends="javadocexamples">
<copy todir="${projstaging}">
<fileset dir="${codecov.report}"/>
<fileset dir="${jardist}" includes="${jar.name}"/>
</copy>
<!--
<copy file="README" tofile="${dist.build.dir}/README" overwrite="yes" />
<copy file="LICENSE" tofile="${dist.build.dir}/LICENSE" overwrite="yes" />
-->
<mkdir dir="${dist}"/>
<!-- package everything up nice and tidy -->
<zip zipfile="${dist}/${name}-${version}.zip" basedir="${staging}" includes="**" update="yes" />
<!--tar tarfile="${dist.dir}/${name}-${version}.tar" basedir="${dist.build.dir}" includes="**" />
<gzip zipfile="${dist.dir}/${name}-${version}.tar.gz" src="${dist.dir}/${name}-${version}.tar" /-->
</target>
<!-- this is run after createdist is run and after testall is
run so codecoverage, the release, can all be posted to some
website -->
<target name="release" depends="createdist" if="pw">
<echo message="***************************************************************"/>
<echo message="***************************************************************"/>
<echo message=" Delivering zip=${name}-${version}.zip to"/>
<echo message=" sourceforge ftp site, and to ${name} website"/>
<echo message=" The website will be updated at mocklib.sourceforge.net"/>
<echo message=" Please finish this and go to sourceforge.net/projects/mocklib"/>
<echo message=" to pick up the release and release it to the world"/>
<echo message=""/>
<echo message=" ps. This will take a while"/>
<echo message="***************************************************************"/>
<echo message="***************************************************************"/>
<ftp server="upload.sourceforge.net"
remotedir="incoming"
userid="anonymous"
password="${user}@user.sourceforge.net">
<fileset dir="${dist}">
<include name="${name}-${version}.zip"/>
</fileset>
</ftp>
<scp file="${dist}/${name}-${version}.zip"
todir="${user}@shell.sourceforge.net:/home/groups/m/mo/mocklib"
password="${pw}"/>
<sshexec host="shell.sourceforge.net"
username="${user}"
password="${pw}"
command="rm -rf /home/groups/m/mo/mocklib/htdocs/*"/>
<sshexec host="shell.sourceforge.net"
username="${user}"
password="${pw}"
command="unzip /home/groups/m/mo/mocklib/${name}-${version}.zip -d /home/groups/m/mo/mocklib/htdocs/"/>
<sshexec host="shell.sourceforge.net"
username="${user}"
password="${pw}"
command="mv /home/groups/m/mo/mocklib/htdocs/${name}/* /home/groups/m/mo/mocklib/htdocs"/>
<sshexec host="shell.sourceforge.net"
username="${user}"
password="${pw}"
command="rm /home/groups/m/mo/mocklib/${name}*.zip"/>
</target>
</project>
|