|
|
|
<project name="YaCy" default="all" basedir=".">
|
|
|
|
<description>
|
|
|
|
YaCy - a Peer to Peer Web Search Engine
|
|
|
|
</description>
|
|
|
|
|
|
|
|
<!--
|
|
|
|
# THIS IS THE YACY BUILD SCRIPT
|
|
|
|
# YOU CAN USE IT TO COMPILE YOUR OWN RELEASE
|
|
|
|
# THE TARGET OF THE COMPILATION CAN BE FOUND
|
|
|
|
# IN THE 'RELEASE' DIRECTORY AFTERWARDS
|
|
|
|
# YOU NEED APACHE ANT TO USE THIS SCRIPT
|
|
|
|
# ==========================================
|
|
|
|
# This Software is Copyrighted
|
|
|
|
# (C) by Michael Peter Christen; mc@yacy.net
|
|
|
|
# first published on http://yacy.net
|
|
|
|
# Frankfurt, Germany, 2005-2009
|
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation; either version 2 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, write to the Free Software
|
|
|
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
-->
|
|
|
|
|
|
|
|
<!-- defining the timestamp format -->
|
|
|
|
<tstamp>
|
|
|
|
<format property="REPL_DATE_FORMAT" pattern="yyyymmdd" />
|
|
|
|
</tstamp>
|
|
|
|
|
|
|
|
<!-- defining all needed directory names -->
|
|
|
|
<property name="yacyroot" location="."/>
|
|
|
|
<property name="addon" location="addon"/>
|
|
|
|
<property name="src" location="source"/>
|
|
|
|
<property name="data" location="DATA"/>
|
|
|
|
<property name="lib" location="lib"/>
|
|
|
|
<property name="libt" location="libt"/>
|
|
|
|
<property name="libbuild" location="libbuild"/>
|
|
|
|
<property name="build" location="build/classes/java/main"/> <!-- reuse Gradle build path -->
|
|
|
|
<property name="javadoc" location="javadoc"/>
|
|
|
|
<property name="htroot" location="htroot"/>
|
|
|
|
<property name="test" location="test/java"/>
|
|
|
|
<property name="langdetect" location="langdetect"/>
|
|
|
|
<property name="locales" location="locales"/>
|
|
|
|
<property name="skins" location="skins"/>
|
|
|
|
<property name="release" location="RELEASE"/>
|
|
|
|
<property name="htdocsWWW" location="${data}/HTDOCS/www"/>
|
|
|
|
<property name="release_main" location="${release}/MAIN"/>
|
|
|
|
<property name="release_windows" location="${release}/WINDOWS"/>
|
|
|
|
<property name="release_mac" location="${release}/MAC"/>
|
|
|
|
<property name="git" location=".git"/>
|
|
|
|
<property name="defaults" location="defaults"/>
|
|
|
|
<property name="RDFaParser" location="RDFaParser"/>
|
|
|
|
|
|
|
|
<!-- pseudo default branch as fallback -->
|
|
|
|
<property name="branch" value="" />
|
|
|
|
|
|
|
|
<!-- pseudo default releaseNr as fallback -->
|
|
|
|
<property name="releaseNr" value="9000" />
|
|
|
|
|
|
|
|
<!-- defining all needed directory names for packing search widget-->
|
|
|
|
<property name="jquery" location="htroot/jquery/"/>
|
|
|
|
<property name="portalsearch" location="htroot/portalsearch/"/>
|
|
|
|
<property name="img-2" location="htroot/yacy/ui/img-2"/>
|
|
|
|
|
|
|
|
<!-- variables for installonlinux target-->
|
|
|
|
<property name="DESTDIR" value="DESTDIR"/>
|
|
|
|
<property name="PKGMANAGER" value="false"/>
|
|
|
|
<property name="RESTARTCMD" value="/etc/init.d/yacy restart"/>
|
|
|
|
|
|
|
|
<!-- determining if the .git directory exists -->
|
|
|
|
<condition property="isGit">
|
|
|
|
<available file="${git}" />
|
|
|
|
</condition>
|
|
|
|
|
|
|
|
<target name="buildGitRevTask">
|
|
|
|
<!-- <delete file="${libbuild}/GitRevTask.jar" failonerror="false" /> deleted via clean no need to do it all the time -->
|
|
|
|
<javac srcdir="${libbuild}/GitRevTask" includeantruntime="true" encoding="UTF-8">
|
|
|
|
<classpath>
|
|
|
|
<pathelement location="${libbuild}/org.eclipse.jgit-4.5.0.201609210915-r.jar" />
|
|
|
|
<!-- Next are the jgit dependencies -->
|
|
|
|
<pathelement location="${libbuild}/httpclient-4.3.6.jar" />
|
|
|
|
<pathelement location="${libbuild}/JavaEWAH-0.7.9.jar" />
|
|
|
|
<pathelement location="${libbuild}/jsch-0.1.53.jar" />
|
|
|
|
<pathelement location="${libbuild}/slf4j-api-1.7.2.jar" />
|
|
|
|
</classpath>
|
|
|
|
</javac>
|
|
|
|
<jar destfile="${libbuild}/GitRevTask.jar" basedir="${libbuild}/GitRevTask">
|
|
|
|
<manifest>
|
|
|
|
<attribute name="Main-Class" value="GitRevTask"/>
|
|
|
|
</manifest>
|
|
|
|
</jar>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="determineGitRevision" if="isGit" depends="buildGitRevTask">
|
|
|
|
<taskdef resource="GitRevTask.properties">
|
|
|
|
<classpath>
|
|
|
|
<pathelement location="${libbuild}/GitRevTask.jar" />
|
|
|
|
<pathelement location="${libbuild}/org.eclipse.jgit-4.5.0.201609210915-r.jar" />
|
|
|
|
<!-- Next are the jgit dependencies -->
|
|
|
|
<pathelement location="${libbuild}/httpclient-4.3.6.jar" />
|
|
|
|
<pathelement location="${libbuild}/JavaEWAH-0.7.9.jar" />
|
|
|
|
<pathelement location="${libbuild}/jsch-0.1.53.jar" />
|
|
|
|
<pathelement location="${libbuild}/slf4j-api-1.7.2.jar" />
|
|
|
|
</classpath>
|
|
|
|
</taskdef>
|
|
|
|
<gitRev repoPath="${yacyroot}" branchprop="branch" revprop="releaseNr" dateprop="DSTAMP" />
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- reading the build properties from file -->
|
|
|
|
<target name="readBuildProperties" depends="determineGitRevision">
|
|
|
|
<!-- loading some property values from file -->
|
|
|
|
<loadproperties srcFile="build.properties" />
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- initializing all needed variables -->
|
|
|
|
<target name="init" depends="readBuildProperties">
|
|
|
|
<mkdir dir="${data}"/>
|
|
|
|
<mkdir dir="${release}"/>
|
|
|
|
|
|
|
|
<!-- YaCy Release Date -->
|
|
|
|
<filter token="REPL_DATE" value="${DSTAMP}"/>
|
|
|
|
<filter token="REPL_RELEASE" value="${stdReleaseFile}"/>
|
|
|
|
|
|
|
|
<!-- YaCy Brach -->
|
|
|
|
<echo message="YaCy Branch: ${branch}" />
|
|
|
|
|
|
|
|
<!-- YaCy Release Version number -->
|
|
|
|
<echo message="YaCy Version number: ${releaseVersion}" />
|
|
|
|
<filter token="REPL_VERSION" value="${releaseVersion}" />
|
|
|
|
|
|
|
|
<!-- YaCy Release <revision number -->
|
|
|
|
<echo message="YaCy Release number: ${releaseNr}" />
|
|
|
|
<filter token="REPL_REVISION_NR" value="${releaseNr}"/>
|
|
|
|
|
|
|
|
<!-- YaCy root directory -->
|
|
|
|
<filter token="REPL_YACY_ROOT_DIR" value="${yacyroot}"/>
|
|
|
|
<filter token="REPL_PKGMANAGER" value="${PKGMANAGER}"/>
|
|
|
|
<filter token="REPL_RESTARTCMD" value="${RESTARTCMD}"/>
|
|
|
|
|
|
|
|
<!-- apply replacments -->
|
|
|
|
<copy file="${src}/net/yacy/peers/operation/yacyBuildProperties.java.template" tofile="${src}/net/yacy/peers/operation/yacyBuildProperties.java" overwrite="true" filtering="true" />
|
|
|
|
|
|
|
|
<!-- copy log4j config file -->
|
|
|
|
<copy file="${src}/log4j.properties" tofile="${build}/log4j.properties" overwrite="true" filtering="true" /> <!-- @TODO: obsolete, contains no replace/filter pattern -->
|
|
|
|
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="javadoc" depends="init" description="make javadoc for YaCy core">
|
|
|
|
<javadoc destdir="${javadoc}"
|
|
|
|
windowtitle="YaCy API: javadoc documentation"
|
|
|
|
encoding="UTF-8"
|
|
|
|
charset="UTF-8"
|
|
|
|
access="private"
|
|
|
|
useexternalfile="true">
|
|
|
|
<fileset dir="${src}">
|
|
|
|
<include name="**/*.java"/>
|
|
|
|
</fileset>
|
|
|
|
</javadoc>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- define the classpath that should be used for compiling -->
|
|
|
|
<!-- when changing paths here, please also update the paths in /addon/YaCy.app/Contents/Info.plist -->
|
|
|
|
<path id="project.class.path">
|
|
|
|
<pathelement location="${build}" />
|
|
|
|
<pathelement location="${lib}/J7Zip-modified-1.0.2.jar" />
|
|
|
|
<pathelement location="${lib}/apache-mime4j-0.6.jar" />
|
|
|
|
<pathelement location="${lib}/avatica-core-1.13.0.jar" />
|
|
|
|
<pathelement location="${lib}/bcmail-jdk15on-1.69.jar" />
|
|
|
|
<pathelement location="${lib}/bcpkix-jdk15on-1.69.jar" />
|
|
|
|
<pathelement location="${lib}/bcprov-jdk15on-1.69.jar" />
|
|
|
|
<pathelement location="${lib}/calcite-core-1.18.0.jar" />
|
|
|
|
<pathelement location="${lib}/calcite-linq4j-1.18.0.jar" />
|
|
|
|
<pathelement location="${lib}/chardet.jar" />
|
|
|
|
<pathelement location="${lib}/common-image-3.3.2.jar" />
|
|
|
|
<pathelement location="${lib}/common-io-3.3.2.jar" />
|
|
|
|
<pathelement location="${lib}/common-lang-3.3.2.jar" />
|
|
|
|
<pathelement location="${lib}/commons-codec-1.14.jar" />
|
|
|
|
<pathelement location="${lib}/commons-collections4-4.4.jar" />
|
|
|
|
<pathelement location="${lib}/commons-compress-1.21.jar" />
|
|
|
|
<pathelement location="${lib}/commons-fileupload-1.4.jar" />
|
|
|
|
<pathelement location="${lib}/commons-io-2.7.jar" />
|
|
|
|
<pathelement location="${lib}/commons-lang-2.6.jar" />
|
|
|
|
<pathelement location="${lib}/commons-lang3-3.12.0.jar" />
|
|
|
|
<pathelement location="${lib}/commons-logging-1.2.jar" />
|
|
|
|
<pathelement location="${lib}/commons-math3-3.4.1.jar" />
|
|
|
|
<pathelement location="${lib}/fontbox-2.0.15.jar" />
|
|
|
|
<pathelement location="${lib}/guava-25.1-jre.jar" />
|
|
|
|
<pathelement location="${lib}/hazelcast-4.2.jar" />
|
|
|
|
<pathelement location="${lib}/http2-client-9.4.34.v20201102.jar" />
|
|
|
|
<pathelement location="${lib}/http2-common-9.4.34.v20201102.jar" />
|
|
|
|
<pathelement location="${lib}/http2-http-client-transport-9.4.34.v20201102.jar" />
|
|
|
|
<pathelement location="${lib}/httpclient-4.5.12.jar" />
|
|
|
|
<pathelement location="${lib}/httpcore-4.4.13.jar" />
|
|
|
|
<pathelement location="${lib}/httpmime-4.5.12.jar" />
|
|
|
|
<pathelement location="${lib}/icu4j-63.1.jar" />
|
|
|
|
<pathelement location="${lib}/imageio-bmp-3.3.2.jar" />
|
|
|
|
<pathelement location="${lib}/imageio-core-3.3.2.jar" />
|
|
|
|
<pathelement location="${lib}/imageio-metadata-3.3.2.jar" />
|
|
|
|
<pathelement location="${lib}/imageio-tiff-3.3.2.jar" />
|
|
|
|
<pathelement location="${lib}/jackson-annotations-2.11.2.jar" />
|
|
|
|
<pathelement location="${lib}/jackson-core-2.11.2.jar" />
|
|
|
|
<pathelement location="${lib}/jackson-databind-2.11.2.jar" />
|
|
|
|
<pathelement location="${lib}/jakarta-oro-2.0.8.jar" />
|
|
|
|
<pathelement location="${lib}/jaudiotagger-2.2.5.jar" />
|
|
|
|
<pathelement location="${lib}/javax.servlet-api-3.1.0.jar" />
|
|
|
|
<pathelement location="${lib}/jcifs-1.3.17.jar" />
|
|
|
|
<pathelement location="${lib}/jcl-over-slf4j-1.7.25.jar" />
|
|
|
|
<pathelement location="${lib}/jetty-client-9.4.35.v20201120.jar" />
|
|
|
|
<pathelement location="${lib}/jetty-continuation-9.4.35.v20201120.jar" />
|
|
|
|
<pathelement location="${lib}/jetty-deploy-9.4.35.v20201120.jar" />
|
|
|
|
<pathelement location="${lib}/jetty-http-9.4.35.v20201120.jar" />
|
|
|
|
<pathelement location="${lib}/jetty-io-9.4.35.v20201120.jar" />
|
|
|
|
<pathelement location="${lib}/jetty-jmx-9.4.35.v20201120.jar" />
|
|
|
|
<pathelement location="${lib}/jetty-proxy-9.4.35.v20201120.jar" />
|
|
|
|
<pathelement location="${lib}/jetty-security-9.4.35.v20201120.jar" />
|
|
|
|
<pathelement location="${lib}/jetty-server-9.4.35.v20201120.jar" />
|
|
|
|
<pathelement location="${lib}/jetty-servlet-9.4.35.v20201120.jar" />
|
|
|
|
<pathelement location="${lib}/jetty-servlets-9.4.35.v20201120.jar" />
|
|
|
|
<pathelement location="${lib}/jetty-util-9.4.35.v20201120.jar" />
|
|
|
|
<pathelement location="${lib}/jetty-webapp-9.4.35.v20201120.jar" />
|
|
|
|
<pathelement location="${lib}/jetty-xml-9.4.35.v20201120.jar" />
|
|
|
|
<pathelement location="${lib}/jsch-0.1.54.jar" />
|
|
|
|
<pathelement location="${lib}/json-simple-1.1.1.jar" />
|
|
|
|
<pathelement location="${lib}/jsonic-1.3.10.jar" />
|
|
|
|
<pathelement location="${lib}/jsoup-1.14.2.jar" />
|
|
|
|
<pathelement location="${lib}/jwat-archive-common-1.1.1.jar" />
|
|
|
|
<pathelement location="${lib}/jwat-common-1.1.1.jar" />
|
|
|
|
<pathelement location="${lib}/jwat-gzip-1.1.1.jar" />
|
|
|
|
<pathelement location="${lib}/jwat-warc-1.1.1.jar" />
|
|
|
|
<pathelement location="${lib}/langdetect.jar" />
|
|
|
|
<pathelement location="${lib}/log4j-over-slf4j-1.7.32.jar" />
|
|
|
|
<pathelement location="${lib}/lucene-analyzers-common-8.8.1.jar" />
|
|
|
|
<pathelement location="${lib}/lucene-analyzers-phonetic-8.8.1.jar" />
|
|
|
|
<pathelement location="${lib}/lucene-backward-codecs-8.8.1.jar" />
|
|
|
|
<pathelement location="${lib}/lucene-classification-8.8.1.jar" />
|
|
|
|
<pathelement location="${lib}/lucene-codecs-8.8.1.jar" />
|
|
|
|
<pathelement location="${lib}/lucene-core-8.8.1.jar" />
|
|
|
|
<pathelement location="${lib}/lucene-grouping-8.8.1.jar" />
|
|
|
|
<pathelement location="${lib}/lucene-highlighter-8.8.1.jar" />
|
|
|
|
<pathelement location="${lib}/lucene-join-8.8.1.jar" />
|
|
|
|
<pathelement location="${lib}/lucene-memory-8.8.1.jar" />
|
|
|
|
<pathelement location="${lib}/lucene-misc-8.8.1.jar" />
|
|
|
|
<pathelement location="${lib}/lucene-queries-8.8.1.jar" />
|
|
|
|
<pathelement location="${lib}/lucene-queryparser-8.8.1.jar" />
|
|
|
|
<pathelement location="${lib}/lucene-spatial-extras-8.8.1.jar" />
|
|
|
|
<pathelement location="${lib}/lucene-suggest-8.8.1.jar" />
|
|
|
|
<pathelement location="${lib}/metadata-extractor-2.11.0.jar" />
|
|
|
|
<pathelement location="${lib}/metrics-core-3.2.2.jar" />
|
|
|
|
<pathelement location="${lib}/metrics-jmx-4.1.5.jar" />
|
|
|
|
<pathelement location="${lib}/opentracing-api-0.33.0.jar" />
|
|
|
|
<pathelement location="${lib}/opentracing-noop-0.33.0.jar" />
|
|
|
|
<pathelement location="${lib}/opentracing-util-0.33.0.jar" />
|
|
|
|
<pathelement location="${lib}/org.restlet.jar" />
|
|
|
|
<pathelement location="${lib}/pdfbox-2.0.15.jar" />
|
|
|
|
<pathelement location="${lib}/poi-3.17.jar" />
|
|
|
|
<pathelement location="${lib}/poi-scratchpad-3.17.jar" />
|
|
|
|
<pathelement location="${lib}/rrd4j-3.2.jar" />
|
|
|
|
<pathelement location="${lib}/slf4j-api-1.7.32.jar" />
|
|
|
|
<pathelement location="${lib}/slf4j-jdk14-1.7.32.jar" />
|
|
|
|
<pathelement location="${lib}/solr-core-8.8.1.jar" />
|
|
|
|
<pathelement location="${lib}/solr-solrj-8.8.1.jar" />
|
|
|
|
<pathelement location="${lib}/spatial4j-0.6.jar" />
|
|
|
|
<pathelement location="${lib}/stax2-api_3.1.4.jar" />
|
|
|
|
<pathelement location="${lib}/weupnp-0.1.4.jar" />
|
|
|
|
<pathelement location="${lib}/woodstox-core-asl-4.4.1.jar" />
|
|
|
|
<pathelement location="${lib}/xml-apis.jar" />
|
|
|
|
<pathelement location="${lib}/xmpcore-5.1.3.jar" />
|
|
|
|
<pathelement location="${lib}/xz-1.8.jar" />
|
|
|
|
<pathelement location="${lib}/zookeeper-3.4.14.jar" />
|
|
|
|
</path>
|
|
|
|
|
|
|
|
<target name="compile-core" depends="init" description="compile YaCy core">
|
|
|
|
|
|
|
|
<!-- compile yacyBuildProperties.java -->
|
|
|
|
<!-- *obsolete* - for Gradle migration process changed to use *.java.template file for filtered copy
|
|
|
|
<javac srcdir="${build}" destdir="${build}" sourcepath="${src}"
|
|
|
|
debug="true" debuglevel="lines,vars,source" includeantruntime="false"
|
|
|
|
includes="net/yacy/peers/operation/yacyBuildProperties.java"
|
|
|
|
source="${javacSource}" target="${javacTarget}" encoding="UTF-8">
|
|
|
|
<classpath refid="project.class.path" />
|
|
|
|
<compilerarg value="-Xlint"/>
|
|
|
|
</javac>
|
|
|
|
<delete file="${build}/BuildProperties.java" />
|
|
|
|
-->
|
|
|
|
<!-- compile the core sources -->
|
|
|
|
<javac srcdir="${src}/" destdir="${build}"
|
|
|
|
debug="true" debuglevel="lines,vars,source" includeantruntime="false"
|
|
|
|
source="${javacSource}" target="${javacTarget}" encoding="UTF-8">
|
|
|
|
<classpath refid="project.class.path" />
|
|
|
|
<compilerarg value="-Xlint"/>
|
|
|
|
</javac>
|
|
|
|
|
|
|
|
<!-- prepare classpath for MANIFEST (manifest cp is relative to jar) -->
|
|
|
|
<path id="project.classpath.runtime">
|
|
|
|
<fileset dir="./lib">
|
|
|
|
<include name="**/*.jar" />
|
|
|
|
<exclude name="yacycore.jar"/>
|
|
|
|
</fileset>
|
|
|
|
</path>
|
|
|
|
<pathconvert property="manifest.classpath" pathsep=" " refid="project.classpath.runtime">
|
|
|
|
<flattenmapper/>
|
|
|
|
</pathconvert>
|
|
|
|
|
|
|
|
<!-- make the jacycore jar -->
|
|
|
|
<jar destfile="${lib}/yacycore.jar" basedir="${build}/">
|
|
|
|
<manifest>
|
|
|
|
<attribute name="Main-Class" value="net.yacy.yacy"/>
|
|
|
|
<attribute name="Class-Path" value="${manifest.classpath}"/>
|
|
|
|
</manifest>
|
|
|
|
</jar>
|
|
|
|
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="compile-htroot" depends="init" description="compile YaCy servlets">
|
|
|
|
<!-- compile htroot, htroot/yacy and htroot/htdocsdefault -->
|
|
|
|
<javac srcdir="${htroot}/"
|
|
|
|
excludes="processing/**"
|
|
|
|
source="${javacSource}" target="${javacTarget}"
|
|
|
|
debug="true" debuglevel="lines,vars,source" includeantruntime="false" encoding="UTF-8">
|
|
|
|
<classpath refid="project.class.path" />
|
|
|
|
<compilerarg value="-Xlint"/>
|
|
|
|
</javac>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="compile" depends="compile-core, compile-htroot" description="compile YaCy core and YaCy servlets" />
|
|
|
|
|
|
|
|
<target name="all" depends="compile">
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="copyMain4Dist" depends="compile">
|
|
|
|
<!-- copy all libs -->
|
|
|
|
<copy todir="${release_main}/lib">
|
|
|
|
<fileset dir="${lib}"
|
|
|
|
includes="**/*"/>
|
|
|
|
</copy>
|
|
|
|
|
|
|
|
<!-- copy build libs -->
|
|
|
|
<copy todir="${release_main}/libbuild">
|
|
|
|
<fileset dir="${libbuild}"
|
|
|
|
includes="**/*"
|
|
|
|
excludes="**/target/**"/>
|
|
|
|
</copy>
|
|
|
|
|
|
|
|
<!-- copy configuration files -->
|
|
|
|
<copy todir="${release_main}">
|
|
|
|
<fileset dir=".">
|
|
|
|
<include name="yacy.yellow"/>
|
|
|
|
<include name="yacy.badwords.example"/>
|
|
|
|
<include name="yacy.stopwords"/>
|
|
|
|
<include name="yacy.parser"/>
|
|
|
|
</fileset>
|
|
|
|
</copy>
|
|
|
|
|
|
|
|
<!-- copy defaults -->
|
|
|
|
<copy todir="${release_main}/defaults">
|
|
|
|
<fileset dir="${defaults}"
|
|
|
|
includes="**/*"/>
|
|
|
|
</copy>
|
|
|
|
|
|
|
|
<!-- copy Unix wrappers -->
|
|
|
|
<copy todir="${release_main}">
|
|
|
|
<fileset dir=".">
|
|
|
|
<include name="startYACY.sh"/>
|
|
|
|
<include name="stopYACY.sh"/>
|
|
|
|
<include name="killYACY.sh"/>
|
|
|
|
<include name="updateYACY.sh"/>
|
|
|
|
<include name="restart.sh"/>
|
|
|
|
<include name="reconfigureYACY.sh"/>
|
|
|
|
<include name="startYACY.command"/>
|
|
|
|
<include name="stopYACY.command"/>
|
|
|
|
</fileset>
|
|
|
|
</copy>
|
|
|
|
|
|
|
|
<!-- copy other wrappers -->
|
|
|
|
<copy todir="${release_main}">
|
|
|
|
<fileset dir=".">
|
|
|
|
<include name="startYACY.bat"/>
|
|
|
|
<include name="startYACY_debug.bat"/>
|
|
|
|
<include name="stopYACY.bat"/>
|
|
|
|
<include name="getWin32MaxHeap.bat"/>
|
|
|
|
<include name="installYaCyWindowsService.bat" />
|
|
|
|
<include name="uninstallYaCyWindowsService.bat" />
|
|
|
|
</fileset>
|
|
|
|
</copy>
|
|
|
|
|
|
|
|
<!-- copy locales -->
|
|
|
|
<copy todir="${release_main}/locales">
|
|
|
|
<fileset dir="${locales}">
|
|
|
|
<include name="*"/>
|
|
|
|
</fileset>
|
|
|
|
</copy>
|
|
|
|
|
|
|
|
<!-- copy skins -->
|
|
|
|
<copy todir="${release_main}/skins">
|
|
|
|
<fileset dir="${skins}">
|
|
|
|
<include name="*"/>
|
|
|
|
</fileset>
|
|
|
|
</copy>
|
|
|
|
|
|
|
|
<!-- copy language statistics files -->
|
|
|
|
<copy todir="${release_main}/langdetect">
|
|
|
|
<fileset dir="${langdetect}">
|
|
|
|
<include name="*"/>
|
|
|
|
</fileset>
|
|
|
|
</copy>
|
|
|
|
|
|
|
|
<!-- copy documentation -->
|
|
|
|
<copy todir="${release_main}">
|
|
|
|
<fileset dir=".">
|
|
|
|
<include name="readme.txt"/>
|
|
|
|
<include name="gpl.txt"/>
|
|
|
|
<include name="ChangeLog"/>
|
|
|
|
<include name="AUTHORS"/>
|
|
|
|
<include name="COPYRIGHT"/>
|
|
|
|
<include name="NOTICE"/>
|
|
|
|
</fileset>
|
|
|
|
</copy>
|
|
|
|
|
|
|
|
<!-- copy source code -->
|
|
|
|
<copy todir="${release_main}/source">
|
|
|
|
<fileset dir="${src}">
|
|
|
|
<include name="**/*.*"/>
|
|
|
|
</fileset>
|
|
|
|
</copy>
|
|
|
|
|
|
|
|
<!-- copy server pages -->
|
|
|
|
<copy todir="${release_main}/htroot">
|
|
|
|
<fileset dir="${htroot}">
|
|
|
|
<include name="**/*"/>
|
|
|
|
</fileset>
|
|
|
|
</copy>
|
|
|
|
|
|
|
|
<!-- copy add-on's -->
|
|
|
|
<copy todir="${release_main}/addon">
|
|
|
|
<fileset dir="${addon}">
|
|
|
|
<include name="**/*"/>
|
|
|
|
</fileset>
|
|
|
|
</copy>
|
|
|
|
|
|
|
|
<!-- copy development tools -->
|
|
|
|
<copy todir="${release_main}">
|
|
|
|
<fileset dir=".">
|
|
|
|
<include name="build.xml"/>
|
|
|
|
<include name="build.properties"/>
|
|
|
|
</fileset>
|
|
|
|
</copy>
|
|
|
|
|
|
|
|
<!-- copy searchtest -->
|
|
|
|
<copy todir="${release_main}/bin">
|
|
|
|
<fileset dir="bin">
|
|
|
|
<include name="**/*.sh"/>
|
|
|
|
<include name="searchtest*"/>
|
|
|
|
</fileset>
|
|
|
|
</copy>
|
|
|
|
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- run unittests-->
|
|
|
|
<target name="compileTest" depends="compile" description="run unittests">
|
|
|
|
<javac srcdir="${test}" destdir="${test}"
|
|
|
|
debug="true" debuglevel="lines,vars,source"
|
|
|
|
source="${javacSource}" target="${javacTarget}" encoding="UTF-8">
|
|
|
|
<classpath>
|
|
|
|
<pathelement location="${build}"/>
|
|
|
|
<pathelement location="${htroot}"/>
|
|
|
|
<fileset dir="${libt}" includes="**/*.jar" />
|
|
|
|
<fileset dir="${lib}" includes="**/*.jar" />
|
|
|
|
</classpath>
|
|
|
|
<compilerarg value="-Xlint"/>
|
|
|
|
</javac>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="test" depends="compileTest" description="run some unittests">
|
|
|
|
<junit printsummary="yes" haltonfailure="no" fork="true" dir="${yacyroot}">
|
|
|
|
<formatter type="plain"/>
|
|
|
|
<batchtest>
|
|
|
|
<fileset dir="${test}">
|
|
|
|
<include name="**/*Test*.java"/>
|
|
|
|
</fileset>
|
|
|
|
</batchtest>
|
|
|
|
<classpath>
|
|
|
|
<pathelement location="${test}"/>
|
|
|
|
<pathelement location="${build}"/>
|
|
|
|
<pathelement location="${htroot}"/>
|
|
|
|
<fileset dir="${libt}" includes="**/*.jar" />
|
|
|
|
<fileset dir="${lib}" includes="**/*.jar" />
|
|
|
|
</classpath>
|
|
|
|
</junit>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- =======================================================================================================
|
|
|
|
making a release file for yacy
|
|
|
|
======================================================================================================= -->
|
|
|
|
|
|
|
|
<target name="dist" depends="copyMain4Dist" description="make for standard YaCy">
|
|
|
|
<tar destfile="${release}/${stdReleaseFile}" compression="gzip" defaultexcludes="yes" longfile="fail">
|
|
|
|
|
|
|
|
<!-- packing all files into a gzipped tar -->
|
|
|
|
<tarfileset dir="${release_main}" prefix="${releaseFileParentDir}/" dirmode="${accessRightsDir}" mode="${accessRightsExecutable}">
|
|
|
|
<include name="**/*.sh"/>
|
|
|
|
<include name="**/*.command"/>
|
|
|
|
</tarfileset>
|
|
|
|
<tarfileset dir="${release_main}" prefix="${releaseFileParentDir}/" dirmode="${accessRightsDir}" mode="${accessRightsFile}" >
|
|
|
|
<include name="**/*"/>
|
|
|
|
<exclude name="**/*.sh"/>
|
|
|
|
<exclude name="**/*.command"/>
|
|
|
|
</tarfileset>
|
|
|
|
</tar>
|
|
|
|
|
|
|
|
<delete dir="${release_main}"/>
|
|
|
|
<delete dir="${release_windows}" failonerror="false" />
|
|
|
|
<delete dir="${release}/SPECS" failonerror="false" />
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- packing YaCy search widget for static hosting -->
|
|
|
|
<target name="portalsearch" description="pack YaCy search widget for static hosting">
|
|
|
|
<tar destfile="${release}/yacy-portalsearch.tar.gz" compression="gzip" defaultexcludes="yes" longfile="fail">
|
|
|
|
<tarfileset dir="${portalsearch}" prefix="yacy/portalsearch/">
|
|
|
|
<include name="*.*"/>
|
|
|
|
</tarfileset>
|
|
|
|
<tarfileset dir="${jquery}" prefix="yacy/jquery/">
|
|
|
|
<include name="**/*"/>
|
|
|
|
</tarfileset>
|
|
|
|
<tarfileset dir="${img-2}" prefix="yacy/ui/img-2/">
|
|
|
|
<include name="magnify.png"/>
|
|
|
|
<include name="cancel_round.png"/>
|
|
|
|
<include name="stop.png"/>
|
|
|
|
</tarfileset>
|
|
|
|
</tar>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- make clean -->
|
|
|
|
<target name="clean" description="make clean">
|
|
|
|
<delete dir="${release_main}" failonerror="false"/>
|
|
|
|
<delete file="${build}/log4j.properties" failonerror="false"/>
|
|
|
|
<delete file="${lib}/yacycore.jar" failonerror="false"/>
|
|
|
|
<delete file="${lib}/svnRevNr.jar" failonerror="false"/> <!-- @TODO: obsolete, never generated -->
|
|
|
|
<delete file="${libbuild}/svnRevNr.jar" failonerror="false"/> <!-- @TODO: obsolete, never generated -->
|
|
|
|
<delete file="${libbuild}/GitRevTask.jar" failonerror="false"/>
|
|
|
|
<delete failonerror="false">
|
|
|
|
<fileset dir="${src}" includes="**/*.class" />
|
|
|
|
<fileset dir="${build}" includes="**/*.class" />
|
|
|
|
<fileset dir="${htroot}" includes="**/*.class" />
|
|
|
|
<fileset dir="test/" includes="**/*.class" />
|
|
|
|
<fileset dir="${libbuild}/svnRevNr" includes="**/*.class" /> <!-- @TODO: obsolete, never generated -->
|
|
|
|
<fileset dir="${libbuild}/GitRevTask" includes="**/*.class" />
|
|
|
|
<fileset dir="." includes="TEST-*" />
|
|
|
|
</delete>
|
|
|
|
<delete dir="test/DATA" failonerror="false"/>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- run YaCy (needed for NetBeans4) -->
|
|
|
|
<target name="run" description="Run YaCy">
|
|
|
|
<!-- debug options:
|
|
|
|
java -Xrunhprof:help
|
|
|
|
Hprof usage: -Xrunhprof[:help]|[:<option>=<value>, ...]
|
|
|
|
|
|
|
|
Option Name and Value Description Default
|
|
|
|
_____________________ ___________ _______
|
|
|
|
heap=dump|sites|all heap profiling all
|
|
|
|
cpu=samples|times|old CPU usage off
|
|
|
|
monitor=y|n monitor contention n
|
|
|
|
format=a|b ascii or binary output a
|
|
|
|
file=<file> write data to file java.hprof(.txt for ascii)
|
|
|
|
net=<host>:<port> send data over a socket write to file
|
|
|
|
depth=<size> stack trace depth 4
|
|
|
|
cutoff=<value> output cutoff point 0.0001
|
|
|
|
lineno=y|n line number in traces? y
|
|
|
|
thread=y|n thread in traces? n
|
|
|
|
doe=y|n dump on exit? y
|
|
|
|
gc_okay=y|n GC okay during sampling y
|
|
|
|
|
|
|
|
Example: java -Xrunhprof:cpu=samples,file=log.txt,depth=3 FooClass
|
|
|
|
|
|
|
|
Note: format=b cannot be used with cpu=old|times
|
|
|
|
-->
|
|
|
|
<java classname="net.yacy.yacy" fork="yes">
|
|
|
|
<classpath>
|
|
|
|
<pathelement location="${build}"/>
|
|
|
|
<pathelement location="${lib}" />
|
|
|
|
<fileset dir="${lib}" includes="**/*.jar" />
|
|
|
|
</classpath>
|
|
|
|
<!--<arg value="-Xrunhprof"/>-->
|
|
|
|
<arg line="-start"/>
|
|
|
|
<jvmarg line="-Xmx800m"/>
|
|
|
|
<!-- <arg line="-migratewords"/>-->
|
|
|
|
<!-- <arg line="-start ${user.dir}"/>-->
|
|
|
|
</java>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- run a single file (selected in NetBeans4) -->
|
|
|
|
<target name="run-single" depends="compile" description="Run Single File">
|
|
|
|
<fail unless="classname">Must set property 'classname'</fail>
|
|
|
|
<java classname="net.yacy.yacy" fork="yes">
|
|
|
|
<classpath refid="run.classpath"/>
|
|
|
|
<classpath>
|
|
|
|
<pathelement location="${build}"/>
|
|
|
|
<pathelement location="${lib}" />
|
|
|
|
<fileset dir="${lib}" includes="**/*.jar" />
|
|
|
|
</classpath>
|
|
|
|
<arg line=""/>
|
|
|
|
</java>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- run YaCy with remote debugging enabled on port 8000 -->
|
|
|
|
<target name="debug" description="Debug YaCy">
|
|
|
|
<java classname="net.yacy.yacy" fork="yes">
|
|
|
|
<classpath>
|
|
|
|
<pathelement location="${build}"/>
|
|
|
|
<pathelement location="${htroot}"/>
|
|
|
|
<pathelement location="${lib}" />
|
|
|
|
<fileset dir="${lib}" includes="**/*.jar" />
|
|
|
|
</classpath>
|
|
|
|
<arg line="-start"/>
|
|
|
|
<jvmarg line="-Xdebug"/>
|
|
|
|
<jvmarg line="-Xnoagent"/>
|
|
|
|
<jvmarg line="-Djava.compiler=none"/>
|
|
|
|
<jvmarg line="-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=y"/>
|
|
|
|
<!-- Dump memory heap when an OutOfMemoryError occurs -->
|
|
|
|
<!-- <jvmarg line="-XX:+HeapDumpOnOutOfMemoryError"/> -->
|
|
|
|
<!-- Dump path -->
|
|
|
|
<!-- <jvmarg line="-XX:HeapDumpPath=/your_path/"/> -->
|
|
|
|
<!-- Display an error popup when the JVM crashes, allowing to plug a debugger before its termination -->
|
|
|
|
<!-- <jvmarg line="-XX:+ShowMessageBoxOnError"/> -->
|
|
|
|
<!-- Log JAXP XML parsers Debug information -->
|
|
|
|
<!-- <jvmarg line="-Djaxp.debug=1"/> -->
|
|
|
|
</java>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- stop YaCy again -->
|
|
|
|
<target name="stop" description="Stop YaCy">
|
|
|
|
<java classname="net.yacy.yacy" fork="yes">
|
|
|
|
<classpath>
|
|
|
|
<pathelement location="${build}"/>
|
|
|
|
<pathelement location="${lib}" />
|
|
|
|
<fileset dir="${lib}" includes="**/*.jar" />
|
|
|
|
</classpath>
|
|
|
|
<arg line="-stop"/>
|
|
|
|
</java>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- create the html-documentation from javadoc -->
|
|
|
|
<target name="create-doc" description="Create the javadoc-HTML-Pages">
|
|
|
|
<javadoc destdir="doc/api"
|
|
|
|
author="true"
|
|
|
|
version="true"
|
|
|
|
use="false"
|
|
|
|
encoding="iso-8859-1"
|
|
|
|
windowtitle="YaCy API Documentation">
|
|
|
|
<classpath>
|
|
|
|
<fileset dir="${lib}">
|
|
|
|
<include name="**/*.jar"/>
|
|
|
|
</fileset>
|
|
|
|
<pathelement location="${build}"/>
|
|
|
|
</classpath>
|
|
|
|
<fileset dir="source" defaultexcludes="yes">
|
|
|
|
<include name="**/*.java" />
|
|
|
|
</fileset>
|
|
|
|
<fileset dir="htroot" defaultexcludes="yes">
|
|
|
|
<include name="**/*.java" />
|
|
|
|
</fileset>
|
|
|
|
</javadoc>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="distWinInstaller" depends="copyMain4Dist" description="Creates an NSIS Windows installer">
|
|
|
|
<!-- http://nsisant.sourceforge.net/ -->
|
|
|
|
<mkdir dir="${release_windows}" />
|
|
|
|
<copy file="build.nsi" tofile="${release_windows}/build.nsi" overwrite="true" filtering="true" />
|
|
|
|
<taskdef name="nsis" classname="net.sf.nsisant.Task">
|
|
|
|
<classpath location="${libbuild}/nsisant-1.2.jar"/>
|
|
|
|
</taskdef>
|
|
|
|
<nsis script="${release_windows}/build.nsi" nocd="yes" verbosity="2" />
|
|
|
|
<move file="${release_windows}/yacy_v${releaseVersion}_${DSTAMP}_${releaseNr}.exe"
|
|
|
|
tofile="${release}/yacy_v${releaseVersion}_${DSTAMP}_${releaseNr}.exe" />
|
|
|
|
|
|
|
|
<delete dir="${release_main}"/>
|
|
|
|
<delete dir="${release_windows}" failonerror="false" />
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="distMacApp" depends="copyMain4Dist" description="Creates a YaCy.app">
|
|
|
|
<copy todir="${release_mac}/YaCy.app">
|
|
|
|
<fileset dir="${addon}/YaCy.app"></fileset>
|
|
|
|
</copy>
|
|
|
|
<copy file="${addon}/YaCy.app/Contents/Info.plist" tofile="${release_mac}/YaCy.app/Contents/Info.plist" filtering="true" overwrite="true" />
|
|
|
|
<move file="${release_main}" tofile="${release_mac}/YaCy.app/Contents/MacOS" verbose="false" />
|
|
|
|
<!-- startYACY.sh and startYACYMacOS.sh will be the main entry points : we set permissions to make it executable files -->
|
|
|
|
<chmod file="${release_mac}/YaCy.app/Contents/MacOS/startYACYMacOS.sh" perm="755"/>
|
|
|
|
<chmod file="${release_mac}/YaCy.app/Contents/MacOS/startYACY.sh" perm="755"/>
|
|
|
|
<exec executable="hdiutil">
|
|
|
|
<arg line="create -srcfolder ${release_mac}/YaCy.app ${release}/yacy_v${releaseVersion}_${DSTAMP}_${releaseNr}.dmg"/>
|
|
|
|
</exec>
|
|
|
|
<delete dir="${release_mac}" failonerror="false" verbose="false" />
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="deleteData" description="start with a fresh yacy installation">
|
|
|
|
<delete dir="${data}"/>
|
|
|
|
</target>
|
|
|
|
</project>
|