Commit bd2a9fbb authored by Mathias Goebel's avatar Mathias Goebel 🎠
Browse files

ALL NEW SADE

parent 5f0f4fc8
[submodule "sample-projects/sade-textgrid-default-project"]
path = sample-projects/sade-textgrid-default-project
url = git@github.com:ubbo/sade-textgrid-default-project.git
#Mon, 15 Apr 2013 13:42:45 +0200
# default build properties, create local.build.properties to override
app.name=SADE
app.uri=http://telota.de/sade
app.version=0.3
projects.dir=sade-projects
# set conf.overwrite to true if src/repo.xml, src/expath-pkg.xml and src/core/config.xql
# should be overwritten from their templates
conf.overwrite=false
<?xml version="1.0" encoding="UTF-8"?>
<project default="xar" name="packages">
<property file="local.build.properties"/>
<property file="build.properties"/>
<import file="build_docs.xml" />
<property name="build.dir" value="${basedir}/build"/>
<target name="xar">
<ant dir="src"/>
<!--ant dir="sample-projects"/-->
</target>
<target name="clean">
<delete dir="build"/>
<delete dir="dist-utils/antbuild/build"/>
</target>
<target name="sade-dist-build">
<ant antfile="dist-utils/antbuild/build.xml" inheritAll="false"/>
</target>
</project>
<project default="xar" name="SADE">
<xmlproperty file="expath-pkg.xml"/>
<property name="project.version" value="${package(version)}"/>
<property name="project.app" value="SADE"/>
<property name="build.dir" value="build"/>
<target name="xar">
<mkdir dir="${build.dir}"/>
<zip basedir="." destfile="${build.dir}/${project.app}-${project.version}.xar" excludes="${build.dir}/*"/>
</target>
</project>
\ No newline at end of file
<?xml version="1.0"?>
<!-- ======================================================================
Date: 2013-01
Project: corpus_shell
====================================================================== -->
<project name="cr-xq autdocs" basedir=".">
<description>
targets for corpus_shell
</description>
<!-- <property name="cache.dir" value="data2" />-->
<!-- <property name="out.dir" value="output" />-->
<property name="docs.dir" value="docs" />
<property name="xsl.dir" value="xsl/" />
<property name="scripts.dir" location="build/scripts"/>
<!-- <import file="${scripts.dir}\build.xml" /> -->
<target name="gen-docs" depends="gen-build-info,gen-jsdocs">
</target>
<target name="gen-jsdocs" >
<ant antfile="${scripts.dir}\build_docs.xml" target="gen-jsdoc">
<property name="src.dir" location="scripts/js/query_input/qi.js" />
<property name="docs.dir" location="docs/js/query_input"/>
</ant>
</target>
<target name="gen-jsdocs2" >
<ant antfile="${scripts.dir}\build_docs.xml" target="gen-jsdoc">
<property name="src.dir" location="../../code/fromMDService2/scripts/" />
<property name="docs.dir" location="../../code/fromMDService2/docs"/>
</ant>
</target>
<target name="gen-xsldocs" >
<property name="out.fn" value="c_s-xsl"></property>
<ant antfile="${scripts.dir}\build_docs.xml" target="ay-xsl">
<property name="in.dir" location="${xsl.dir}" />
<property name="file.prefix" value="../.." />
<property name="title" value="${out.fn}" />
<property name="parts" value="imports, params, templates, functions" />
<property name="out.dir" location="${docs.dir}/xsltdocs"/>
<property name="out.fn" value="${out.fn}"/>
</ant>
<ant antfile="${scripts.dir}\build_docs.xml" target="gen-dep-graph">
<property name="work.dir" location="${docs.dir}/xsltdocs" />
<property name="in.file" value="${docs.dir}/xsltdocs/${out.fn}.xml"/>
<property name="title" value="${out.fn}-imports" />
<property name="parts" value="imports" />
<property name="out.fn" value="${out.fn}-imports"/>
</ant>
<ant antfile="${scripts.dir}\build_docs.xml" target="gen-dep-graph-each">
<property name="in.dir" location="${xsl.dir}" />
<property name="parts" value="imports, params, templates, functions" />
<property name="work.dir" location="${docs.dir}/xsltdocs/xslts"/>
</ant>
</target>
<target name="gen-xqdocs" >
<property name="out.fn" value="cr-xq-calls"></property>
<property name="out.dir" value="${docs.dir}/xqdocs/graph"></property>
<ant antfile="${scripts.dir}\build_docs.xml" target="gen-xq-graph-all">
<property name="in.dir" location="src" />
<property name="title" value="${out.fn}" />
<property name="file.prefix" value="../../.." />
<!-- <property name="parts" value="imports, params, templates, functions" />-->
<property name="out.dir" location="${out.dir}"/>
<property name="out.fn" value="${out.fn}"/>
</ant>
<echo>generating graph without utils</echo>
<copy file="${out.dir}/${out.fn}.dot" tofile="${out.dir}/${out.fn}_noUtils.dot" force="true">
<filterchain>
<linecontains negate="true">
<contains value="repo_utils"/>
</linecontains>
<linecontains negate="true">
<contains value="config"/>
</linecontains>
</filterchain>
</copy>
<exec executable="dot">
<arg value="${out.dir}/${out.fn}_noUtils.dot" />
<arg value="-o${out.dir}/${out.fn}_noUtils.svg"/>
<arg value="-Tsvg"/>
</exec>
<exec executable="dot">
<arg value="${out.dir}/${out.fn}_noUtils.dot" />
<arg value="-o${out.dir}/${out.fn}_noUtils.png"/>
<arg value="-Tpng"/>
</exec>
<!--
<echo>generating a separate graph for each module</echo>
<ant antfile="${scripts.dir}\build_docs.xml" target="gen-xq-graph-each">
<property name="in.dir" location="src" />
<property name="title" value="${out.fn}" />
<property name="file.prefix" value="../../.." />
<!-\- <property name="parts" value="imports, params, templates, functions" />-\->
<property name="out.dir" location="${out.dir}"/>
<property name="out.fn" value="${out.fn}"/>
</ant>
-->
</target>
<target name="gen-build-info" >
<ant antfile="${scripts.dir}\build.xml" target="gen-build-info">
<property name="in.dir" location="" />
<property name="other.build" value="build"/>
<property name="out.dir" location="docs"/>
</ant>
</target>
</project>
Build script for SADE distribution
==================================
The script build.sh should assemble a SADE instance. Run "build.sh -h" for help.
The following tools need to be installed:
- wget
- tar
- unzip
- svn
- java
- sed
- maven
- ant
- zip (optional)
<?xml version="1.0" encoding="UTF-8"?>
<project
basedir="."
default="build"
name="SADE"
xmlns:ivy="antlib:org.apache.ivy.ant"
xmlns:git="antlib:com.rimerosolutions.ant.git">
<property name="build.dir" value="${basedir}/build"/>
<property name="resources.dir" value="${basedir}/resources"/>
<property name="ivy.install.version" value="2.3.0"/>
<property name="ivy.jar.dir" value="${basedir}/lib"/>
<property name="ivy.jar.file" value="${ivy.jar.dir}/ivy.jar"/>
<property name="exist.git" value="https://github.com/eXist-db/exist.git"/>
<property name="exist.version" value="3.2.0"/>
<property name="exist.tag" value="eXist-${exist.version}"/>
<property name="exist.dest" value="${build.dir}/exist-git"/>
<property name="exist.dist" value="${exist.dest}/dist/eXist-db-${exist.version}"/>
<property name="sade.src" value="../../"/>
<property name="sade.port" value="8080"/>
<property name="sade.port.ssl" value="8443"/>
<property name="sade.Xmx" value="3072"/>
<!-- <property name="markdown.git" value="https://github.com/wolfgangmm/exist-markdown.git"/> -->
<!-- <property name="markdown.dest" value="${build.dir}/exist-markdown"/> -->
<property name="tg.sade.connect" value="https://gitlab.gwdg.de/fontane-notizbuecher/textgrid-SADE-connect.git"/>
<property name="sade.tgz.file" value="${build.dir}/sade.tar.gz"/>
<property name="tgsade.tgz.file" value="${build.dir}/sade-textgrid.tar.gz"/>
<property name="tg.defp.dest" value="${build.dir}/sade-textgrid-default-project"/>
<property name="tg.defp.git" value="https://github.com/ubbo/sade-textgrid-default-project.git"/>
<property name="tg.defp.git.branch" value="master"/>
<property name="tg.sadeconnect.dest" value="${build.dir}/textgrid-sade-connector"/>
<property name="fontane.static.git" value="https://gitlab.gwdg.de/fontane-notizbuecher/static.git"/>
<property name="fontane.static.dest" value="${build.dir}/static"/>
<property name="fontane.sadeproject.git" value="https://gitlab.gwdg.de/fontane-notizbuecher/SADE-Project.git"/>
<property name="fontane.sadeproject.git.branch" value="develop"/>
<property name="fontane.sadeproject.dest" value="${build.dir}/fontane"/>
<property name="fontane.sadeproject.target" value="fastdeploy"/>
<!-- ^ valid parameter is "fastdeploy", anything else triggers a complete import -->
<!-- build with rdf indexer? -->
<property name="rdf" value="false"/>
<target name="exist-git" depends="ant-dependencies">
<!-- TODO: use http://ant.apache.org/manual/properties.html#if+unless -->
<if>
<available file="${exist.dest}" type="dir" />
<then>
<echo message="updating exist git repository" />
<git:git directory="${exist.dest}" verbose="false">
<git:checkout branchName="develop" />
<git:pull />
<git:checkout branchName="tags/${exist.tag}" />
</git:git>
</then>
<else>
<echo message="cloning exist git repository"/>
<git:git directory="${exist.dest}" verbose="false">
<git:clone uri="${exist.git}"/>
<git:checkout branchName="tags/${exist.tag}" />
</git:git>
</else>
</if>
</target>
<!-- <target name="build" depends="exist-git,markdown"> -->
<target name="build" depends="exist-git">
<echo message="building eXist"/>
<echo message="patching lucene inlining"/>
<patch patchfile="${resources.dir}/lucene-inline.patch" originalfile="${exist.dest}/extensions/indexes/lucene/src/org/exist/indexing/lucene/DefaultTextExtractor.java" ignorewhitespace="true" failonerror="false" />
<!-- add some more xar packages to autodeploy -->
<copy file="${resources.dir}/local.build.properties.override" tofile="${exist.dest}/build.properties" />
<!-- include cqlparser in build-->
<copy file="${resources.dir}/exist.extension.properties.override" tofile="${exist.dest}/extensions/local.build.properties" />
<!--
if we want to get more from public repo… -->
<replace file="${exist.dest}/build.properties" token="dashboard,shared,eXide,monex" value="dashboard,shared,eXide,monex,functx,fundocs,markdown" />
<antcall target="existBuild" />
<replace file="${exist.dest}/build.properties" token="dashboard,shared,eXide,monex,functx,fundocs,markdown" value="dashboard,shared,eXide,monex" />
<!-- include cqlparser in conf.xml -->
<replace file="${exist.dist}/conf.xml">
<replacetoken>&lt;module uri="http://exist-db.org/xquery/cqlparser" class="org.exist.xquery.modules.cqlparser.CQLParserModule" /&gt;</replacetoken>
<replacevalue>--&gt; &lt;module uri="http://exist-db.org/xquery/cqlparser" class="org.exist.xquery.modules.cqlparser.CQLParserModule" /&gt; &lt;!--</replacevalue>
</replace>
<!-- enable autostart scripts -->
<replace file="${exist.dist}/conf.xml">
<replacetoken>&lt;!--&lt;trigger class="org.exist.collections.triggers.XQueryStartupTrigger"/&gt;--&gt;</replacetoken>
<replacevalue>&lt;trigger class="org.exist.collections.triggers.XQueryStartupTrigger"/&gt;</replacevalue>
</replace>
<!-- former patch, now replaced <patch patchfile="${resources.dir}/conf.xml.cqlparser.patch" originalfile="${exist.dist}/conf.xml" ignorewhitespace="true" failonerror="true" /> -->
<echo message="building and integrating SADE"/>
<ant antfile="${sade.src}/build.xml" inheritAll="false" />
<!-- add xar files to autodeploy -->
<mkdir dir="${exist.dist}/autodeploy"/>
<copy todir="${exist.dist}/autodeploy">
<fileset dir="${exist.dest}/autodeploy/" includes="*.xar"/>
<fileset dir="${sade.src}/build" includes="*.xar"/>
</copy>
<antcall target="eXistconfig"/>
<!-- get FunctX from public Package Repo
we are now using the autodeployment feature on build process, see existconfig below!!!
<get src="http://exist-db.org/exist/apps/public-repo/public/functx-1.0.xar" dest="${exist.dist}/autodeploy/functx-1.0.xar"/>
<get src="http://exist-db.org/exist/apps/public-repo/public/markdown-0.5.xar" dest="${exist.dist}/autodeploy/markdown-0.5.xar"/>
<get src="http://exist-db.org/exist/apps/public-repo/public/fundocs-0.8.xar" dest="${exist.dist}/autodeploy/fundocs-0.8.xar"/>
-->
<antcall target="rdf-indexer" />
<antcall target="fontane-lucene-analyzer" />
<antcall target="fontane-static" />
<antcall target="tgz" />
<antcall target="textgrid-tgz" />
<antcall target="project-data" />
</target>
<target name="existBuild">
<!-- get updated xars to autodeploy dir -->
<delete dir="${exist.dest}/autodeploy" />
<java classname="org.apache.tools.ant.launch.Launcher" fork="true">
<arg value="-Dant.home=${exist.dest}/tools/ant"/>
<arg value="-Dant.library.dir=${exist.dest}/tools/ant/lib"/>
<arg value="-Divy.default.ivy.user.dir=${basedir}/ivy" />
<arg value="-Djavax.xml.transform.TransformerFactory=org.apache.xalan.processor.TransformerFactoryImpl"/>
<arg value="-f"/>
<arg value="${exist.dest}/build.xml"/>
<arg value="all"/>
<arg value="dist"/>
<classpath>
<pathelement location="${exist.dest}/tools/ant/lib/ant-launcher-1.9.7.jar"/>
<!--pathelement path="${java.class.path}"/-->
</classpath>
</java>
</target>
<target name="tgz">
<delete file="${sade.tgz.file}" />
<delete dir="${build.dir}/sade" />
<!-- i had never expect the move of exist.dist in here! -->
<move file="${exist.dist}" toFile="${build.dir}/sade" />
</target>
<target name="textgrid-tgz" depends="textgrid-sade-connector">
<delete file="${tgsade.tgz.file}" />
<move todir="${build.dir}/sade/autodeploy">
<fileset dir="${tg.sadeconnect.dest}/build">
<include name="*.xar"/>
</fileset>
</move>
</target>
<target name="textgrid-default-project" depends="ant-dependencies">
<if>
<available file="${tg.defp.dest}" type="dir" />
<then>
<git:git directory="${tg.defp.dest}" verbose="false">
<git:checkout branchName="${tg.defp.git.branch}" />
<git:pull/>
</git:git>
</then>
<else>
<echo message="cloning sade-textgrid-default-project" />
<git:git directory="${tg.defp.dest}" verbose="false">
<git:clone uri="${tg.defp.git}" />
<git:checkout branchName="${tg.defp.git.branch}" />
</git:git>
</else>
</if>
<echo message="packaging sade-textgrid-default-project.xar" />
<ant antfile="${tg.defp.dest}/build.xml" inheritAll="false" />
<move file="${tg.defp.dest}/build/sade-textgrid-default-project.xar" toFile="${build.dir}/sade/autodeploy/sade-textgrid-default-project.xar" />
</target>
<target name="textgrid-sade-connector">
<if>
<available file="${tg.sadeconnect.dest}" type="dir" />
<then>
<echo message="updating tg-sade-connector git repository" />
<git:git directory="${tg.sadeconnect.dest}" verbose="false">
<git:pull uri="${tg.sade.connect}"/>
</git:git>
</then>
<else>
<echo message="cloning ${tg.sade.connect}"/>
<git:git directory="${tg.sadeconnect.dest}" verbose="false">
<git:clone uri="${tg.sade.connect}"/>
</git:git>
</else>
</if>
<echo message="packaging textgrid-sade-connector.xar"/>
<ant antfile="${tg.sadeconnect.dest}/build.xml" inheritAll="false" />
</target>
<target name="ant-dependencies" depends="install-ivy">
<property name="ivy.default.ivy.user.dir" value="${basedir}/ivy"/>
<ivy:retrieve conf="tasks" />
<path id="classpath">
<fileset dir="./lib">
<include name="*.jar"/>
</fileset>
</path>
<!-- git -->
<taskdef uri="antlib:com.rimerosolutions.ant.git"
resource="com/rimerosolutions/ant/git/jgit-ant-lib.xml"
classpathref="classpath"/>
<!-- contrib has if -->
<taskdef resource="net/sf/antcontrib/antcontrib.properties" classpathref="classpath" />
</target>
<target name="download-ivy" unless="skip.download">
<mkdir dir="${ivy.jar.dir}"/>
<get src="http://repo1.maven.org/maven2/org/apache/ivy/ivy/${ivy.install.version}/ivy-${ivy.install.version}.jar"
dest="${ivy.jar.file}" usetimestamp="true"/>
</target>
<target name="install-ivy" depends="download-ivy" description="--> install ivy">
<path id="ivy.lib.path">
<pathelement location="${ivy.jar.file}"/>
</path>
<taskdef resource="org/apache/ivy/ant/antlib.xml"
uri="antlib:org.apache.ivy.ant" classpathref="ivy.lib.path"/>
</target>
<target name="fontane-static">
<if>
<available file="${fontane.static.dest}" type="dir" />
<then>
<echo message="git pull" />
<git:git directory="${fontane.static.dest}" verbose="false">
<git:pull/>
</git:git>
</then>
<else>
<echo message="git clone ${fontane.static.git}"/>
<git:git directory="${fontane.static.dest}" verbose="false">
<git:clone uri="${fontane.static.git}"/>
<git:checkout branchName="origin/master" />
</git:git>
</else>
</if>
<echo message="copy public folder to webapps/portal"/>
<mkdir dir="${exist.dist}/tools/jetty/webapps/portal/public"/>
<copy todir="${exist.dist}/tools/jetty/webapps/portal/public">
<fileset dir="${fontane.static.dest}/public"/>
</copy>
</target>
<target name="project-data" depends="ant-dependencies">
<if>
<available file="${fontane.sadeproject.dest}" type="dir" />
<then>
<echo message="[fontane] updating project data git repository" />
<git:git directory="${fontane.sadeproject.dest}" verbose="false">
<git:checkout branchName="develop" />
<git:pull uri="${fontane.sadeproject.git}"/>
</git:git>
</then>
<else>
<echo message="[fontane] cloning ${fontane.sadeproject.git}" />
<git:git directory="${fontane.sadeproject.dest}" verbose="false">
<git:clone uri="${fontane.sadeproject.git}" />
<git:checkout branchName="${fontane.sadeproject.git.branch}" />
</git:git>
</else>
</if>
<echo message="[fontane] packaging sade-project-develop.xar" />
<if>
<equals arg1="${fontane.sadeproject.target}" arg2="fastdeploy" />
<then>
<echo message="[fontane] preparing for faster deployment" />
<ant antfile="${fontane.sadeproject.dest}/build.xml" target="fastdeploy" inheritAll="false" />
</then>
<else>
<echo message="prepering complete database" />
<ant antfile="${fontane.sadeproject.dest}/build.xml" inheritAll="false" />
</else>
</if>
<move todir="${build.dir}/sade/autodeploy/">
<fileset dir="${fontane.sadeproject.dest}/build/">
<include name="*.xar"/>
</fileset>
</move>
</target>
<target name="eXistconfig">
<!-- port configuration -->
<replace file="${exist.dist}/tools/jetty/etc/jetty-http.xml" token="8080" value="${sade.port}"/>
<replace file="${exist.dist}/tools/jetty/etc/jetty-ssl.xml" token="8443" value="${sade.port.ssl}"/>
<replace file="${exist.dist}/tools/jetty/etc/jetty.xml" token="8443" value="${sade.port.ssl}"/>
<!-- memory configuration Xmx -->
<replace file="${exist.dist}/bin/functions.d/eXist-settings.sh" token="JAVA_OPTIONS=&quot;-Xms128m -Xmx2048m -Dfile.encoding=UTF-8&quot;;" value="JAVA_OPTIONS=&quot;-Xms128m -Xmx${sade.Xmx}m -Dfile.encoding=UTF-8&quot;;"/>
<replace file="${exist.dist}/tools/yajsw/conf/wrapper.conf" token="wrapper.java.maxmemory=2048" value="wrapper.java.maxmemory=${sade.Xmx}"/>
</target>
<target name="rdf-indexer">
<if>
<equals arg1="${rdf}" arg2="true"/>
<then>
<get src="http://exist-db.org/exist/apps/public-repo/public/exist-sparql-0.1-SNAPSHOT.xar" dest="${exist.dist}/autodeploy/exist-sparql-0.1-SNAPSHOT.xar"/>
<replace file="${exist.dist}/conf.xml">
<replacetoken>&lt;/modules&gt;</replacetoken>
<replacevalue>&lt;!-- RDF index and SPARQL Endpoint: --&gt;
&lt;module id="rdf-index" class="org.exist.indexing.rdf.TDBRDFIndex"/&gt;
&lt;/modules&gt;</replacevalue>
</replace>
</then>
</if>
</target>
<target name="fontane-lucene-analyzer">
<get src="https://ci.de.dariah.eu/jenkins/view/TextGridRep/job/fontane-lucene-exist-module/lastSuccessfulBuild/artifact/target/fontane-lucene-exist-module-0.1-SNAPSHOT.xar" dest="${exist.dist}/autodeploy/fontane-lucene-exist-module-0.1-SNAPSHOT.xar"/>
</target>
</project>
<ivy-module version="2.0">
<info organisation="sade" module="sadebuild"/>
<configurations>
<conf name="tasks" description="Ant tasks"/>
</configurations>
<dependencies>
<dependency org="com.rimerosolutions.ant" name="ant-git-tasks" rev="0.0.1"/>
<dependency org="org.eclipse.jgit" name="org.eclipse.jgit.ant" rev="3.0.0.201306101825-r"/>
<dependency org="org.eclipse.jgit" name="org.eclipse.jgit" rev="3.0.0.201306101825-r" />
<dependency org="com.jcraft" name="jsch" rev="0.1.50" />
<dependency org="ant-contrib" name="ant-contrib" rev="20020829"/>
</dependencies>
</ivy-module>
--- conf.xml
+++ conf.xml
@@ -906,7 +906,7 @@
<module uri="http://exist-db.org/xquery/backups" class="org.exist.backup.xquery.BackupModule" />
<module uri="http://exist-db.org/xquery/cache" class="org.exist.xquery.modules.cache.CacheModule" />
<module uri="http://exist-db.org/xquery/context" class="org.exist.xquery.modules.context.ContextModule" />
- <module uri="http://exist-db.org/xquery/cqlparser" class="org.exist.xquery.modules.cqlparser.CQLParserModule" />
+ --><module uri="http://exist-db.org/xquery/cqlparser" class="org.exist.xquery.modules.cqlparser.CQLParserModule" /><!--
<module uri="http://exist-db.org/xquery/exi" class="org.exist.xquery.modules.exi.ExiModule" />
<module uri="http://exist-db.org/xquery/jndi" class="org.exist.xquery.modules.jndi.JNDIModule" />
<module uri="http://exist-db.org/xquery/jfreechart" class="org.exist.xquery.modules.jfreechart.JFreeChartModule" />
#
#
#
# $Id$
project.name = eXist-db
project.version = 2.2
project.version.numeric = 2.2
project.codename = Ruesselsheim
# build settings
build.debug = on
build.optimize = on
build.deprecation = off
build.encoding = UTF-8
build.compiler.pedantic = false
build.compiler=modern
build.compiler.source=1.7
build.compiler.target=1.7
autodeploy=dashboard,shared,eXide,monex,markdown,functx
autodeploy.repo=http://demo.exist-db.org/exist/apps/public-repo
use.autodeploy.feature=true
# output dir for junit reports
junit.reports = test
junit.output = true
junit.forked.VM.maxmemory = 512m
# Converted junit tests from external testsuites
# reuire more memory, e g
# XSLTS requires 512m
# XQTS requires more than 400m
junit.forked.VM.maxmemory.external = 512m
proxy.nonproxyhosts =
proxy.host =
proxy.port = 0
proxy.password =
proxy.user =
proxy.socks.host =
proxy.socks.port = 0
#proxy.ntlm.domain =
# Ant