set global properties src and res to point to correct locations on all ant build files.

This commit is contained in:
Juha Kovanen 2016-06-16 17:46:53 +03:00
parent 32639ecee0
commit a6d9a365f0
4 changed files with 82 additions and 86 deletions

1
.gitignore vendored
View File

@ -5,4 +5,5 @@ build/
.idea .idea
.gradle .gradle
.iml .iml
target

View File

@ -20,38 +20,38 @@
<description> <description>
BATM server extensions API BATM server extensions API
</description> </description>
<!-- set global properties for this build --> <!-- set global properties for this build -->
<property name="src" location="src"/> <property name="src" location="src/main/java"/>
<property name="build" location="build"/> <property name="res" location="src/main/resources"/>
<property name="dist" location="dist"/> <property name="build" location="build"/>
<property name="libs" location="libs"/> <property name="dist" location="dist"/>
<property name="libs" location="libs"/>
<target name="init"> <target name="init">
<tstamp/> <tstamp/>
<delete dir="${build}" /> <delete dir="${build}"/>
<mkdir dir="${build}"/> <mkdir dir="${build}"/>
</target> </target>
<path id="classpath"> <path id="classpath">
<fileset dir="${libs}" includes="**/*.jar"/> <fileset dir="${libs}" includes="**/*.jar"/>
</path> </path>
<target name="compile" depends="init" description="compile the source " > <target name="compile" depends="init" description="compile the source ">
<javac srcdir="${src}" destdir="${build}" debug="true" debuglevel="lines,vars,source"> <javac srcdir="${src}" destdir="${build}" debug="true" debuglevel="lines,vars,source">
<classpath> <classpath>
<path refid="classpath" /> <path refid="classpath"/>
</classpath> </classpath>
</javac> </javac>
</target>
</target> <target name="dist" depends="compile" description="generate the distribution">
<mkdir dir="${dist}"/>
<jar jarfile="${dist}/${ant.project.name}.jar" basedir="${build}"/>
</target>
<target name="dist" depends="compile" description="generate the distribution" > <target name="clean" description="clean up">
<mkdir dir="${dist}"/> <delete dir="${build}"/>
<jar jarfile="${dist}/${ant.project.name}.jar" basedir="${build}"/> <delete dir="${dist}"/>
</target> </target>
<target name="clean" description="clean up" >
<delete dir="${build}"/>
<delete dir="${dist}"/>
</target>
</project> </project>

View File

@ -21,18 +21,18 @@
<description> <description>
BATM server extra extensions BATM server extra extensions
</description> </description>
<!-- set global properties for this build --> <!-- set global properties for this build -->
<property name="src" location="src"/> <property name="src" location="src/main/java"/>
<property name="res" location="res"/> <property name="res" location="src/main/resources"/>
<property name="build" location="build"/> <property name="build" location="build"/>
<property name="dist" location="dist"/> <property name="dist" location="dist"/>
<property name="libs" location="libs"/> <property name="libs" location="libs"/>
<target name="init"> <target name="init">
<tstamp/> <tstamp/>
<delete dir="${build}" /> <delete dir="${build}"/>
<mkdir dir="${build}"/> <mkdir dir="${build}"/>
</target> </target>
<path id="classpath"> <path id="classpath">
<fileset dir="${libs}" includes="**/*.jar"/> <fileset dir="${libs}" includes="**/*.jar"/>
@ -40,28 +40,26 @@
<fileset dir="../server_extensions_api/dist" includes="**/*.jar"/> <fileset dir="../server_extensions_api/dist" includes="**/*.jar"/>
</path> </path>
<target name="compile" depends="init" description="compile the source " > <target name="compile" depends="init" description="compile the source ">
<javac srcdir="${src}" destdir="${build}" debug="true" debuglevel="lines,vars,source"> <javac srcdir="${src}" destdir="${build}" debug="true" debuglevel="lines,vars,source">
<classpath> <classpath>
<path refid="classpath" /> <path refid="classpath"/>
</classpath> </classpath>
</javac> </javac>
<copy todir="${build}"> <copy todir="${build}">
<fileset dir="${res}"> <fileset dir="${res}">
<include name="**/*"/> <include name="**/*"/>
</fileset> </fileset>
</copy> </copy>
</target> </target>
<target name="dist" depends="compile" description="generate the distribution" > <target name="dist" depends="compile" description="generate the distribution">
<mkdir dir="${dist}"/> <mkdir dir="${dist}"/>
<jar jarfile="${dist}/${ant.project.name}.jar" basedir="${build}"/> <jar jarfile="${dist}/${ant.project.name}.jar" basedir="${build}"/>
</target> </target>
<target name="clean" description="clean up" > <target name="clean" description="clean up">
<delete dir="${build}"/> <delete dir="${build}"/>
<delete dir="${dist}"/> <delete dir="${dist}"/>
</target> </target>
</project> </project>

View File

@ -21,18 +21,18 @@
<description> <description>
BATM server extra extensions BATM server extra extensions
</description> </description>
<!-- set global properties for this build --> <!-- set global properties for this build -->
<property name="src" location="src"/> <property name="src" location="src/main/java"/>
<property name="res" location="res"/> <property name="res" location="src/main/resources"/>
<property name="build" location="build"/> <property name="build" location="build"/>
<property name="dist" location="dist"/> <property name="dist" location="dist"/>
<property name="libs" location="libs"/> <property name="libs" location="libs"/>
<target name="init"> <target name="init">
<tstamp/> <tstamp/>
<delete dir="${build}" /> <delete dir="${build}"/>
<mkdir dir="${build}"/> <mkdir dir="${build}"/>
</target> </target>
<path id="classpath"> <path id="classpath">
<fileset dir="${libs}" includes="**/*.jar"/> <fileset dir="${libs}" includes="**/*.jar"/>
@ -42,26 +42,23 @@
<fileset dir="../server_extensions_extra/dist" includes="**/*.jar"/> <fileset dir="../server_extensions_extra/dist" includes="**/*.jar"/>
</path> </path>
<target name="compile" depends="init" description="compile the source " > <target name="compile" depends="init" description="compile the source ">
<javac srcdir="${src}" destdir="${build}" debug="true" debuglevel="lines,vars,source"> <javac srcdir="${src}" destdir="${build}" debug="true" debuglevel="lines,vars,source">
<classpath> <classpath>
<path refid="classpath" /> <path refid="classpath"/>
</classpath> </classpath>
</javac> </javac>
</target> </target>
<target name="dist" depends="compile" description="generate the distribution" > <target name="dist" depends="compile" description="generate the distribution">
<mkdir dir="${dist}"/> <mkdir dir="${dist}"/>
<jar jarfile="${dist}/${ant.project.name}.jar" basedir="${build}"/> <jar jarfile="${dist}/${ant.project.name}.jar" basedir="${build}"/>
<copy file="${res}/tester.sh" todir="${dist}"/> <copy file="${res}/tester.sh" todir="${dist}"/>
<chmod file="${dist}/tester.sh" perm="ugo+x"/> <chmod file="${dist}/tester.sh" perm="ugo+x"/>
</target> </target>
<target name="clean" description="clean up" > <target name="clean" description="clean up">
<delete dir="${build}"/> <delete dir="${build}"/>
<delete dir="${dist}"/> <delete dir="${dist}"/>
</target> </target>
</project> </project>