/[schmitzm]/trunk/build.xml
ViewVC logotype

Annotation of /trunk/build.xml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 705 - (hide annotations)
Sun Feb 14 22:03:37 2010 UTC (15 years ago) by mojays
File MIME type: text/xml
File size: 9898 byte(s)
Compile targets ("bin_XX") in build.xml
1 mojays 16 <!-- Build file for SCHMITZM. Target ZIPs/JARs are placed in "dist" folder.
2     NOTE: This script does not compile the java source (because of library
3 mojays 12 dependencies)!!
4    
5     Option "jar" -> a JAR from the existing binaries expected in folder
6     "classes" plus a ZIP of the JAR
7     Option "src" -> a ZIP of the source code in folder "src"
8     Option "javadoc" -> a JavaDoc in folder "javadoc" plus a ZIP of
9     this folder
10     Option "all" -> all of the upper mentioned options
11     Option "basic" -> only "jar" and "src"
12    
13 mojays 705 Option "bin_ms" -> compile the "src" folder to "classes" with Martin's classpath
14     Option "all_ms" -> "bin_ms", "jar", "src", "javadoc"
15    
16     Option "bin_sk" -> compile the "src" folder to "classes" with Stefan's classpath
17     Option "all_sk" -> "bin_sk", "jar", "src", "javadoc"
18    
19 mojays 12 The default option is "basic"
20 mojays 11 -->
21 alfonx 608 <project default="basic" basedir="." xmlns:ac="antlib:net.sf.antcontrib">
22     <taskdef uri="antlib:net.sf.antcontrib" classpath="ant-contrib-1.0b2.jar" />
23    
24 mojays 376 <!-- Project name -->
25     <property name="PROJECT.NAME" value="schmitzm"/>
26     <!-- Version number added as postfix to files -->
27 mojays 689 <property name="VERSION" value="-2.0.x"/>
28 mojays 16
29     <!-- Destination folder for ZIPs and JARs -->
30     <property name="DEST.DIR" value="dist"/>
31 mojays 12 <!-- Prefix for the destination file names
32     e.g. "schmitzm" >> "schmitzm.jar", "schmitzm-src.jar" -->
33 mojays 376 <property name="PROJECT.PREFIX" value="${PROJECT.NAME}${VERSION}"/>
34    
35 mojays 12 <!-- Global prefix directory for ZIP files (except ZIP of JAR!) -->
36     <property name="ZIP.ROOT.DIR" value="${PROJECT.PREFIX}"/>
37    
38     <!-- Source and Destination for source code ZIP -->
39     <property name="DIR.SRC" value="src"/>
40 mojays 16 <property name="FILE.SRC.ZIP" value="${DEST.DIR}/${PROJECT.PREFIX}-src.zip"/>
41 mojays 12
42     <!-- Source and Destination for JAR file -->
43     <property name="DIR.CLASSES" value="classes"/>
44 mojays 16 <property name="FILE.JAR" value="${DEST.DIR}/${PROJECT.PREFIX}.jar"/>
45 mojays 12 <property name="FILE.JAR.ZIP" value="${FILE.JAR}.zip"/>
46    
47     <!-- Destination for JavaDoc and its ZIP -->
48     <property name="DIR.JAVADOC" value="javadoc"/>
49 mojays 16 <property name="FILE.JAVADOC.ZIP" value="${DEST.DIR}/${PROJECT.PREFIX}-doc.zip"/>
50 mojays 12 <property name="LINK.JDK" value="http://java.sun.com/javase/6/docs/api/"/>
51     <property name="LINK.LOG4J" value="http://logging.apache.org/log4j/docs/api/"/>
52 mojays 14 <property name="JAVADOC.TITLE" value="Klassenbibliothek Martin Schmitz"/>
53 alfonx 9
54 mojays 705 <!-- Destination and classpath to create binaries with Martin's parameters (MS) -->
55     <property name="LIB.ROOT.MS" value="C:/Programme/Java"/>
56     <property name="GT.ROOT.MS" value="${LIB.ROOT.MS}/gt2-2.6.1"/>
57     <property name="COLT.ROOT.MS" value="${LIB.ROOT.MS}/Colt"/>
58     <property name="JFREE.ROOT.MS" value="${LIB.ROOT.MS}/jfreechart-1.0.13"/>
59     <property name="JINI.ROOT.MS" value="${LIB.ROOT.MS}/jini"/>
60     <property name="LOG4J.ROOT.MS" value="${LIB.ROOT.MS}/logging-log4j-1.2.14"/>
61     <property name="POI.ROOT.MS" value="${LIB.ROOT.MS}/POI"/>
62     <property name="JAI.ROOT.MS" value="${LIB.ROOT.MS}/jdk1.6.0_05/jre/lib/ext"/>
63    
64     <!-- Destination and classpath to create binaries with Martin's parameters (MS) -->
65     <property name="LIB.ROOT.SK" value="..."/>
66     <property name="GT.ROOT.SK" value="${LIB.ROOT.SK}/..."/>
67     <property name="COLT.ROOT.SK" value="${LIB.ROOT.SK}/..."/>
68     <property name="JFREE.ROOT.SK" value="${LIB.ROOT.SK}/..."/>
69     <property name="JINI.ROOT.SK" value="${LIB.ROOT.SK}/..."/>
70     <property name="LOG4J.ROOT.SK" value="${LIB.ROOT.SK}/..."/>
71     <property name="POI.ROOT.SK" value="${LIB.ROOT.SK}/..."/>
72     <property name="JAI.ROOT.SK" value="${LIB.ROOT.SK}/..."/>
73    
74 mojays 12 <target name="all">
75     <antcall target="jar"/>
76     <antcall target="src"/>
77     <antcall target="javadoc"/>
78     </target>
79    
80 mojays 705 <target name="all_ms">
81     <antcall target="bin_ms"/>
82     <antcall target="jar"/>
83     <antcall target="src"/>
84     <antcall target="javadoc"/>
85     </target>
86    
87     <target name="all_sk">
88     <antcall target="bin_sk"/>
89     <antcall target="jar"/>
90     <antcall target="src"/>
91     <antcall target="javadoc"/>
92     </target>
93    
94 mojays 12 <target name="basic">
95     <antcall target="jar"/>
96     <antcall target="src"/>
97     </target>
98    
99     <!-- ############## Create a JAR from "classes" and ZIP it ############## -->
100 mojays 686 <!-- <target name="jar" depends="nativeToAscii"-->
101     <target name="jar">
102 mojays 12 <!-- Create the JAR -->
103     <delete failonerror="false" file="${FILE.JAR}"/>
104     <jar destfile="${FILE.JAR}" index="false" level="8" duplicate="preserve">
105     <fileset dir="${DIR.CLASSES}">
106 alfonx 9 <exclude name="schmitzm/test**" />
107     <exclude name="**/*.html" />
108     <exclude name="**/*.xcf" />
109     <exclude name="**/Thumbs.db" />
110     </fileset>
111     <manifest>
112     <attribute name="Created-By" value="Martin O.J. Schmitz, Stefan A. Krüger" />
113     </manifest>
114     </jar>
115 mojays 12 <!-- Create a ZIP of the JAR -->
116     <delete failonerror="false" file="${FILE.JAR.ZIP}"/>
117     <zip basedir="." destfile="${FILE.JAR.ZIP}">
118     <filename name="${FILE.JAR}"/>
119     </zip>
120     </target>
121    
122     <!-- ############## Create a ZIP from "src" folder ############## -->
123     <target name="src">
124     <!-- Create a ZIP from "src" folder -->
125     <delete failonerror="false" file="${FILE.SRC.ZIP}"/>
126     <zip destfile="${FILE.SRC.ZIP}" update="false">
127     <zipfileset dir="${DIR.SRC}" prefix="${ZIP.ROOT.DIR}/${DIR.SRC}">
128 mojays 14 <exclude name="schmitzm/test**" />
129 mojays 12 <exclude name="**/Thumbs.db" />
130     <exclude name="**/.svn" />
131     </zipfileset>
132     </zip>
133     <!-- Add build.xml to ZIP -->
134     <zip destfile="${FILE.SRC.ZIP}" update="true">
135     <zipfileset file="build.xml" prefix="${ZIP.ROOT.DIR}"/>
136     </zip>
137     </target>
138 alfonx 10
139 mojays 12 <!-- ############## Create a JavaDoc to "javadoc" and ZIP it ############## -->
140     <target name="javadoc">
141     <!-- Create a JavaDoc to "javadoc" folder -->
142     <delete failonerror="false" dir="${DIR.JAVADOC}"/>
143     <javadoc sourcepath ="${DIR.SRC}"
144     destdir ="${DIR.JAVADOC}"
145     author ="true"
146     version ="true"
147     overview ="${DIR.SRC}/overview.html"
148 mojays 14 windowtitle="${JAVADOC.TITLE}"
149 mojays 12 >
150     <excludepackage name="schmitzm.test"/>
151     <link href="${LINK.JDK}"/>
152     <link href="${LINK.LOG4J}"/>
153     </javadoc>
154     <!-- Create a ZIP from "javadoc" folder -->
155     <delete failonerror="false" file="${FILE.JAVADOC.ZIP}"/>
156     <zip destfile="${FILE.JAVADOC.ZIP}" update="false">
157     <zipfileset dir="${DIR.JAVADOC}" prefix="${ZIP.ROOT.DIR}/${DIR.JAVADOC}">
158     <exclude name="**/Thumbs.db" />
159     <exclude name="**/.svn" />
160     </zipfileset>
161 alfonx 10 </zip>
162 alfonx 9 </target>
163 alfonx 608
164 mojays 705 <!-- ############## Create binaries with Martin's parameters ############## -->
165     <target name="bin_ms">
166     <property name="GT.ROOT" value="${GT.ROOT.MS}"/>
167     <property name="COLT.ROOT" value="${COLT.ROOT.MS}"/>
168     <property name="JFREE.ROOT" value="${JFREE.ROOT.MS}"/>
169     <property name="JINI.ROOT" value="${JINI.ROOT.MS}"/>
170     <property name="LOG4J.ROOT" value="${LOG4J.ROOT.MS}"/>
171     <property name="POI.ROOT" value="${POI.ROOT.MS}"/>
172     <property name="JAI.ROOT" value="${JAI.ROOT.MS}"/>
173     <antcall target="javac"/>
174     </target>
175    
176     <!-- ############## Create binaries with Stefan's parameters ############## -->
177     <target name="bin_sk">
178     <property name="GT.ROOT" value="${GT.ROOT.SK}"/>
179     <property name="COLT.ROOT" value="${COLT.ROOT.SK}"/>
180     <property name="JFREE.ROOT" value="${JFREE.ROOT.SK}"/>
181     <property name="JINI.ROOT" value="${JINI.ROOT.SK}"/>
182     <property name="LOG4J.ROOT" value="${LOG4J.ROOT.SK}"/>
183     <property name="POI.ROOT" value="${POI.ROOT.SK}"/>
184     <property name="JAI.ROOT" value="${JAI.ROOT.SK}"/>
185     <antcall target="javac"/>
186     </target>
187    
188     <!-- ############## Create binaries ############## -->
189     <target name="javac">
190     <!--delete failonerror="false" dir="${DIR.BIN}"/-->
191     <mkdir dir="${DIR.CLASSES}"/>
192     <!-- Compile source to binaries folder -->
193     <javac srcdir ="${DIR.SRC}"
194     destdir ="${DIR.CLASSES}"
195     >
196     <classpath>
197     <fileset dir="lib/gt-unsupported">
198     <include name="*.jar"/>
199     </fileset>
200     <fileset dir="${COLT.ROOT}">
201     <include name="*.jar"/>
202     </fileset>
203     <fileset dir="${JFREE.ROOT}">
204     <include name="*.jar"/>
205     </fileset>
206     <fileset dir="${JINI.ROOT}">
207     <include name="lib/*.jar"/>
208     <include name="lib-dl/*.jar"/>
209     <include name="lib-ext/*.jar"/>
210     </fileset>
211     <fileset dir="${LOG4J.ROOT}">
212     <include name="*.jar"/>
213     </fileset>
214     <fileset dir="${POI.ROOT}">
215     <include name="*.jar"/>
216     </fileset>
217     <fileset dir="${GT.ROOT}">
218     <include name="*.jar"/>
219     </fileset>
220     <fileset dir="${JAI.ROOT}">
221     <include name="*.jar"/>
222     </fileset>
223     </classpath>
224     </javac>
225     <!-- copy other necessary files to destination folder -->
226     <copy todir="${DIR.CLASSES}">
227     <fileset dir="${DIR.SRC}">
228     <include name="**/COPYING*"/> <!-- Licence -->
229     <include name="**/*.LIST"/> <!-- META-INF -->
230     <include name="**/resource/**"/> <!-- resource files -->
231     <exclude name="**/Thumbs.db" />
232     <exclude name="**/.svn/"/>
233     </fileset>
234     </copy>
235     </target>
236    
237 alfonx 608 <target name="nativeToAscii" description="Wandelt alle .properties dateien in src/ in ascii UTF8 um.">
238     <ac:for xmlns:ac="antlib:net.sf.antcontrib" param="file">
239     <path>
240     <fileset dir="${DIR.SRC}" includes="**/*.properties" />
241     </path>
242     <sequential>
243     <move file="@{file}" overwrite="true" tofile="@{file}Native" verbose="false"/>
244     </sequential>
245     </ac:for>
246     <native2ascii encoding="ISO8859_15" src="${DIR.SRC}" includes="**/*.propertiesNative" dest="${DIR.SRC}" ext=".properties" />
247    
248     <ac:for xmlns:ac="antlib:net.sf.antcontrib" param="file">
249     <path>
250     <fileset dir="${DIR.SRC}" includes="**/*.propertiesNative" />
251     </path>
252     <sequential>
253     <delete file="@{file}" quiet="true"/>
254     </sequential>
255     </ac:for>
256     </target>
257    
258 alfonx 9 </project>

Properties

Name Value
svn:eol-style native
svn:keywords Id
svn:mime-type text/xml

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26