build.xml 3.83 KB
Newer Older
1
<?xml version="1.0" encoding="UTF-8"?>
2
3
4
5
6
7
8
9
10
<project default="xar" name="SADE" xmlns:xdb="http://exist-db.org/ant">

  <property environment="env"/>
  <property name="build.dir" value="build"/>
  <property file="local.build.properties"/>
  <property file="build.properties"/>
  <xmlproperty file="expath-pkg.xml.tmpl"/>

    <target name="xar" depends="cleanup">
Mathias Goebel's avatar
Mathias Goebel committed
11
        <copy file="expath-pkg.xml.tmpl" tofile="expath-pkg.xml" filtering="true" overwrite="true">
Mathias Goebel's avatar
JENKINS    
Mathias Goebel committed
12
13
            <filterset>
                <filter token="project.version" value="${project.version}"/>
Mathias Goebel's avatar
Mathias Goebel committed
14
15
                <filter token="project.title" value="${project.title}"/>
                <filter token="project.abbrev" value="${project.abbrev}"/>
Mathias Goebel's avatar
Mathias Goebel committed
16
                <filter token="project.name" value="${project.name}"/>
Mathias Goebel's avatar
Mathias Goebel committed
17
                <filter token="project.processorversion" value="${project.processorversion}"/>
Mathias Goebel's avatar
Mathias Goebel committed
18
                <filter token="dependency.track" value="${dependency.track}"/>
Mathias Goebel's avatar
JENKINS    
Mathias Goebel committed
19
            </filterset>
Mathias Goebel's avatar
Mathias Goebel committed
20
        </copy>
Mathias Goebel's avatar
Mathias Goebel committed
21
        <mkdir dir="${build.dir}"/>
22
23
        <zip basedir="." destfile="${destfile}"
            excludes="${build.dir}/*,${test.dir}/*"/>
Mathias Goebel's avatar
Mathias Goebel committed
24
    </target>
Mathias Goebel's avatar
Mathias Goebel committed
25

26
27
28
29
30
31
32
33
<target name="cleanup">
  <delete dir="${test.dir}"/>
</target>

    <target name="test" depends="xar">
      <get src="https://bintray.com/existdb/releases/download_file?file_path=eXist-db-${project.processorversion}.tar.bz2" dest="${build.dir}/eXist-db-${project.processorversion}.tar.bz2" skipexisting="true" />
      <untar src="${build.dir}/eXist-db-${project.processorversion}.tar.bz2" dest="${test.dir}" compression="bzip2" />

Mathias Goebel's avatar
Mathias Goebel committed
34
      <get src="https://ci.de.dariah.eu/exist-repo/find.zip?abbrev=cv${dependency.track}&amp;processor=${project.processorversion}" dest="${test.dir}/eXist-db-${project.processorversion}/autodeploy/codeview-latest.xar" ignoreerrors="true"/>
Mathias Goebel's avatar
Mathias Goebel committed
35
36
      <get src="https://ci.de.dariah.eu/exist-repo/find.zip?abbrev=tgconnect${dependency.track}&amp;processor=${project.processorversion}" dest="${test.dir}/eXist-db-${project.processorversion}/autodeploy/tgconnect${dependency.track}-latest.xar" ignoreerrors="true"/>
      <get src="https://ci.de.dariah.eu/exist-repo/find.zip?abbrev=fontane${dependency.track}&amp;processor=${project.processorversion}" dest="${test.dir}/eXist-db-${project.processorversion}/autodeploy/fontane${dependency.track}-latest.xar" ignoreerrors="true"/>
37
      <get src="https://ci.de.dariah.eu/exist-repo/find.zip?abbrev=fontane-lucene-exist-module&amp;processor=${project.processorversion}" dest="${test.dir}/eXist-db-${project.processorversion}/autodeploy/fontane-lucene-latest.xar" ignoreerrors="true"/>
Mathias Goebel's avatar
Mathias Goebel committed
38
      <get src="https://ci.de.dariah.eu/exist-repo/find.zip?abbrev=openapi${dependency.track}&amp;processor=${project.processorversion}" dest="${test.dir}/eXist-db-${project.processorversion}/autodeploy/openapi${dependency.track}-latest.xar" ignoreerrors="true"/>
39
40
41

      <get src="http://exist-db.org/exist/apps/public-repo/find.zip?abbrev=markdown&amp;processor=${project.processorversion}" dest="${test.dir}/eXist-db-${project.processorversion}/autodeploy/markdown-latest.xar" ignoreerrors="true"/>
      <get src="http://exist-db.org/exist/apps/public-repo/find.zip?abbrev=xqjson&amp;processor=${project.processorversion}" dest="${test.dir}/eXist-db-${project.processorversion}/autodeploy/xqjson-latest.xar" ignoreerrors="true"/>
Mathias Goebel's avatar
Mathias Goebel committed
42
      <get src="http://exist-db.org/exist/apps/public-repo/find.zip?abbrev=fundocs&amp;processor=${project.processorversion}" dest="${test.dir}/eXist-db-${project.processorversion}/autodeploy/fundocs-latest.xar" ignoreerrors="true"/>
43
44

      <copy file="${destfile}" todir="${test.dir}/eXist-db-${project.processorversion}/autodeploy" />
Mathias Goebel's avatar
Mathias Goebel committed
45
46
47
      <copy todir="${test.dir}/eXist-db-${project.processorversion}/tools/jetty/webapps/portal/public" preservelastmodified="true" failonerror="false">
        <fileset dir="${basedir}/../static/public"/>
      </copy>
48
49
    </target>

Mathias Goebel's avatar
Mathias Goebel committed
50
</project>