first checkin of build-model which fits the new cvs-layout
This commit is contained in:
parent
e949582026
commit
1527bef536
2 changed files with 271 additions and 266 deletions
|
@ -1,17 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# --------------------------------------------
|
export JAVA_HOME=/usr/lib/j2sdk1.4.0
|
||||||
# Default == jar
|
|
||||||
# "snapshot" target compiles and builds jar in src/ and lib/
|
|
||||||
# "checkout" target gets sources from helma.org in src/
|
|
||||||
# "compile" target compiles java sources in work/
|
|
||||||
# "jar" target compiles and builds jar in work/
|
|
||||||
# "javadoc" target builds the javadoc
|
|
||||||
# "package" target builds core + jar + javadoc + distribution
|
|
||||||
# --------------------------------------------
|
|
||||||
TARGET=${1}
|
|
||||||
|
|
||||||
# export JAVA_HOME=/usr/lib/java
|
|
||||||
|
|
||||||
export CVSHOME=:pserver:anonymous@coletta.helma.at:/opt/cvs
|
export CVSHOME=:pserver:anonymous@coletta.helma.at:/opt/cvs
|
||||||
|
|
||||||
|
@ -28,22 +17,20 @@ if test -z "${JAVA_HOME}" ; then
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test -z "${TARGET}" ; then
|
|
||||||
TARGET=jar
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -f ${JAVA_HOME}/lib/tools.jar ; then
|
if test -f ${JAVA_HOME}/lib/tools.jar ; then
|
||||||
CLASSPATH=${CLASSPATH}:${JAVA_HOME}/lib/tools.jar
|
CLASSPATH=${CLASSPATH}:${JAVA_HOME}/lib/tools.jar
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Now building ${TARGET}..."
|
if test -n "${2}" ; then
|
||||||
|
APPLICATION=-Dapplication=${2}
|
||||||
|
fi
|
||||||
|
|
||||||
CP=${CLASSPATH}:ant.jar:jaxp.jar:crimson.jar:../lib/netcomponents.jar
|
CP=${CLASSPATH}:ant.jar:jaxp.jar:../lib/crimson.jar:../lib/netcomponents.jar
|
||||||
|
|
||||||
echo "Classpath: ${CP}"
|
echo "Classpath: ${CP}"
|
||||||
echo "JAVA_HOME: ${JAVA_HOME}"
|
echo "JAVA_HOME: ${JAVA_HOME}"
|
||||||
|
|
||||||
BUILDFILE=build.xml
|
BUILDFILE=build.xml
|
||||||
|
|
||||||
${JAVA_HOME}/bin/java -classpath ${CP} org.apache.tools.ant.Main -buildfile ${BUILDFILE} ${TARGET}
|
${JAVA_HOME}/bin/java -classpath ${CP} ${APPLICATION} org.apache.tools.ant.Main -buildfile ${BUILDFILE} ${1}
|
||||||
|
|
||||||
|
|
484
build/build.xml
484
build/build.xml
|
@ -1,67 +1,59 @@
|
||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
|
|
||||||
<!-- ======================================================================= -->
|
<!-- todo:
|
||||||
<!-- Hop build file for building with ant -->
|
app-package
|
||||||
<!-- ======================================================================= -->
|
|
||||||
<!-- -->
|
|
||||||
<!-- Usage: -->
|
|
||||||
<!-- ant [-buildfile build.xml] target -->
|
|
||||||
<!-- -->
|
|
||||||
<!-- Available targets: -->
|
|
||||||
<!-- checkout copies helma source code from cvs -->
|
|
||||||
<!-- fullcheckout copies helma source code and applications from cvs -->
|
|
||||||
<!-- compile compiles helma source code to java classes -->
|
|
||||||
<!-- jar compiles helma source code to java archives -->
|
|
||||||
<!-- javadocs creates api documentation for helma java classes -->
|
|
||||||
<!-- helmadocs fetches printable user reference for helma -->
|
|
||||||
<!-- package creates directory with compiled helma and apps -->
|
|
||||||
<!-- fullpackage creates directory with compiled helma, docs and apps -->
|
|
||||||
<!-- package-zip creates zipped file of fullpackage -->
|
|
||||||
<!-- package-tgz creates tared and gzipped file of fullpackage -->
|
|
||||||
<!-- package-all creates fullpackage, package-zip and package-tgz -->
|
|
||||||
<!-- snapshotcompile compiles current helma snapshot to java classes -->
|
|
||||||
<!-- snapshot compiles current helma snapshot to java archive -->
|
|
||||||
<!-- app-package creates a zipped file of an application from cvs -->
|
|
||||||
<!-- antclick creates package incl. helma, Antville and manage app -->
|
|
||||||
<!-- cleanup removes temporary directories -->
|
|
||||||
<!-- fullcleanup removes all directories created by ant -->
|
|
||||||
|
|
||||||
<project name="Hop" default="main" basedir=".">
|
fixcrlf ??
|
||||||
|
switch to ant5?
|
||||||
|
|
||||||
|
Correct permissions and line endings on "bin" scripts
|
||||||
|
fixcrlf srcdir="${tomcat.dist}/bin" includes="*.sh" eol="lf"/
|
||||||
|
fixcrlf srcdir="${tomcat.dist}/bin" includes="*.bat" eol="crlf"/
|
||||||
|
chmod dir="${tomcat.dist}/bin" includes="*.sh" perm="+x"/
|
||||||
|
|
||||||
|
-->
|
||||||
|
|
||||||
|
<project name="Helma" default="usage" basedir=".">
|
||||||
|
|
||||||
<!-- =================================================================== -->
|
<!-- =================================================================== -->
|
||||||
<!-- Initializes some variables -->
|
<!-- Initializes some variables -->
|
||||||
<!-- =================================================================== -->
|
<!-- =================================================================== -->
|
||||||
<target name="init">
|
<target name="init">
|
||||||
<property name="Name" value="helma"/>
|
<property name="Name" value="helma"/>
|
||||||
<property name="year" value="1998-2002"/>
|
<property name="year" value="1998-${year}"/>
|
||||||
<property name="version" value="1.2pre3"/>
|
<property name="version" value="1.2pre3"/>
|
||||||
<property name="project" value="helma"/>
|
<property name="project" value="helma"/>
|
||||||
<property name="build.compiler" value="classic"/>
|
<property name="build.compiler" value="classic"/>
|
||||||
|
|
||||||
|
<property name="cvs.root.apps" value=":pserver:anonymous@adele.helma.at:/opt/cvs/apps"/>
|
||||||
|
<property name="cvs.root.helma" value=":pserver:anonymous@adele.helma.at:/opt/cvs/helma"/>
|
||||||
|
|
||||||
<property name="home.dir" value=".."/>
|
<property name="home.dir" value=".."/>
|
||||||
|
<property name="build.dir" value="${home.dir}/build"/>
|
||||||
|
<property name="build.src" value="${home.dir}/src"/>
|
||||||
|
<property name="build.lib" value="${home.dir}/lib"/>
|
||||||
|
<property name="build.classes" value="${home.dir}/classes"/>
|
||||||
|
<property name="build.docs" value="${home.dir}/docs"/>
|
||||||
|
<property name="build.javadocs" value="${home.dir}/docs/api"/>
|
||||||
|
|
||||||
<!-- values for building a snapshot -->
|
|
||||||
<property name="snapshot.src" value="${home.dir}/src"/>
|
|
||||||
<property name="snapshot.classes" value="${home.dir}/classes"/>
|
|
||||||
<property name="snapshot.lib" value="${home.dir}/lib"/>
|
|
||||||
|
|
||||||
<!-- values for building the distribution -->
|
|
||||||
<property name="build.work" value="${home.dir}/work"/>
|
<property name="build.work" value="${home.dir}/work"/>
|
||||||
<property name="build.checkout" value="${build.work}/checkout"/>
|
<property name="build.dist" value="${home.dir}/dist"/>
|
||||||
<property name="build.src" value="${build.checkout}/hop"/>
|
|
||||||
<property name="build.lib" value="${build.checkout}/hopbuild/lib"/>
|
<property name="jar.name" value="${project}"/>
|
||||||
<property name="build.classes" value="${build.work}/classes"/>
|
<property name="package.name" value="${project}-${version}"/>
|
||||||
<property name="build.docs" value="${build.work}/docs"/>
|
<property name="antclick.name" value="antclick-1.0pre1"/>
|
||||||
<property name="build.javadocs" value="${build.docs}/api"/>
|
|
||||||
<property name="final.name" value="${project}-${version}"/>
|
|
||||||
<property name="final.dir" value="${build.work}/${final.name}"/>
|
|
||||||
|
|
||||||
<property name="cvs.root" value=":pserver:anonymous@coletta.helma.at:/opt/cvs"/>
|
|
||||||
<property name="jar.name" value="helma"/>
|
|
||||||
<property name="debug" value="off"/>
|
<property name="debug" value="off"/>
|
||||||
<property name="optimize" value="on"/>
|
<property name="optimize" value="on"/>
|
||||||
<property name="deprecation" value="off"/>
|
<property name="deprecation" value="off"/>
|
||||||
|
|
||||||
|
<path id="build.class.path">
|
||||||
|
<fileset dir="${home.dir}/lib">
|
||||||
|
<exclude name="**/helma*.jar" />
|
||||||
|
<include name="**/*.jar" />
|
||||||
|
</fileset>
|
||||||
|
</path>
|
||||||
|
|
||||||
<tstamp/>
|
<tstamp/>
|
||||||
|
|
||||||
<filter token="year" value="${year}"/>
|
<filter token="year" value="${year}"/>
|
||||||
|
@ -70,27 +62,34 @@
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<!-- =================================================================== -->
|
<!-- =================================================================== -->
|
||||||
<!-- Copies the source code to the src directroy -->
|
<!-- Help on usage -->
|
||||||
<!-- =================================================================== -->
|
<!-- =================================================================== -->
|
||||||
<target name="checkout" depends="init">
|
<target name="usage">
|
||||||
<mkdir dir="${snapshot.src}"/>
|
<echo message=""/>
|
||||||
<cvs cvsRoot="${cvs.root}" package="hop" dest="${snapshot.src}"/>
|
<echo message=""/>
|
||||||
|
<echo message="Helma build instructions"/>
|
||||||
|
<echo message="-------------------------------------------------------------"/>
|
||||||
|
<echo message=""/>
|
||||||
|
<echo message=" available targets are:"/>
|
||||||
|
<echo message=""/>
|
||||||
|
<echo message=" compile --> compiles the source code to ./classes"/>
|
||||||
|
<echo message=" jar --> generates the ./lib/helma-YYYYMMDD.jar file"/>
|
||||||
|
<echo message=" javadocs --> generates the API docs"/>
|
||||||
|
<echo message=" docs --> tries to retrieve the HTML documentation "/>
|
||||||
|
<echo message=" (may need proxy settings in startscript"/>
|
||||||
|
<echo message=" package --> generates the distribution (zip and tar.gz)"/>
|
||||||
|
<echo message=" antclick --> generates the distribution (zip and tar.gz)"/>
|
||||||
|
<echo message=" with antville preconfigured"/>
|
||||||
|
<echo message=" app [name] --> gets an application from the cvs and zips it"/>
|
||||||
|
<echo message=""/>
|
||||||
|
<echo message=" usage --> provides help on using the build tool (default)"/>
|
||||||
|
<echo message=""/>
|
||||||
|
<echo message=" See comments inside the build.xml file for more details."/>
|
||||||
|
<echo message="-------------------------------------------------------------"/>
|
||||||
|
<echo message=""/>
|
||||||
|
<echo message=""/>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<!-- =================================================================== -->
|
|
||||||
<!-- Copies the everything from cvs that's needed to build a full -->
|
|
||||||
<!-- helma distribution -->
|
|
||||||
<!-- =================================================================== -->
|
|
||||||
<target name="fullcheckout" depends="init">
|
|
||||||
<mkdir dir="${build.checkout}"/>
|
|
||||||
<cvs cvsRoot="${cvs.root}" package="hop" dest="${build.checkout}"/>
|
|
||||||
<cvs cvsRoot="${cvs.root}" package="hopbuild" dest="${build.checkout}"/>
|
|
||||||
<cvs cvsRoot="${cvs.root}" package="apps/base" dest="${build.checkout}"/>
|
|
||||||
<cvs cvsRoot="${cvs.root}" package="apps/himp" dest="${build.checkout}"/>
|
|
||||||
<cvs cvsRoot="${cvs.root}" package="apps/bloggerapi" dest="${build.checkout}"/>
|
|
||||||
<cvs cvsRoot="${cvs.root}" package="apps/lillebror" dest="${build.checkout}"/>
|
|
||||||
<cvs cvsRoot="${cvs.root}" package="apps/manage" dest="${build.checkout}"/>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<!-- =================================================================== -->
|
<!-- =================================================================== -->
|
||||||
<!-- Compiles the source directory -->
|
<!-- Compiles the source directory -->
|
||||||
|
@ -102,25 +101,22 @@
|
||||||
debug="${debug}"
|
debug="${debug}"
|
||||||
deprecation="${deprecation}"
|
deprecation="${deprecation}"
|
||||||
optimize="${optimize}">
|
optimize="${optimize}">
|
||||||
<classpath>
|
<classpath refid="build.class.path" />
|
||||||
<fileset dir="${build.lib}">
|
|
||||||
<include name="**/*.jar" />
|
|
||||||
</fileset>
|
|
||||||
<pathelement path="${classpath}" />
|
|
||||||
</classpath>
|
|
||||||
</javac>
|
</javac>
|
||||||
<rmic classname="helma.framework.core.Application" base="${build.classes}"/>
|
<rmic classname="helma.framework.core.Application" base="${build.classes}"/>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
|
||||||
<!-- =================================================================== -->
|
<!-- =================================================================== -->
|
||||||
<!-- Creates a .jar file -->
|
<!-- Creates a helma.jar file (snapshot) in the lib-directory -->
|
||||||
<!-- =================================================================== -->
|
<!-- =================================================================== -->
|
||||||
<target name="jar" depends="compile">
|
<target name="jar" depends="compile">
|
||||||
<jar jarfile="${build.work}/${jar.name}-${DSTAMP}.jar"
|
<jar jarfile="${build.lib}/${jar.name}-${DSTAMP}.jar"
|
||||||
basedir="${build.classes}"
|
basedir="${build.classes}"
|
||||||
excludes="**/package.html"/>
|
excludes="**/package.html"/>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
|
||||||
<!-- =================================================================== -->
|
<!-- =================================================================== -->
|
||||||
<!-- Creates the API documentation -->
|
<!-- Creates the API documentation -->
|
||||||
<!-- =================================================================== -->
|
<!-- =================================================================== -->
|
||||||
|
@ -134,134 +130,169 @@
|
||||||
version="false"
|
version="false"
|
||||||
windowtitle="${Name} ${version} API"
|
windowtitle="${Name} ${version} API"
|
||||||
doctitle="${Name} ${version} API"
|
doctitle="${Name} ${version} API"
|
||||||
bottom="Copyright © ${year} Helma.org. All Rights Reserved.">
|
bottom="Copyright © ${year} Helma.org. All Rights Reserved."
|
||||||
<classpath>
|
classpathref="build.class.path"
|
||||||
<fileset dir="${build.lib}">
|
/>
|
||||||
<include name="**/*.jar" />
|
|
||||||
</fileset>
|
|
||||||
<pathelement path="${classpath}" />
|
|
||||||
</classpath>
|
|
||||||
</javadoc>
|
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
|
||||||
<!-- =================================================================== -->
|
<!-- =================================================================== -->
|
||||||
<!-- Get the documentation (currently fails due to request time-out) -->
|
<!-- Get the documentation (currently can fail due to request time-out -->
|
||||||
|
<!-- or missing support for proxies) -->
|
||||||
<!-- =================================================================== -->
|
<!-- =================================================================== -->
|
||||||
<target name="helmadocs" depends="init">
|
<target name="docs" depends="init">
|
||||||
<get src="http://www.helma.org/docs/reference/print"
|
<get src="http://www.helma.org/docs/reference/print"
|
||||||
dest="${build.docs}/reference.html"
|
dest="${build.docs}/reference.html"
|
||||||
ignoreerrors="true"
|
ignoreerrors="true"
|
||||||
/>
|
/>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- =================================================================== -->
|
<!-- =================================================================== -->
|
||||||
<!-- Package -->
|
<!-- Creates the full helma distribution -->
|
||||||
<!-- =================================================================== -->
|
<!-- =================================================================== -->
|
||||||
<target name="package" depends="init, fullcheckout, jar">
|
<target name="package" depends="init">
|
||||||
<mkdir dir="${final.dir}"/>
|
<mkdir dir="${build.work}"/>
|
||||||
|
|
||||||
<mkdir dir="${final.dir}/src/hop"/>
|
<!-- create the main part of helma -->
|
||||||
<copy todir="${final.dir}/src/hop">
|
<antcall target="package-raw">
|
||||||
<fileset dir="${build.checkout}/hop" />
|
<param name="buildvariation" value="main" />
|
||||||
</copy>
|
</antcall>
|
||||||
|
|
||||||
<copy todir="${final.dir}/build">
|
<!-- checkout the demo apps (and zip manage-app) -->
|
||||||
<fileset dir="${build.checkout}/hopbuild/build"/>
|
<antcall target="package-apps" />
|
||||||
</copy>
|
|
||||||
<chmod file="${final.dir}/build/build.sh" perm="755"/>
|
|
||||||
|
|
||||||
<copy todir="${final.dir}/lib">
|
<!-- zip up the whole thing -->
|
||||||
<fileset dir="${build.checkout}/hopbuild/lib"/>
|
<antcall target="package-zip">
|
||||||
</copy>
|
<param name="filename" value="${package.name}"/>
|
||||||
|
</antcall>
|
||||||
|
<antcall target="package-tgz">
|
||||||
|
<param name="filename" value="${package.name}"/>
|
||||||
|
</antcall>
|
||||||
|
|
||||||
<copy file="${build.work}/${jar.name}-${DSTAMP}.jar" tofile="${final.dir}/lib/helma.jar"/>
|
<!-- clean up -->
|
||||||
|
<delete dir="${build.work}"/>
|
||||||
<copy todir="${final.dir}">
|
|
||||||
<fileset dir="${build.checkout}/hopbuild/skeleton" excludes="**/CVS,extras/**"/>
|
|
||||||
</copy>
|
|
||||||
<chmod file="${final.dir}/hop.sh" perm="755"/>
|
|
||||||
|
|
||||||
<copy todir="${final.dir}/apps">
|
|
||||||
<fileset dir="${build.checkout}/apps" excludes="**/CVS,manage/**"/>
|
|
||||||
</copy>
|
|
||||||
|
|
||||||
<mkdir dir="${final.dir}/apps/manage"/>
|
|
||||||
<zip zipfile="${final.dir}/apps/manage/manage.zip" basedir="${build.checkout}/apps/manage/" includes="**" excludes="**/properties,readme/**" />
|
|
||||||
<copy todir="${final.dir}/apps/manage">
|
|
||||||
<fileset dir="${build.checkout}/apps/manage" includes="app.properties,class.properties,readme.txt"/>
|
|
||||||
</copy>
|
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
|
||||||
<!-- =================================================================== -->
|
<!-- =================================================================== -->
|
||||||
<!-- Full Package (includes documentation) -->
|
<!-- Compile Helma and prepare the skeleton in a temporary directory. -->
|
||||||
|
<!-- Used by package and antclick. -->
|
||||||
<!-- =================================================================== -->
|
<!-- =================================================================== -->
|
||||||
<target name="fullpackage" depends="package, javadocs">
|
<target name="package-raw" depends="init, jar">
|
||||||
<copy todir="${final.dir}/docs">
|
|
||||||
|
<!-- copy the framework (apps.props, server.props, hop/db, hop/static) -->
|
||||||
|
<copy todir="${build.work}">
|
||||||
|
<fileset dir="${build.dir}/${buildvariation}" excludes="**/CVS**"/>
|
||||||
|
</copy>
|
||||||
|
|
||||||
|
<!-- copy the whole docs-directory -->
|
||||||
|
<copy todir="${build.work}/docs">
|
||||||
<fileset dir="${build.docs}"/>
|
<fileset dir="${build.docs}"/>
|
||||||
</copy>
|
</copy>
|
||||||
</target>
|
|
||||||
|
|
||||||
<!-- =================================================================== -->
|
<!-- copy all libraries except helma-YYYYMMDD.jar -->
|
||||||
<!-- Packages the distribution with ZIP -->
|
<copy todir="${build.work}/lib">
|
||||||
<!-- =================================================================== -->
|
<fileset dir="${home.dir}/lib">
|
||||||
<target name="package-zip" depends="fullpackage">
|
<exclude name="**/helma*.jar" />
|
||||||
<zip zipfile="${home.dir}/${Name}-${version}.zip" basedir="${build.work}" includes="**/${final.name}/**"/>
|
<include name="**/*.jar" />
|
||||||
</target>
|
</fileset>
|
||||||
|
</copy>
|
||||||
|
|
||||||
<!-- =================================================================== -->
|
<!-- rename the current jar-file -->
|
||||||
<!-- Packages the distribution with TAR-GZIP -->
|
<copy file="${build.lib}/${jar.name}-${DSTAMP}.jar" tofile="${build.work}/lib/helma.jar"/>
|
||||||
<!-- =================================================================== -->
|
|
||||||
<target name="package-tgz" depends="fullpackage">
|
<!-- zip the sourcecode -->
|
||||||
<tar tarfile="${build.work}/${Name}-${version}.tar" basedir="${build.work}/${final.name}" excludes="**">
|
<mkdir dir="${build.work}/src"/>
|
||||||
<tarfileset dir="${build.work}" mode="755">
|
<tar tarfile="${build.work}/src/helma-src.tar" basedir="${build.src}/">
|
||||||
<include name="${final.name}/hop.sh"/>
|
<tarfileset dir="${build.src}">
|
||||||
<include name="${final.name}/build/build.sh"/>
|
<include name="${build.src}/**"/>
|
||||||
</tarfileset>
|
|
||||||
<tarfileset dir="${build.work}">
|
|
||||||
<include name="${final.name}/**"/>
|
|
||||||
<exclude name="${final.name}/hop.sh"/>
|
|
||||||
<exclude name="${final.name}/build/build.sh"/>
|
|
||||||
</tarfileset>
|
</tarfileset>
|
||||||
</tar>
|
</tar>
|
||||||
<gzip zipfile="${home.dir}/${Name}-${version}.tar.gz" src="${build.work}/${Name}-${version}.tar"/>
|
<gzip zipfile="${build.work}/src/helma-src.tar.gz" src="${build.work}/src/helma-src.tar"/>
|
||||||
|
<delete file="${build.work}/src/helma-src.tar"/>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<!-- =================================================================== -->
|
|
||||||
<!-- Packages the distribution with ZIP and TAR-GZIP -->
|
|
||||||
<!-- =================================================================== -->
|
|
||||||
<target name="package-all" depends="package-zip, package-tgz">
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<!-- =================================================================== -->
|
<!-- =================================================================== -->
|
||||||
<!-- Compiles the source directory for a snapshot -->
|
<!-- Checkout demo apps, put them in work directory and zip manage app -->
|
||||||
<!-- =================================================================== -->
|
<!-- =================================================================== -->
|
||||||
<target name="snapshotcompile" depends="init">
|
<target name="package-apps" depends="init">
|
||||||
<mkdir dir="${snapshot.classes}"/>
|
|
||||||
<javac srcdir="${snapshot.src}/hop"
|
<mkdir dir="${build.work}/apps" />
|
||||||
destdir="${snapshot.classes}"
|
|
||||||
debug="${debug}"
|
<!-- get demo apps -->
|
||||||
deprecation="${deprecation}"
|
<cvs cvsRoot="${cvs.root.apps}" command="export" tag="HEAD" package="base" dest="${build.work}/apps" />
|
||||||
optimize="${optimize}">
|
<cvs cvsRoot="${cvs.root.apps}" command="export" tag="HEAD" package="bloggerapi" dest="${build.work}/apps" />
|
||||||
<classpath>
|
<cvs cvsRoot="${cvs.root.apps}" command="export" tag="HEAD" package="himp" dest="${build.work}/apps" />
|
||||||
<fileset dir="${snapshot.lib}">
|
<cvs cvsRoot="${cvs.root.apps}" command="export" tag="HEAD" package="hopblog" dest="${build.work}/apps" />
|
||||||
<include name="**/*.jar" />
|
<cvs cvsRoot="${cvs.root.apps}" command="export" tag="HEAD" package="lillebror" dest="${build.work}/apps" />
|
||||||
<exclude name="**/helma*.jar" />
|
|
||||||
</fileset>
|
<antcall target="package-manage" />
|
||||||
<pathelement path="${classpath}" />
|
|
||||||
</classpath>
|
<!-- write out apps.properties file -->
|
||||||
</javac>
|
<echo file="${build.work}/apps.properties" append="false">
|
||||||
<rmic classname="helma.framework.core.Application" base="${snapshot.classes}"/>
|
# list of applications to be started by helma
|
||||||
|
base
|
||||||
|
bloggerapi
|
||||||
|
himp
|
||||||
|
hopblog
|
||||||
|
lillebror
|
||||||
|
manage
|
||||||
|
</echo>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- =================================================================== -->
|
<!-- =================================================================== -->
|
||||||
<!-- Creates a .jar file for a snapshot -->
|
<!-- Checkout and zip manage application -->
|
||||||
<!-- =================================================================== -->
|
<!-- =================================================================== -->
|
||||||
<target name="snapshot" depends="snapshotcompile">
|
<target name="package-manage" depends="init">
|
||||||
<jar jarfile="${snapshot.lib}/${jar.name}-${DSTAMP}.jar"
|
<cvs cvsRoot="${cvs.root.apps}" command="export" tag="HEAD" package="manage" dest="${build.work}" />
|
||||||
basedir="${snapshot.classes}"
|
<mkdir dir="${build.work}/apps/manage"/>
|
||||||
excludes="**/package.html"/>
|
<zip zipfile="${build.work}/apps/manage/manage.zip" basedir="${build.work}/manage/" includes="**" excludes="**/properties,readme/**" />
|
||||||
|
<copy todir="${build.work}/apps/manage">
|
||||||
|
<fileset dir="${build.work}/manage" includes="app.properties,class.properties,readme.txt"/>
|
||||||
|
</copy>
|
||||||
|
<delete dir="${build.work}/manage" />
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- =================================================================== -->
|
||||||
|
<!-- Packages the work directory with TAR-GZIP -->
|
||||||
|
<!-- needs parameter ${filename} for final dist-file -->
|
||||||
|
<!-- =================================================================== -->
|
||||||
|
<target name="package-tgz" depends="init">
|
||||||
|
<mkdir dir="${build.dist}" />
|
||||||
|
<fixcrlf srcdir="${build.work}" eol="lf" eof="remove" includes="**/*.txt, **/*.properties, **/*.hac, **/*.js, **/*.skin" />
|
||||||
|
<tar tarfile="${build.dist}/${filename}.tar" basedir="${build.work}">
|
||||||
|
<tarfileset dir="${build.work}" mode="755">
|
||||||
|
<include name="${build.work}/hop.sh"/>
|
||||||
|
</tarfileset>
|
||||||
|
<tarfileset dir="${build.work}">
|
||||||
|
<include name="${build.work}/**"/>
|
||||||
|
<exclude name="${build.work}/hop.sh"/>
|
||||||
|
</tarfileset>
|
||||||
|
</tar>
|
||||||
|
<gzip zipfile="${build.dist}/${filename}.tar.gz" src="${build.dist}/${filename}.tar"/>
|
||||||
|
<delete file="${build.dist}/${filename}.tar"/>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- =================================================================== -->
|
||||||
|
<!-- Packages the work directory with ZIP -->
|
||||||
|
<!-- needs parameter ${filename} for final dist-file -->
|
||||||
|
<!-- =================================================================== -->
|
||||||
|
<target name="package-zip" depends="init">
|
||||||
|
<fixcrlf srcdir="${build.work}" eol="crlf" includes="**/*.txt, **/*.properties, **/*.hac, **/*.js, **/*.skin, **/*.xml" />
|
||||||
|
<zip zipfile="${build.dist}/${filename}.zip">
|
||||||
|
<zipfileset dir="${build.work}" prefix="${filename}" includes="**" />
|
||||||
|
</zip>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
|
||||||
<!-- =================================================================== -->
|
<!-- =================================================================== -->
|
||||||
<!-- Checks out and zips an application defined by -Dapplication=appName -->
|
<!-- Checks out and zips an application defined by -Dapplication=appName -->
|
||||||
<!-- e.g. ant [-buildfile build.xml] -Dapplication=helmaorg -->
|
<!-- e.g. ant [-buildfile build.xml] -Dapplication=helmaorg -->
|
||||||
|
@ -272,91 +303,78 @@
|
||||||
<zip zipfile="../${application}.zip" basedir="${build.checkout}/apps/${application}/" includes="**"/>
|
<zip zipfile="../${application}.zip" basedir="${build.checkout}/apps/${application}/" includes="**"/>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- =================================================================== -->
|
<!-- =================================================================== -->
|
||||||
<!-- Make Antclick package (helma plus Antville and manage apps) -->
|
<!-- Make Antclick package (helma plus Antville and manage apps) -->
|
||||||
<!-- =================================================================== -->
|
<!-- =================================================================== -->
|
||||||
<target name="antclick" depends="package">
|
<target name="antclick" depends="init">
|
||||||
<property name="antclick.dir" value="${build.work}/antclick"/>
|
<mkdir dir="${build.work}"/>
|
||||||
<mkdir dir="${antclick.dir}"/>
|
|
||||||
<cvs cvsRoot="${cvs.root}" package="apps/antville" dest="${build.checkout}"/>
|
<!-- create the main part of helma -->
|
||||||
<copy todir="${antclick.dir}/">
|
<antcall target="package-raw">
|
||||||
<fileset dir="${final.dir}" includes="db.properties,server.properties,*.txt,lib/**,db/antville.*"/>
|
<param name="buildvariation" value="antclick" />
|
||||||
</copy>
|
</antcall>
|
||||||
<copy todir="${antclick.dir}/apps/">
|
|
||||||
<fileset dir="${build.checkout}/apps" excludes="antville/images.zip,antville/*.sql,antville/db.properties" includes="antville/**"/>
|
<!-- get antville -->
|
||||||
</copy>
|
<mkdir dir="${build.work}/apps" />
|
||||||
<copy todir="${antclick.dir}/apps/">
|
<!-- to retrieve special versions of antville insert additional attributes:
|
||||||
<fileset dir="${final.dir}/apps" includes="manage/**"/>
|
tag="TAGNAME", date="1972-09-24" or date="1972-09-24 20:05" -->
|
||||||
</copy>
|
<cvs cvsRoot="${cvs.root.apps}" command="export" tag="HEAD" package="antville" dest="${build.work}/apps" />
|
||||||
<copy todir="${antclick.dir}/">
|
|
||||||
<fileset dir="${build.checkout}/hopbuild/skeleton/extras" includes="apps.properties,hop.bat,hop.sh"/>
|
<!-- unzip images -->
|
||||||
</copy>
|
<mkdir dir="${build.work}/static/antville"/>
|
||||||
<copy todir="${antclick.dir}/lib/">
|
<unzip src="${build.work}/apps/antville/images.zip" dest="${build.work}/static/antville">
|
||||||
<fileset dir="${build.checkout}/hopbuild/skeleton/extras" includes="hsqldb-1.7RC5Pre2-patched.jar"/>
|
|
||||||
</copy>
|
|
||||||
<mkdir dir="${antclick.dir}/static/antville"/>
|
|
||||||
<unzip src="${build.checkout}/apps/antville/images.zip" dest="${antclick.dir}/static/antville">
|
|
||||||
<patternset>
|
<patternset>
|
||||||
<include name="**"/>
|
<include name="**"/>
|
||||||
</patternset>
|
</patternset>
|
||||||
</unzip>
|
</unzip>
|
||||||
<copy todir="${antclick.dir}/apps/antville/">
|
|
||||||
<fileset dir="${build.checkout}/hopbuild/skeleton/extras" includes="db.properties"/>
|
<!-- delete antville's mysql-scripts, image-zip etc -->
|
||||||
</copy>
|
<delete>
|
||||||
<chmod file="${antclick.dir}/hop.sh" perm="755"/>
|
<fileset dir="${build.work}/apps/antville" includes="images.zip,*.sql" />
|
||||||
<zip zipfile="${home.dir}/antclick.zip" basedir="${build.work}/" includes="antclick/**"/>
|
</delete>
|
||||||
<tar tarfile="${build.work}/antclick.tar" basedir="${antclick.dir}" excludes="**">
|
|
||||||
<tarfileset dir="${build.work}" mode="755">
|
<!-- get and zip manage-app -->
|
||||||
<include name="antclick/hop.sh"/>
|
<antcall target="package-manage" />
|
||||||
</tarfileset>
|
|
||||||
|
<!-- zip up the whole thing -->
|
||||||
|
<antcall target="package-zip">
|
||||||
|
<param name="filename" value="${antclick.name}"/>
|
||||||
|
</antcall>
|
||||||
|
<antcall target="package-tgz">
|
||||||
|
<param name="filename" value="${antclick.name}"/>
|
||||||
|
</antcall>
|
||||||
|
|
||||||
|
<!-- clean up -->
|
||||||
|
<delete dir="${build.work}"/>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- =================================================================== -->
|
||||||
|
<!-- Gets an application from the cvs and zips/targzs it -->
|
||||||
|
<!-- =================================================================== -->
|
||||||
|
<target name="app" depends="init">
|
||||||
|
<mkdir dir="${build.dist}" />
|
||||||
|
<mkdir dir="${build.work}" />
|
||||||
|
|
||||||
|
<!-- to retrieve special versions of an application insert
|
||||||
|
additional attributes: tag="TAGNAME" or date="1972-09-24 20:05" -->
|
||||||
|
<cvs cvsRoot="${cvs.root.apps}" command="export" tag="HEAD" package="${application}" dest="${build.work}" />
|
||||||
|
|
||||||
|
<fixcrlf srcdir="${build.work}" eol="crlf" eof="add" includes="**/*.txt, **/*.properties, **/*.hac, **/*.js, **/*.skin, **/*.xml" />
|
||||||
|
<zip zipfile="${build.dist}/${application}-${DSTAMP}.zip" basedir="${build.work}" includes="**"/>
|
||||||
|
|
||||||
|
<fixcrlf srcdir="${build.work}" eol="lf" eof="remove" includes="**/*.txt, **/*.properties, **/*.hac, **/*.js, **/*.skin" />
|
||||||
|
<tar tarfile="${build.dist}/${application}-${DSTAMP}.tar" basedir="${build.work}">
|
||||||
<tarfileset dir="${build.work}">
|
<tarfileset dir="${build.work}">
|
||||||
<include name="antclick/**"/>
|
<include name="${build.work}/**"/>
|
||||||
<exclude name="antclick/hop.sh"/>
|
|
||||||
</tarfileset>
|
</tarfileset>
|
||||||
</tar>
|
</tar>
|
||||||
<gzip zipfile="${home.dir}/antclick.tgz" src="${build.work}/antclick.tar"/>
|
<gzip zipfile="${build.dist}/${application}-${DSTAMP}.tar.gz" src="${build.dist}/${application}-${DSTAMP}.tar" />
|
||||||
</target>
|
|
||||||
|
|
||||||
<!-- =================================================================== -->
|
<delete file="${build.dist}/${application}-${DSTAMP}.tar" />
|
||||||
<!-- Remove temporary directories -->
|
|
||||||
<!-- =================================================================== -->
|
|
||||||
<target name="cleanup" depends="init">
|
|
||||||
<delete dir="${build.classes}"/>
|
|
||||||
<delete dir="${final.dir}"/>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<!-- =================================================================== -->
|
|
||||||
<!-- Remove all directories created by ant -->
|
|
||||||
<!-- =================================================================== -->
|
|
||||||
<target name="fullcleanup" depends="init">
|
|
||||||
<delete dir="${build.work}" />
|
<delete dir="${build.work}" />
|
||||||
<!-- delete dir="${snapshot.src}"/ -->
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<!-- =================================================================== -->
|
|
||||||
<!-- These are just some test targets -->
|
|
||||||
<!-- =================================================================== -->
|
|
||||||
<target name="ftp-test" depends="">
|
|
||||||
<ftp server="piefke.helma.at"
|
|
||||||
userid="anonymous"
|
|
||||||
password="tobi@helma.at">
|
|
||||||
<fileset dir="${home.dir}">
|
|
||||||
<include name="${Name}-${version}.zip,${Name}-${version}.tar.gz"/>
|
|
||||||
</fileset>
|
|
||||||
</ftp>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="test1" depends="init">
|
|
||||||
<mkdir dir="${build.checkout}"/>
|
|
||||||
<cvs cvsRoot="${cvs.root}" package="apps/manage" dest="${build.checkout}"/>
|
|
||||||
<zip zipfile="../manage.zip" basedir="${build.checkout}/apps/manage/" includes="**"/>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="test2" depends="init">
|
|
||||||
<property name="antclick.dir" value="${build.work}/antclick"/>
|
|
||||||
<copy todir="${antclick.dir}/apps/antville/">
|
|
||||||
<fileset dir="${build.checkout}/hopbuild/skeleton/extras" includes="db.properties"/>
|
|
||||||
</copy>
|
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
Loading…
Add table
Reference in a new issue