*) migrating ant build files to generate a single extension tar per default

This is buildconfigureable by changing the extensionTarget Property in the build.properties file
*) Trying to solve "yacy.java template replacement / ant build failed" bug

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@169 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
theli 20 years ago
parent fdd606c8c8
commit 84f9d8f7f0

@ -7,3 +7,11 @@ releaseVersion=0.375
releaseFile=yacy_dev_v${releaseVersion}_${DSTAMP}_${releaseNr}.tar.gz
releaseDir=yacy_v${releaseVersion}_${DSTAMP}_${releaseNr}
releaseNr=$Revision$
# defining some file/directory access rights
accessRightsDir=755
accessRightsFile=644
# Extension Configuration: zip|copy
extensionTarget=copy
extensionFile=yacy_libx_v${releaseVersion}_${DSTAMP}_${releaseNr}.tar.gz

@ -49,11 +49,11 @@
# Contributions and changes to the program code must be marked as such.
-->
<!-- defining the timestamp format -->
<tstamp>
<format property="REPL_DATE_FORMAT" pattern="yyyymmdd" />
</tstamp>
<!-- defining all needed directory names -->
<property name="addon" location="addon"/>
<property name="src" location="source"/>
@ -65,6 +65,7 @@
<property name="htroot" location="htroot"/>
<property name="release" location="RELEASE"/>
<!-- loading some property values from file -->
<loadproperties srcFile="build.properties">
<filterchain>
<tokenfilter>
@ -76,6 +77,10 @@
</loadproperties>
<loadproperties srcFile="build.properties"/>
<condition property="singleExtFile">
<equals arg1="${extensionTarget}" arg2="copy"/>
</condition>
<target name="init">
<mkdir dir="${build}/de/anomic/data"/>
<mkdir dir="${build}/de/anomic/htmlFilter"/>
@ -93,11 +98,9 @@
<mkdir dir="${data}"/>
<mkdir dir="${release}"/>
<move file="${src}/yacy.java" tofile="${src}/yacy.java.orig" />
<filter token="REPL_VERSION" value="${releaseVersion}" />
<filter token="REPL_DATE" value="${DSTAMP}"/>
<copy file="${src}/yacy.java.orig" tofile="${src}/yacy.java" filtering="true" />
<copy file="${src}/yacy.java" tofile="${build}/yacy.java" filtering="true" />
</target>
<target name="compile" depends="init" description="Compiling the yacy sources ...">
@ -111,41 +114,47 @@
<pathelement location="${lib}/commons-pool-1.2.jar" />
</path>
<!-- compiling yacy.java -->
<javac srcdir="${build}" destdir="${build}" sourcepath="${src}"
includes="yacy.java"
classpathref="project.class.path"
source="${javacSource}" target="${javacTarget}"/>
<!-- compiling the main sources -->
<javac srcdir="${src}/" destdir="${build}"
excludes="de/anomic/plasma/parser/*/*,de/anomic/yacy/seedUpload/**,de/anomic/soap/**"
excludes="de/anomic/plasma/parser/*/*,de/anomic/yacy/seedUpload/**,de/anomic/soap/**,yacy.java"
debug="true"
source="${javacSource}" target="${javacTarget}">
<classpath refid="project.class.path"/>
</javac>
<!-- compiling the two standard seed uploader methods -->
<javac srcdir="${src}" destdir="${build}"
classpathref="project.class.path"
source="1.4" target="1.4">
source="${javacSource}" target="${javacTarget}">
<include name="de/anomic/yacy/seedUpload/yacySeedUploadFile.java" />
<include name="de/anomic/yacy/seedUpload/yacySeedUploadFtp.java"/>
</javac>
<!-- compiling htroot and htdocsdefault -->
<javac srcdir="${htroot}/" destdir="${htroot}"
classpathref="project.class.path"
source="1.4" target="1.4"/>
source="${javacSource}" target="${javacTarget}"/>
<javac srcdir="${htroot}/htdocsdefault" destdir="${htroot}/htdocsdefault"
classpathref="project.class.path"
source="1.4" target="1.4"/>
<!-- compiling yacy.java -->
source="${javacSource}" target="${javacTarget}"/>
<javac srcdir="${htroot}/yacy" destdir="${htroot}/yacy"
classpathref="project.class.path"
source="1.4" target="1.4"/>
source="${javacSource}" target="${javacTarget}"/>
</target>
<target name="all" depends="compile">
<delete file="${src}/yacy.java" />
<move file="${src}/yacy.java.orig" tofile="${src}/yacy.java" />
<delete file="${build}/yacy.java" />
</target>
<!-- compiling optional content parsers and building install packages -->
<target name="parsers" depends="compile" description="Compiling and zipping all additional parsers">
<subant target="">
<subant target="${extensionTarget}">
<property name="src" location="${src}"/>
<property name="build" location="${build}"/>
<property name="libx" location="${libx}"/>
@ -160,7 +169,7 @@
<!-- compiling optional seed uploaders and building install packages -->
<target name="seedUploaders" depends="compile" description="Compiling and zipping additional seed uploaders">
<subant target="">
<subant target="${extensionTarget}">
<property name="src" location="${src}"/>
<property name="build" location="${build}"/>
<property name="libx" location="${libx}"/>
@ -176,7 +185,7 @@
<!-- compiling optional soap API and building install packages -->
<target name="yacySOAP" depends="compile" description="Compiling and zipping additional yacy SOAP API">
<subant target="">
<subant target="${extensionTarget}">
<property name="src" location="${src}"/>
<property name="build" location="${build}"/>
<property name="libx" location="${libx}"/>
@ -185,19 +194,29 @@
<property name="releaseDir" value="${releaseDir}"/>
<property name="javacSource" value="${javacSource}"/>
<property name="javacTarget" value="${javacTarget}"/>
<!-- each optionl uploader module must have its own build file -->
<fileset dir="${src}/" includes="de/anomic/soap/build.xml"/>
</subant>
</target>
<!-- making a release file for yacy -->
<target name="dist" depends="all,parsers,seedUploaders,yacySOAP" description="Compiling sources and make a release file ...">
<!-- defining some file/directory access rights -->
<property name="accessRightsDir" value="755"/>
<property name="accessRightsFile" value="644"/>
<target name="singleExtensionFile" if="singleExtFile">
<tar destfile="${release}/${extensionFile}" compression="gzip" defaultexcludes="yes" longfile="gnu">
<tarfileset dir="${release}" prefix="${releaseDir}/" dirmode="${accessRightsDir}" mode="${accessRightsFile}" >
<include name="**/*.*"/>
<exclude name="*.gz"/>
</tarfileset>
</tar>
<delete dir="${release}/classes"/>
<delete dir="${release}/htroot"/>
<delete dir="${release}/libx"/>
<delete dir="${release}/source"/>
</target>
<!-- making a release file for yacy -->
<target name="dist" depends="all,parsers,seedUploaders,yacySOAP,singleExtensionFile" description="Compiling sources and make a release file ...">
<tar destfile="${release}/${releaseFile}" compression="gzip" defaultexcludes="yes">
<tar destfile="${release}/${releaseFile}" compression="gzip" defaultexcludes="yes" longfile="gnu">
<!-- copy class files -->
<tarfileset dir="${build}" prefix="${releaseDir}/classes" dirmode="${accessRightsDir}" mode="${accessRightsFile}" >

@ -11,7 +11,6 @@
<property name="parserArchive" location="${release}/${parserLongName}_${parserVersion}.tgz"/>
<target name="compile">
<echo message="Compiling ${parserLongName} Version ${parserVersion} ..."/>
<javac srcdir="${src}/de/anomic/plasma/parser/${parserShortName}" destdir="${build}" source="${javacSource}" target="${javacTarget}">
<classpath>
<pathelement location="${build}" />
@ -22,7 +21,6 @@
<target name="zip" depends="compile">
<echo message="Compressing ${parserLongName} Version ${parserVersion} ..."/>
<tar destfile="${parserArchive}" compression="gzip">
<tarfileset dir="${libx}"
includes="bzip2.jar"
@ -38,6 +36,19 @@
</target>
<target name="copy" depends="compile">
<copy todir="${release}/libx/">
<fileset dir="${libx}" includes="bzip2.jar"/>
</copy>
<copy todir="${release}/source/de/anomic/plasma/parser/${parserShortName}">
<fileset dir="${src}/de/anomic/plasma/parser/${parserShortName}" includes="**/*"/>
</copy>
<copy todir="${release}/classes/de/anomic/plasma/parser/${parserShortName}">
<fileset dir="${build}/de/anomic/plasma/parser/${parserShortName}" includes="**/*"/>
</copy>
</target>
<target name="dist" depends="compile,zip" description="Compile and zip the parser"/>

@ -11,7 +11,6 @@
<property name="parserArchive" location="${release}/${parserLongName}_${parserVersion}.tgz"/>
<target name="compile">
<echo message="Compiling ${parserLongName} Version ${parserVersion} ..."/>
<javac srcdir="${src}/de/anomic/plasma/parser/${parserShortName}" destdir="${build}" source="${javacSource}" target="${javacTarget}">
<classpath>
<pathelement location="${build}" />
@ -24,7 +23,6 @@
<target name="zip" depends="compile">
<echo message="Compressing ${parserLongName} Version ${parserVersion} ..."/>
<tar destfile="${parserArchive}" compression="gzip">
<tarfileset dir="${libx}"
includes="tm-extractors-0.4.*"
@ -39,6 +37,18 @@
</tar>
</target>
<target name="copy" depends="compile">
<copy todir="${release}/libx/">
<fileset dir="${libx}" includes="tm-extractors-0.4.*"/>
</copy>
<copy todir="${release}/source/de/anomic/plasma/parser/${parserShortName}">
<fileset dir="${src}/de/anomic/plasma/parser/${parserShortName}" includes="**/*"/>
</copy>
<copy todir="${release}/classes/de/anomic/plasma/parser/${parserShortName}">
<fileset dir="${build}/de/anomic/plasma/parser/${parserShortName}" includes="**/*"/>
</copy>
</target>
<target name="dist" depends="compile,zip" description="Compile and zip the parser"/>

@ -11,7 +11,6 @@
<property name="parserArchive" location="${release}/${parserLongName}_${parserVersion}.tgz"/>
<target name="compile">
<echo message="Compiling ${parserLongName} Version ${parserVersion} ..."/>
<javac srcdir="${src}/de/anomic/plasma/parser/${parserShortName}" destdir="${build}" source="${javacSource}" target="${javacTarget}">
<classpath>
<pathelement location="${build}" />
@ -21,7 +20,6 @@
<target name="zip" depends="compile">
<echo message="Compressing ${parserLongName} Version ${parserVersion} ..."/>
<tar destfile="${parserArchive}" compression="gzip">
<tarfileset dir="${src}/de/anomic/plasma/parser/${parserShortName}"
prefix="${releaseDir}/source/de/anomic/plasma/parser/${parserShortName}"
@ -32,6 +30,15 @@
</tar>
</target>
<target name="copy" depends="compile">
<copy todir="${release}/source/de/anomic/plasma/parser/${parserShortName}">
<fileset dir="${src}/de/anomic/plasma/parser/${parserShortName}" includes="**/*"/>
</copy>
<copy todir="${release}/classes/de/anomic/plasma/parser/${parserShortName}">
<fileset dir="${build}/de/anomic/plasma/parser/${parserShortName}" includes="**/*"/>
</copy>
</target>
<target name="dist" depends="compile,zip" description="Compile and zip the parser"/>

@ -11,7 +11,6 @@
<property name="parserArchive" location="${release}/${parserLongName}_${parserVersion}.tgz"/>
<target name="compile">
<echo message="Compiling ${parserLongName} Version ${parserVersion} ..."/>
<javac srcdir="${src}/de/anomic/plasma/parser/${parserShortName}" destdir="${build}" source="${javacSource}" target="${javacTarget}">
<classpath>
<pathelement location="${build}" />
@ -27,7 +26,6 @@
<target name="zip" depends="compile">
<echo message="Compressing ${parserLongName} Version ${parserVersion} ..."/>
<tar destfile="${parserArchive}" compression="gzip">
<tarfileset dir="${libx}"
includes="jmimemagic-0.0.4a.jar,jakarta-oro-2.0.7.jar,log4j-1.2.9.jar,xerces.jar"
@ -42,6 +40,18 @@
</tar>
</target>
<target name="copy" depends="compile">
<copy todir="${release}/libx/">
<fileset dir="${libx}" includes="jmimemagic-0.0.4a.jar,jakarta-oro-2.0.7.jar,log4j-1.2.9.jar,xerces.jar"/>
</copy>
<copy todir="${release}/source/de/anomic/plasma/parser/${parserShortName}">
<fileset dir="${src}/de/anomic/plasma/parser/${parserShortName}" includes="**/*"/>
</copy>
<copy todir="${release}/classes/de/anomic/plasma/parser/${parserShortName}">
<fileset dir="${build}/de/anomic/plasma/parser/${parserShortName}" includes="**/*"/>
</copy>
</target>
<target name="dist" depends="compile,zip" description="Compile and zip the parser"/>

@ -11,7 +11,6 @@
<property name="parserArchive" location="${release}/${parserLongName}_${parserVersion}.tgz"/>
<target name="compile">
<echo message="Compiling ${parserLongName} Version ${parserVersion} ..."/>
<javac srcdir="${src}/de/anomic/plasma/parser/${parserShortName}" destdir="${build}" source="${javacSource}" target="${javacTarget}">
<classpath>
<pathelement location="${build}" />
@ -27,14 +26,9 @@
<target name="zip" depends="compile">
<echo message="Compressing ${parserLongName} Version ${parserVersion} ..."/>
<tar destfile="${parserArchive}" compression="gzip">
<tarfileset dir="${libx}"
includes="PDFBox-0.7.1.*"
prefix="${releaseDir}/libx/"
dirmode="755" mode="644"/>
<tarfileset dir="${libx}"
includes="log4j-1.2.9.*"
includes="PDFBox-0.7.1.*,log4j-1.2.9.*"
prefix="${releaseDir}/libx/"
dirmode="755" mode="644"/>
<tarfileset dir="${src}/de/anomic/plasma/parser/${parserShortName}"
@ -46,6 +40,18 @@
</tar>
</target>
<target name="copy" depends="compile">
<copy todir="${release}/libx/">
<fileset dir="${libx}" includes="PDFBox-0.7.1.*,log4j-1.2.9.*"/>
</copy>
<copy todir="${release}/source/de/anomic/plasma/parser/${parserShortName}">
<fileset dir="${src}/de/anomic/plasma/parser/${parserShortName}" includes="**/*"/>
</copy>
<copy todir="${release}/classes/de/anomic/plasma/parser/${parserShortName}">
<fileset dir="${build}/de/anomic/plasma/parser/${parserShortName}" includes="**/*"/>
</copy>
</target>
<target name="dist" depends="compile,zip" description="Compile and zip the parser"/>

@ -12,7 +12,6 @@
<property name="parserArchive" location="${release}/${parserLongName}_${parserVersion}.tgz"/>
<target name="compile">
<echo message="Compiling ${parserLongName} Version ${parserVersion} ..."/>
<javac srcdir="${src}/de/anomic/plasma/parser/${parserShortName}" destdir="${build}" source="${javacSource}" target="${javacTarget}">
<classpath>
<pathelement location="${build}" />
@ -29,7 +28,6 @@
<target name="zip" depends="compile">
<echo message="Compressing ${parserLongName} Version ${parserVersion} ..."/>
<tar destfile="${parserArchive}" compression="gzip">
<tarfileset dir="${libx}"
includes="informa-0.6.0.*,commons-logging.jar,jdom.jar"
@ -44,6 +42,17 @@
</tar>
</target>
<target name="copy" depends="compile">
<copy todir="${release}/libx/">
<fileset dir="${libx}" includes="informa-0.6.0.*,commons-logging.jar,jdom.jar"/>
</copy>
<copy todir="${release}/source/de/anomic/plasma/parser/${parserShortName}">
<fileset dir="${src}/de/anomic/plasma/parser/${parserShortName}" includes="**/*"/>
</copy>
<copy todir="${release}/classes/de/anomic/plasma/parser/${parserShortName}">
<fileset dir="${build}/de/anomic/plasma/parser/${parserShortName}" includes="**/*"/>
</copy>
</target>
<target name="dist" depends="compile,zip" description="Compile and zip the parser"/>

@ -11,7 +11,6 @@
<property name="parserArchive" location="${release}/${parserLongName}_${parserVersion}.tgz"/>
<target name="compile">
<echo message="Compiling ${parserLongName} Version ${parserVersion} ..."/>
<javac srcdir="${src}/de/anomic/plasma/parser/${parserShortName}" destdir="${build}" source="${javacSource}" target="${javacTarget}">
<classpath>
<pathelement location="${build}" />
@ -21,7 +20,6 @@
<target name="zip" depends="compile">
<echo message="Compressing ${parserLongName} Version ${parserVersion} ..."/>
<tar destfile="${parserArchive}" compression="gzip">
<tarfileset dir="${src}/de/anomic/plasma/parser/${parserShortName}"
prefix="${releaseDir}/source/de/anomic/plasma/parser/${parserShortName}"
@ -32,6 +30,15 @@
</tar>
</target>
<target name="copy" depends="compile">
<copy todir="${release}/source/de/anomic/plasma/parser/${parserShortName}">
<fileset dir="${src}/de/anomic/plasma/parser/${parserShortName}" includes="**/*"/>
</copy>
<copy todir="${release}/classes/de/anomic/plasma/parser/${parserShortName}">
<fileset dir="${build}/de/anomic/plasma/parser/${parserShortName}" includes="**/*"/>
</copy>
</target>
<target name="dist" depends="compile,zip" description="Compile and zip the parser"/>

@ -11,7 +11,6 @@
<property name="parserArchive" location="${release}/${parserLongName}_${parserVersion}.tgz"/>
<target name="compile">
<echo message="Compiling ${parserLongName} Version ${parserVersion} ..."/>
<javac srcdir="${src}/de/anomic/plasma/parser/${parserShortName}" destdir="${build}" source="${javacSource}" target="${javacTarget}">
<classpath>
<pathelement location="${build}" />
@ -23,7 +22,6 @@
<target name="zip" depends="compile">
<echo message="Compressing ${parserLongName} Version ${parserVersion} ..."/>
<tar destfile="${parserArchive}" compression="gzip">
<tarfileset dir="${libx}"
includes="tar.jar"
@ -38,6 +36,18 @@
</tar>
</target>
<target name="copy" depends="compile">
<copy todir="${release}/libx/">
<fileset dir="${libx}" includes="tar.jar"/>
</copy>
<copy todir="${release}/source/de/anomic/plasma/parser/${parserShortName}">
<fileset dir="${src}/de/anomic/plasma/parser/${parserShortName}" includes="**/*"/>
</copy>
<copy todir="${release}/classes/de/anomic/plasma/parser/${parserShortName}">
<fileset dir="${build}/de/anomic/plasma/parser/${parserShortName}" includes="**/*"/>
</copy>
</target>
<target name="dist" depends="compile,zip" description="Compile and zip the parser"/>

@ -11,7 +11,6 @@
<property name="parserArchive" location="${release}/${parserLongName}_${parserVersion}.tgz"/>
<target name="compile">
<echo message="Compiling ${parserLongName} Version ${parserVersion} ..."/>
<javac srcdir="${src}/de/anomic/plasma/parser/${parserShortName}" destdir="${build}" source="${javacSource}" target="${javacTarget}">
<classpath>
<pathelement location="${build}" />
@ -21,7 +20,6 @@
<target name="zip" depends="compile">
<echo message="Compressing ${parserLongName} Version ${parserVersion} ..."/>
<tar destfile="${parserArchive}" compression="gzip">
<tarfileset dir="${src}/de/anomic/plasma/parser/${parserShortName}"
prefix="${releaseDir}/source/de/anomic/plasma/parser/${parserShortName}"
@ -32,6 +30,15 @@
</tar>
</target>
<target name="copy" depends="compile">
<copy todir="${release}/source/de/anomic/plasma/parser/${parserShortName}">
<fileset dir="${src}/de/anomic/plasma/parser/${parserShortName}" includes="**/*"/>
</copy>
<copy todir="${release}/classes/de/anomic/plasma/parser/${parserShortName}">
<fileset dir="${build}/de/anomic/plasma/parser/${parserShortName}" includes="**/*"/>
</copy>
</target>
<target name="dist" depends="compile,zip" description="Compile and zip the parser"/>

@ -11,7 +11,6 @@
<property name="addonArchive" location="${release}/${addonLongName}_${addonVersion}.tgz"/>
<target name="compile">
<echo message="Compiling ${addonLongName} Version ${addonVersion} ..."/>
<javac srcdir="${src}/de/anomic/soap/" destdir="${build}" source="${javacSource}" target="${javacTarget}">
<classpath>
<pathelement location="${build}" />
@ -30,7 +29,6 @@
<target name="zip" depends="compile">
<echo message="Compressing ${addonLongName} Version ${addonVersion} ..."/>
<tar destfile="${addonArchive}" compression="gzip">
<tarfileset dir="${libx}"
includes="axis.jar,axis-ant.jar,commons-discovery.jar,commons-logging.jar,jaxrpc.jar,saaj.jar,wsdl4j.jar"
@ -45,6 +43,18 @@
</tar>
</target>
<target name="copy" depends="compile">
<copy todir="${release}/libx/">
<fileset dir="${libx}" includes="axis.jar,axis-ant.jar,commons-discovery.jar,commons-logging.jar,jaxrpc.jar,saaj.jar,wsdl4j.jar"/>
</copy>
<copy todir="${release}/source/de/anomic/soap/">
<fileset dir="${src}/de/anomic/soap/" includes="**/*"/>
</copy>
<copy todir="${release}/classes/de/anomic/soap/">
<fileset dir="${build}/de/anomic/soap/" includes="**/*"/>
</copy>
</target>
<target name="dist" depends="compile,zip" description="Compile and zip the addon"/>

@ -11,7 +11,6 @@
<property name="parserArchive" location="${release}/${addonLongName}_${addonVersion}.tgz"/>
<target name="compile">
<echo message="Compiling ${addonLongName} Version ${addonVersion} ..."/>
<javac srcdir="${src}/de/anomic/yacy/seedUpload/" destdir="${build}" source="${javacSource}" target="${javacTarget}">
<include name="yacySeedUpload${addonShortName}.java"/>
<classpath>
@ -25,7 +24,6 @@
<target name="zip" depends="compile">
<echo message="Compressing ${addonLongName} Version ${addonVersion} ..."/>
<tar destfile="${parserArchive}" compression="gzip">
<tarfileset dir="${libx}"
includes="jsch-0.1.19.*"
@ -47,6 +45,28 @@
</target>
<target name="copy" depends="compile">
<copy todir="${release}/libx/">
<fileset dir="${libx}" includes="jsch-0.1.19.*"/>
</copy>
<copy todir="${release}/source/de/anomic/yacy/seedUpload/">
<fileset dir="${src}/de/anomic/yacy/seedUpload/">
<include name="yacySeedUpload${addonShortName}.java"/>
</fileset>
</copy>
<copy todir="${release}/classes/de/anomic/yacy/seedUpload/">
<fileset dir="${build}/de/anomic/yacy/seedUpload/">
<include name="yacySeedUpload${addonShortName}.class"/>
</fileset>
</copy>
<copy todir="${release}/htroot/yacy/seedUpload/">
<fileset dir="${htroot}/yacy/seedUpload/">
<include name="yacySeedUpload${addonShortName}.html"/>
</fileset>
</copy>
</target>
<target name="dist" depends="compile,zip" description="Compile and zip the addon"/>

Loading…
Cancel
Save