I have a new bootstrap build file that I've included as an attachment.
Now it builds includes the date in the nightlies (ex.
myfaces-20050311.tgz). It also has a new "release" target to build
releases (which follows the nighly procedure but checks out the
specific tagged version.)
To use the release target:
ant -buildfile bootstrap.xml -Dbuild.version=1_0_9 clean release
NOTE: You will need cvs in your path. Also, this won't work until
there is a tagged rel_1_0_9 version. (Older versions won't work
either because they do not have a release target in the build.xml file
- that was just added.)
sean
On Tue, 8 Mar 2005 16:07:28 +0100, Martin Marinschek
<[EMAIL PROTECTED]> wrote:
> yes, that is a good idea!
>
> testing on my server is not a problem, if you know how to work the
> linux stuff ;)
>
> regards,
>
> Martin
>
> On Tue, 8 Mar 2005 08:14:55 -0500, Sean Schofield
> <[EMAIL PROTECTED]> wrote:
> > Martin,
> >
> > Thanks for testing. Good point about the naming. For now I was just
> > following the standard src-release and bin-release targets. Let me
> > tweak those so I can optionally change the name.
> >
> > Perhaps something like myfaces-20050308.tar.gz? I believe this is
> > what I've seen with commons nightlies (although I can't say for sure.)
> >
> > I will tweak build.xml to do this plus I will add nightly examples
> > build. Also I will modify bootstrap to "publish" to specified
> > directory and write a chron script to run it. Then maybe we can test
> > on your server? Even if we don't use it to actually host the
> > nightlies it would still be a good test.
> >
> > sean
> >
> > On Tue, 8 Mar 2005 10:21:45 +0100, Martin Marinschek
> > <[EMAIL PROTECTED]> wrote:
> > > Ok, I checked your bootstrap files, run like a charm...
> > >
> > > the only thing - the name of the jar file generated does not indicate
> > > this to be a nightly build. Is this a common practice among apache
> > > projects? I don't really know if it wasn't good to immediately
> > > indicate to the user that this is a take-with-care build...
> > >
> > > regards,
> > >
> > > Martin
> > >
> > >
> > > On Mon, 7 Mar 2005 15:46:47 -0500, Sean Schofield
> > > <[EMAIL PROTECTED]> wrote:
> > > > Here you go. Also, do we have your +1 on simplified examples? I know
> > > > you said yes earlier but now there is a WAR file for you to check.
> > > > (See Matthias' post.) The reason why I ask is I'd like to add some
> > > > more tree2 examples to help with that discussion and I don't want to
> > > > add them to the old style examples.
> > > >
> > > > Regards,
> > > > sean
> > > >
> > > > ---------- Forwarded message ----------
> > > > From: Sean Schofield <[EMAIL PROTECTED]>
> > > > Date: Sat, 5 Mar 2005 15:32:37 -0500
> > > > Subject: Nightly bootstrap build file
> > > > To: MyFaces Development <[email protected]>
> > > >
> > > > I've got an early version of the bootstrap file done. Put in any
> > > > directory and you can do the nightly build. Eventually it will also
> > > > possible to use it for release build.
> > > >
> > > > Here is the command for the build: ant -buildfile bootstrap.xml clean
> > > > nightly
> > > >
> > > > You'll need the CVS binary as part of your PATH.
> > > >
> > > > I tested it and it seems to work fine. Right now its building the
> > > > src-release and bin-release targets. I will eventually also add the
> > > > examples-release but there is a small issue I'm working on first.
> > > > Later I will add a "publish" target that will use cp or scp to copy
> > > > the nightly builds to the publish directory. I'll wait for Martin's
> > > > efforts on getting a build server before adding that.
> > > >
> > > > If someone besides myself could test and report back to me that would
> > > > be helpful.
> > > >
> > > > Regards,
> > > > sean
> > > >
> > > >
> > > >
> > >
> >
>
<?xml version="1.0"?>
<!--
This is a basic ant build file that can perform a so-called "bootstrap" build of any project.
The only requirement is that the project be checked in CVS and have its own build file. Basically this will check out
the project (by specific version if desired) and run the appropriate build script. The CVS client must also be available
through the system path.
-->
<project name="Bootstrap Build Script" default="nightly" basedir=".">
<!-- use properties file to determine cvs configuration info -->
<property file="bootstrap.properties"/>
<property name="checkout.dir" value="${project.name}"/>
<property name="build.dir" value="${basedir}/${project.name}/build"/>
<property name="temp.dir" value="${build.dir}/temp"/>
<target name="prepare">
<!-- make sure project.name property was set (externally) -->
<fail unless="project.name">
The project.name property must be set. (ex. ant -buildfile bootstrap.xml -Dproject.name=cdrh-commons)
</fail>
<!-- use latest version if version is not specified -->
<condition property="cvs.tag" value="HEAD">
<and>
<not>
<isset property="build.version"/>
</not>
</and>
</condition>
<condition property="cvs.tag" value="rel_${build.version}">
<and>
<isset property="build.version"/>
</and>
</condition>
<condition property="build.version" value="HEAD">
<and>
<not>
<isset property="build.version"/>
</not>
</and>
</condition>
<echo message="build.version=${build.version}"/>
<echo message="cvs.tag=${cvs.tag}"/>
<!-- determine if the files have been checked out already -->
<available file="${project.name}" type="dir" property="already.checked.out"/>
<!-- classpath for <javadoc> -->
<path id="doclet.classpath">
<fileset dir="${lib.dir}">
<include name="*.jar"/>
<include name="*.JAR"/>
</fileset>
</path>
</target>
<target name="clean" description="Remove everything generated from previous builds of the same project">
<delete dir="${checkout.dir}"/>
</target>
<target name="cvs-checkout" depends="prepare" unless="already.checked.out">
<echo message="cvs.server = ${cvs.server}"/>
<echo message="cvs.repository = ${cvs.repository}"/>
<echo message="cvs.username = ${cvs.username}"/>
<echo message="cvs.password = ${cvs.password}"/>
<!-- login to cvs -->
<cvspass cvsroot=":pserver:[EMAIL PROTECTED]:${cvs.repository}"
password="${cvs.password}"
passfile=".cvspass"/>
<cvs cvsroot=":pserver:[EMAIL PROTECTED]:${cvs.repository}"
dest="."
command="checkout"
tag="${cvs.tag}"
package="${project.name}"
quiet="true"/>
</target>
<target name="cvs-update" depends="prepare" if="already.checked.out">
<!-- login to cvs -->
<cvspass cvsroot=":pserver:[EMAIL PROTECTED]:${cvs.repository}"
password="${cvs.password}"/>
<cvs cvsroot=":pserver:[EMAIL PROTECTED]:${cvs.repository}"
dest="."
command="update -dP"
package="${project.name}"
quiet="true"/>
</target>
<target name="cvs-list" description="Lists all of the projects in the CVS repository">
<!-- login to cvs -->
<cvspass cvsroot=":pserver:[EMAIL PROTECTED]:${cvs.repository}"
password="${cvs.password}"/>
<cvs cvsroot=":pserver:[EMAIL PROTECTED]:${cvs.repository}"
dest="."
command="ls -q"
quiet="true"/>
</target>
<target name="nightly" depends="cvs-checkout,cvs-update">
<!--
<fail message="Do not specify a build version when executing the 'nightly' target">
<condition>
<and>
<isset property="build.version"/>
</and>
</condition>
</fail>
-->
<echo message="build.dir: ${build.dir}"/>
<echo message="building nigthly for ${project.name} ..." level="debug"/>
<!-- create new directory for nightly buld output -->
<tstamp>
<format property="TODAY" pattern="yyyyMMdd" locale="en"/>
</tstamp>
<property name="release.version" value="${TODAY}"/>
<property name="nightly.dir" value="${build.dir}/nightly/${TODAY}"/>
<echo message="build output directory: ${nightly.dir}"/>
<mkdir dir="${nightly.dir}"/>
<!-- execute the nightly build file that was just checked out -->
<ant dir="${build.dir}" target="nightly" inheritRefs="true"/>
</target>
<target name="release" depends="cvs-checkout,cvs-update">
<!--
<fail message="Must specify a build version (ex. 1_0_8)">
<condition>
<and>
<not>
<isset property="build.version"/>
</not>
</and>
</condition>
</fail>
-->
<echo message="build.dir: ${build.dir}"/>
<echo message="building release for ${project.name} ..." level="debug"/>
<property name="release.dir" value="${build.dir}/release"/>
<echo message="build output directory: ${release.dir}"/>
<mkdir dir="${release.dir}"/>
<!-- execute the nightly build file that was just checked out -->
<ant dir="${build.dir}" target="release" inheritRefs="true"/>
</target>
</project>