Skip to content
This repository has been archived by the owner on Jun 30, 2022. It is now read-only.

Commit

Permalink
Rewrite ant build script.
Browse files Browse the repository at this point in the history
  • Loading branch information
henning-gerhardt committed Sep 30, 2016
1 parent c9b2667 commit 990c4c9
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 46 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
# Ant
build.properties
/build
/dist
3 changes: 0 additions & 3 deletions build.properties

This file was deleted.

4 changes: 4 additions & 0 deletions build.properties.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# This file is part of Kitodo.ContentServer

jre.dir.lib=/usr/lib/jvm/default-java/jre/lib
tomcat.dir.lib=/usr/share/tomcat7/lib
108 changes: 65 additions & 43 deletions build.xml
Original file line number Diff line number Diff line change
@@ -1,46 +1,68 @@
<?xml version="1.0"?>

<project name="basic command plugins" basedir="." default="deploy">

<!-- =================================
properties
================================= -->
<property name="jarfile" value="ics1.1.jar" />
<property name="pluginFolderWin" value="C:/Goobi/" />
<property name="pluginFolderMac" value="/opt/digiverso/" />
<property name="dir.lib" value="./WebContent/WEB-INF/lib" />

<path id="classpath">
<fileset dir="${dir.lib}" />
<fileset dir="/opt/digiverso/libs" />
</path>

<!-- =================================
targets: compile and jar
================================= -->
<target name="jar">
<echo>compile sources</echo>
<javac destdir="build">
<classpath refid="classpath" />
<src path="src" />
</javac>
<echo>generate jar file</echo>
<jar destfile="${jarfile}">
<fileset dir="build" />
</jar>
</target>

<path id="classpath">
<fileset dir="${dir.lib}" />
<fileset dir="/opt/digiverso/libs" />
</path>

<!-- =================================
target: deploy
================================= -->
<target name="deploy" depends="jar">
<echo>intranda ... alles ist gut!</echo>
</target>

</project>
<project name="basic command plugins" default="all">


<!-- Include build and deployment options -->
<property file="build.properties" prefix="build"/>

<property name="build.dir" value="build" />

<property name="build.dist.name" value="ics" />
<property name="build.dist.version" value="1.1.5" />

<property name="dist.dir" value="dist" />

<property name="jarfile" value="${build.dist.name}-${build.dist.version}.jar" />
<property name="dir.lib" value="${basedir}/WebContent/WEB-INF/lib" />

<property name="src.dir" value="${basedir}/src" />

<!-- normally overridden in build.properties -->
<property name="build.tomcat.dir.lib" value="${dir.lib}" />
<property name="build.jre.dir.lib" value="${dir.lib}" />

<path id="classpath">
<fileset dir="${dir.lib}" />
<fileset dir="${build.tomcat.dir.lib}" />
<fileset dir="${build.jre.dir.lib}" />
</path>

<target name="all" depends="jar" />

<target name="clean">
<delete dir="${build.dir}" />
<delete dir="${dist.dir}" />
</target>

<target name="copyAdditionalNonJavaFiles">
<copy todir="${build.dir}">
<fileset dir="${src.dir}">
<exclude name="**/*.java" />
</fileset>
</copy>
</target>

<target name="createDirectories">
<mkdir dir="${build.dir}" />
<mkdir dir="${dist.dir}" />
</target>

<!-- jar build process -->
<target name="jar" depends="createDirectories, copyAdditionalNonJavaFiles">
<echo>compile sources</echo>
<javac destdir="build"
includeantruntime="false"
encoding="UTF-8"
debug="true"
debuglevel="lines,vars,source">
<classpath refid="classpath" />
<src path="${src.dir}" />
</javac>
<echo>generate jar file</echo>
<jar destfile="${dist.dir}/${jarfile}">
<fileset dir="${build.dir}" />
</jar>
</target>

</project>

0 comments on commit 990c4c9

Please sign in to comment.