
ant.build.xml Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of neodatis-odb Show documentation
Show all versions of neodatis-odb Show documentation
The NeoDatis Object Database
<project default="main" basedir=".." name="NeoDatis - ODB 1.9"> <property name="src" value="src" /> <property name="src-agent" value="src-agent" /> <property name="src-gui" value="src-gui" /> <property name="src-xml" value="src-xml" /> <property name="src-remote" value="src-remote" /> <property name="test" value="test" /> <property name="lib" value="lib" /> <property name="dist" value="dist" /> <property name="bin" value="bin" /> <property name="cvsroot" value="d:/cvs" /> <property name="cvsmodule" value="NeoDatisODB" /> <property name="unit-test-report" value="unit-test-report" /> <property file="ant/build.properties" /> <echo>NeoDatis version is ${neodatis.odb.release}</echo> <path id="compile.classpath" description="Application classpath"> <fileset dir="${lib}" /> </path> <path id="compile.classpath.junits" description="Application classpath"> <fileset dir="${lib}" /> <fileset dir="${dist}" /> </path> <!-- Main --> <target name="main" depends="jar,end,docAndSrc,jar-junits,buildMavenBundle" /> <target name="end"> <delete file="build.number.now" /> </target> <!-- Init --> <target name="init" depends="initBuildNumber"> <delete dir="${bin}" /> <mkdir dir="${bin}" /> <delete dir="${dist}" /> <mkdir dir="${dist}" /> </target> <target name="init1.5" depends="initBuildNumber"> <delete dir="${bin}" /> <mkdir dir="${bin}" /> <mkdir dir="${bin}/img" /> <mkdir dir="${dist}" /> </target> <target name="initBuildNumber"> <copy file="build.number" tofile="build.number.now" /> <echo>Executing init build</echo> <tstamp> <format property="build.time" pattern="dd/MM/yyyy HH:mm:ss" /> </tstamp> <buildnumber /> <echo>Build time : ${build.time}</echo> <echo>Build Number : ${build.number}</echo> <echo>Version Number : ${neodatis.odb.release}</echo> <copy file="template/release-template.txt" tofile="src/org/neodatis/odb/core/Release.java" overwrite="true" /> <replace file="src/org/neodatis/odb/core/Release.java" token="build" value="${build.number}" /> <replace file="src/org/neodatis/odb/core/Release.java" token="date" value="${build.time}" /> <replace file="src/org/neodatis/odb/core/Release.java" token="release-number" value="${neodatis.odb.release}" /> </target> <target name="compile" depends="init"> <javac srcdir="${src}" destdir="${bin}" classpathref="compile.classpath" debug="true" source="1.5" /> <javac srcdir="${src-xml}" destdir="${bin}" classpathref="compile.classpath" debug="true" /> <javac srcdir="${src-gui}" destdir="${bin}" classpathref="compile.classpath" debug="true" /> </target> <target name="docAndSrc"> <javadoc destdir="javadoc" packagenames="org.*" doctitle="NeoDatis ODB - Object DataBase" sourcepath="${src}" package="true" windowtitle="NeoDatis ODB" /> <jar destfile="dist/neodatis-odb-${neodatis.odb.release}.${build.number}-javadoc.jar" basedir="javadoc" /> <jar destfile="dist/neodatis-odb-${neodatis.odb.release}.${build.number}-sources.jar" basedir="." includes="src/**,src-xml/**,src-gui/**,src-tool/**,ant/**,template/**,test/**,lib/**,build.number,manifest/*,src-agent/**,maven/**" /> </target> <target name="jar-junits" depends="init"> <javac srcdir="${test}" destdir="${bin}" classpathref="compile.classpath.junits" debug="true" source="1.5" /> <jar destfile="${dist}/neodatis-junits.jar" basedir="${bin}" index="true" compress="yes" /> </target> <!-- Jar --> <target name="jar" depends="compile"> <echo>Java ${java.version}</echo> <copy todir="${bin}/img"> <fileset dir="${src-gui}/img" /> </copy> <copy tofile="${bin}/build.number" file="build.number.now" /> <jar destfile="${dist}/neodatis-odb.jar" basedir="${bin}" index="true" manifest="manifest/MANIFEST.MF" excludes="org/neodatis/odb/remote/**,**/*Mock*/**" compress="yes" /> <jar destfile="${dist}/neodatis-odb-rt.jar" basedir="${bin}" index="true" manifest="manifest/MANIFEST.MF" excludes="org/neodatis/odb/remote/**,org/neodatis/odb/gui/**,**/*Mock*/**,org/neodatis/tool/DisplayUtility.class,org/neodatis/tool/Monitor.class" compress="yes" /> <jar destfile="${dist}/neodatis-odb-rt-lite.jar" basedir="${bin}" index="true" manifest="manifest/MANIFEST.MF" excludes="org/neodatis/odb/remote/**,org/neodatis/odb/gui/**,org/neodatis/odb/xml/**,org/neodatis/odb/core/server/**,org/neodatis/odb/core/trigger/**,**/*Mock*/**,org/neodatis/tool/mutex/**,org/neodatis/tool/DisplayUtility.class,**/*Server*/**,org/neodatis/tool/Monitor.class" compress="yes" /> <jar destfile="${dist}/neodatis-odb-gui.jar" basedir="${bin}" index="true" manifest="manifest/MANIFEST.MF" includes="org/neodatis/odb/gui/**,img/**" compress="yes" /> </target> <!-- ================================= target: name ================================= --> <target name="send" description="to send the whole package"> <tstamp> <format property="simple.build.time" pattern="yyyy-MM-dd" /> </tstamp> <property name="dir" value="neodatis-odb-${simple.build.time}" /> <delete dir="${dir}" /> <mkdir dir="${dir}" /> <delete file="dist/${dir}.zip" /> <mkdir dir="${dir}/lib" /> <mkdir dir="${dir}/dist" /> <mkdir dir="${dir}/test" /> <mkdir dir="${dir}/bat" /> <mkdir dir="${dir}/license" /> <copy todir="${dir}/lib" file="lib/junit.jar" /> <copy todir="${dir}/dist" file="dist/neodatis-odb.jar" /> <copy todir="${dir}/bat" file="bat/ODBExplorer.bat" /> <copy todir="${dir}/test"> <fileset dir="${src}" /> </copy> <jar destfile="dist/${dir}.zip" basedir="." includes="${dir}/**" /> <delete dir="${dir}" includeemptydirs="true" /> </target> <target name="cvs-checkout"> <cvs command="checkout" dest="c:/tmp" package="${cvsmodule}" cvsroot="${cvsroot}" /> </target> <target name="cvs-tag" depends="initBuildNumber"> <cvs command="commit -m ${build.number}" package="{cvsmodule}" cvsroot="${cvsroot}" tag="Build%{build.number}" /> <!--<cvs command="tag" package="{cvsmodule}" cvsroot="${cvsroot}" tag="Build${build.number}" />--> </target> <target name="all-junits"> <delete file="unit-test-report/summary-local.xml" /> <delete file="unit-test-report/summary-cs.xml" /> <delete file="unit-test-report/summary-same-vm-cs.xml" /> <delete dir="unit-test-report/local" /> <delete dir="unit-test-report/local" /> <mkdir dir="unit-test-report/local" /> <delete dir="unit-test-report/cs" /> <mkdir dir="unit-test-report/cs" /> <delete dir="unit-test-report/same-vm-cs" /> <mkdir dir="unit-test-report/same-vm-cs" /> <antcall target="junit"> <param name="test.property.file" value="config/test-local.properties" /> <param name="mode" value="local" /> </antcall> <antcall target="junit"> <param name="test.property.file" value="config/test-same-vm-cs.properties" /> <param name="mode" value="same-vm-cs" /> </antcall> <java classname="org.neodatis.odb.test.server.TestServer" classpath="${dist}/neodatis-odb.jar;${dist}/neodatis-junits.jar;lib/junit.jar" /> <antcall target="junit"> <param name="test.property.file" value="config/test-cs.properties" /> <param name="mode" value="cs" /> </antcall> </target> <target name="junit"> <delete dir="unit-test-report/${mode}" /> <mkdir dir="unit-test-report/${mode}" /> <junit dir="test" printsummary="yes" haltonfailure="no" haltonerror="no" showoutput="true" fork="true" maxmemory="1G"> <jvmarg value="-Xmx1G -Xmn2G -Dtest.property.file=${test.property.file}" /> <classpath path="${dist}/neodatis-odb.jar;${dist}/neodatis-junits.jar;lib/junit.jar"> </classpath> <formatter type="brief" usefile="false" /> <formatter type="xml" usefile="true" /> <batchtest todir="${unit-test-report}/${mode}"> <fileset dir="${test}"> <include name="**/Test**" /> </fileset> </batchtest> </junit> <replace dir="unit-test-report/${mode}" token="<?xml version="1.0" encoding="UTF-8" ?>" value="" /> <concat append="true" destfile="unit-test-report/summary-${mode}.xml"> <filelist files="${basedir}/template/junit-summary-start.txt" /> </concat> <concat append="true" destfile="unit-test-report/summary-${mode}.xml"> <fileset dir="unit-test-report/${mode}" includes="TEST-*.xml" /> </concat> <concat append="true" destfile="unit-test-report/summary-${mode}.xml"> <filelist files="${basedir}/template/junit-summary-end.txt" /> </concat> </target> <target name="share"> <copy todir="${share.directory.1}" file="dist/neodatis-odb.jar" verbose="true" /> <copy todir="${share.directory.2}" file="dist/neodatis-odb.jar" verbose="true" /> <copy todir="${share.directory.3}" file="dist/neodatis-odb.jar" verbose="true" /> <copy todir="${share.directory.4}" file="dist/neodatis-odb.jar" verbose="true" /> </target> <target name="buildMavenBundle"> <!-- pom.xml neodatis-odb-1.0.jar (or whatever artifact is referred to in the pom.xml) neodatis-odb-1.0-sources.jar (optional, jar containing java sources) neodatis-odb-1.0-javadoc.jar (optional, jar containing javadocs) put this in ${pom.artifactId}-${pom.currentVersion}-bundle.jar --> <delete dir="${bin}/maven"/> <mkdir dir="${bin}/maven"/> <copy file="maven/pom.xml" todir="${bin}/maven"/> <replace file="${bin}/maven/pom.xml" token="neodatis-odb-version" value="${neodatis.odb.release}.${build.number}" summary="true"/> <copy file="dist/neodatis-odb.jar" tofile="${bin}/maven/neodatis-odb-${neodatis.odb.release}.${build.number}.jar"/> <copy file="dist/neodatis-odb-${neodatis.odb.release}.${build.number}-javadoc.jar" todir="${bin}/maven" verbose="true"/> <copy file="dist/neodatis-odb-${neodatis.odb.release}.${build.number}-sources.jar" todir="${bin}/maven" verbose="true"/> <jar destfile="dist/neodatis-odb-${neodatis.odb.release}.${build.number}-bundle.jar" basedir="${bin}/maven/" ></jar> </target> </project>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy