Complete Makeover
[splitter-ng] / Splitter-ng-filesplitter / build.xml
1 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2 <project basedir="." default="build" name="Splitter-ng-filesplitter">
3         <property environment="env" />
4         <property name="Splitter-ng.location" value="../Splitter-ng" />
5         <property name="debuglevel" value="source,lines,vars" />
6         <property name="target" value="1.7" />
7         <property name="source" value="1.7" />
8         <path id="Splitter-ng.classpath">
9                 <pathelement location="${Splitter-ng.location}/bin" />
10         </path>
11         <path id="Splitter-ng-filesplitter.classpath">
12                 <pathelement location="bin" />
13                 <pathelement location="lib" />
14                 <fileset dir="lib">
15                         <include name="*.jar"/>
16                 </fileset>
17                 <path refid="Splitter-ng.classpath" />
18         </path>
19         <target name="init">
20                 <mkdir dir="bin" />
21                 <copy includeemptydirs="false" todir="bin">
22                         <fileset dir="src">
23                                 <exclude name="**/*.uad" />
24                                 <exclude name="**/*.ucd" />
25                                 <exclude name="**/*.uld" />
26                                 <exclude name="**/*.upd" />
27                                 <exclude name="**/*.udd" />
28                                 <exclude name="**/*.uod" />
29                                 <exclude name="**/*.usd" />
30                                 <exclude name="**/*.utd" />
31                                 <exclude name="**/*.uud" />
32                                 <exclude name="**/*.odd" />
33                                 <exclude name="**/*.ead" />
34                                 <exclude name="**/*.ecd" />
35                                 <exclude name="**/*.eld" />
36                                 <exclude name="**/*.epd" />
37                                 <exclude name="**/*.edd" />
38                                 <exclude name="**/*.eod" />
39                                 <exclude name="**/*.esd" />
40                                 <exclude name="**/*.etd" />
41                                 <exclude name="**/*.eud" />
42                                 <exclude name="**/*.urd" />
43                                 <exclude name="**/*.uml" />
44                                 <exclude name="**/*.ecore" />
45                                 <exclude name="**/*.ucls" />
46                                 <exclude name="**/*.useq" />
47                                 <exclude name="**/*.java" />
48                         </fileset>
49                 </copy>
50         </target>
51         <target name="clean">
52                 <delete dir="bin" />
53         </target>
54         <target depends="clean" name="cleanall">
55                 <ant antfile="build.xml" dir="${Splitter-ng.location}" inheritAll="false" target="clean" />
56         </target>
57         <target depends="build-subprojects,build-project" name="build" />
58         <target name="build-subprojects">
59                 <ant antfile="build.xml" dir="${Splitter-ng.location}" inheritAll="false" target="build-project" />
60         </target>
61         <target depends="init" name="build-project">
62                 <echo message="${ant.project.name}: ${ant.file}" />
63                 <javac debug="true" debuglevel="${debuglevel}" destdir="bin" includeantruntime="false" source="${source}" target="${target}">
64                         <src path="src" />
65                         <classpath refid="Splitter-ng-filesplitter.classpath" />
66                 </javac>
67         </target>
68         <target description="Build all projects which reference this project. Useful to propagate changes." name="build-refprojects" />
69         <target name="makejar" depends="build" description="Create a jar for the project">
70                 <jar jarfile="bin/${ant.project.name}.jar">
71                         <fileset dir="bin" includes="**/*.class" />
72                         <zipgroupfileset dir="lib" includes="*.jar" />
73                         <manifest>
74                                 <attribute name="Main-Class" value="Filesplitter" />
75                                 <attribute name="Class-Path" value="lib/Splitter-ng.jar"/>
76                         </manifest>
77                 </jar>
78         </target>
79         <target name="dist" depends="makejar" description="Create a distribution Directory wirth splitter-ng and all Plugins">
80                 <mkdir dir="../dist" />
81                 <copy file="bin/${ant.project.name}.jar" todir="../dist/" />
82                 <copy file="filesplitter-x" todir="../dist/" />
83                 <chmod file="../dist/filesplitter-x" perm="ugo+rx"/>
84                 <copy file="filesplitter" todir="../dist/" />
85                 <chmod file="../dist/filesplitter" perm="ugo+rx"/>
86         </target>
87 </project>