/[schmitzm]/branches/2.3.x/build.xml
ViewVC logotype

Annotation of /branches/2.3.x/build.xml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1240 - (hide annotations)
Fri Nov 5 13:02:30 2010 UTC (14 years, 3 months ago) by alfonx
File MIME type: text/xml
File size: 9896 byte(s)
Branch 2.3.x angelegt

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 mojays 941 "targes/classes" plus a ZIP of the JAR
7 mojays 12 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 alfonx 901 <property name="VERSION" value="-2.3-SNAPSHOT"/>
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 mojays 941 <property name="DIR.CLASSES" value="target/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 alfonx 707 <target name="jar" depends="nativeToAscii">
101     <!-- <target name="jar"> -->
102 mojays 12 <delete failonerror="false" file="${FILE.JAR}"/>
103     <jar destfile="${FILE.JAR}" index="false" level="8" duplicate="preserve">
104     <fileset dir="${DIR.CLASSES}">
105 alfonx 9 <exclude name="schmitzm/test**" />
106     <exclude name="**/*.html" />
107     <exclude name="**/*.xcf" />
108     <exclude name="**/Thumbs.db" />
109     </fileset>
110     <manifest>
111     <attribute name="Created-By" value="Martin O.J. Schmitz, Stefan A. Krüger" />
112     </manifest>
113     </jar>
114 mojays 12 <!-- Create a ZIP of the JAR -->
115     <delete failonerror="false" file="${FILE.JAR.ZIP}"/>
116     <zip basedir="." destfile="${FILE.JAR.ZIP}">
117     <filename name="${FILE.JAR}"/>
118     </zip>
119     </target>
120    
121     <!-- ############## Create a ZIP from "src" folder ############## -->
122     <target name="src">
123     <!-- Create a ZIP from "src" folder -->
124     <delete failonerror="false" file="${FILE.SRC.ZIP}"/>
125     <zip destfile="${FILE.SRC.ZIP}" update="false">
126     <zipfileset dir="${DIR.SRC}" prefix="${ZIP.ROOT.DIR}/${DIR.SRC}">
127 mojays 14 <exclude name="schmitzm/test**" />
128 mojays 12 <exclude name="**/Thumbs.db" />
129     <exclude name="**/.svn" />
130     </zipfileset>
131     </zip>
132     <!-- Add build.xml to ZIP -->
133     <zip destfile="${FILE.SRC.ZIP}" update="true">
134     <zipfileset file="build.xml" prefix="${ZIP.ROOT.DIR}"/>
135     </zip>
136     </target>
137 alfonx 10
138 mojays 12 <!-- ############## Create a JavaDoc to "javadoc" and ZIP it ############## -->
139     <target name="javadoc">
140     <!-- Create a JavaDoc to "javadoc" folder -->
141     <delete failonerror="false" dir="${DIR.JAVADOC}"/>
142     <javadoc sourcepath ="${DIR.SRC}"
143     destdir ="${DIR.JAVADOC}"
144     author ="true"
145     version ="true"
146     overview ="${DIR.SRC}/overview.html"
147 mojays 14 windowtitle="${JAVADOC.TITLE}"
148 mojays 12 >
149     <excludepackage name="schmitzm.test"/>
150     <link href="${LINK.JDK}"/>
151     <link href="${LINK.LOG4J}"/>
152     </javadoc>
153     <!-- Create a ZIP from "javadoc" folder -->
154     <delete failonerror="false" file="${FILE.JAVADOC.ZIP}"/>
155     <zip destfile="${FILE.JAVADOC.ZIP}" update="false">
156     <zipfileset dir="${DIR.JAVADOC}" prefix="${ZIP.ROOT.DIR}/${DIR.JAVADOC}">
157     <exclude name="**/Thumbs.db" />
158     <exclude name="**/.svn" />
159     </zipfileset>
160 alfonx 10 </zip>
161 alfonx 9 </target>
162 alfonx 608
163 mojays 705 <!-- ############## Create binaries with Martin's parameters ############## -->
164     <target name="bin_ms">
165     <property name="GT.ROOT" value="${GT.ROOT.MS}"/>
166     <property name="COLT.ROOT" value="${COLT.ROOT.MS}"/>
167     <property name="JFREE.ROOT" value="${JFREE.ROOT.MS}"/>
168     <property name="JINI.ROOT" value="${JINI.ROOT.MS}"/>
169     <property name="LOG4J.ROOT" value="${LOG4J.ROOT.MS}"/>
170     <property name="POI.ROOT" value="${POI.ROOT.MS}"/>
171     <property name="JAI.ROOT" value="${JAI.ROOT.MS}"/>
172     <antcall target="javac"/>
173     </target>
174    
175     <!-- ############## Create binaries with Stefan's parameters ############## -->
176     <target name="bin_sk">
177     <property name="GT.ROOT" value="${GT.ROOT.SK}"/>
178     <property name="COLT.ROOT" value="${COLT.ROOT.SK}"/>
179     <property name="JFREE.ROOT" value="${JFREE.ROOT.SK}"/>
180     <property name="JINI.ROOT" value="${JINI.ROOT.SK}"/>
181     <property name="LOG4J.ROOT" value="${LOG4J.ROOT.SK}"/>
182     <property name="POI.ROOT" value="${POI.ROOT.SK}"/>
183     <property name="JAI.ROOT" value="${JAI.ROOT.SK}"/>
184     <antcall target="javac"/>
185     </target>
186    
187     <!-- ############## Create binaries ############## -->
188     <target name="javac">
189     <!--delete failonerror="false" dir="${DIR.BIN}"/-->
190     <mkdir dir="${DIR.CLASSES}"/>
191     <!-- Compile source to binaries folder -->
192     <javac srcdir ="${DIR.SRC}"
193     destdir ="${DIR.CLASSES}"
194     >
195     <classpath>
196     <fileset dir="lib/gt-unsupported">
197     <include name="*.jar"/>
198     </fileset>
199     <fileset dir="${COLT.ROOT}">
200     <include name="*.jar"/>
201     </fileset>
202     <fileset dir="${JFREE.ROOT}">
203     <include name="*.jar"/>
204     </fileset>
205     <fileset dir="${JINI.ROOT}">
206     <include name="lib/*.jar"/>
207     <include name="lib-dl/*.jar"/>
208     <include name="lib-ext/*.jar"/>
209     </fileset>
210     <fileset dir="${LOG4J.ROOT}">
211     <include name="*.jar"/>
212     </fileset>
213     <fileset dir="${POI.ROOT}">
214     <include name="*.jar"/>
215     </fileset>
216     <fileset dir="${GT.ROOT}">
217     <include name="*.jar"/>
218     </fileset>
219     <fileset dir="${JAI.ROOT}">
220     <include name="*.jar"/>
221     </fileset>
222     </classpath>
223     </javac>
224     <!-- copy other necessary files to destination folder -->
225     <copy todir="${DIR.CLASSES}">
226     <fileset dir="${DIR.SRC}">
227     <include name="**/COPYING*"/> <!-- Licence -->
228     <include name="**/*.LIST"/> <!-- META-INF -->
229     <include name="**/resource/**"/> <!-- resource files -->
230     <exclude name="**/Thumbs.db" />
231     <exclude name="**/.svn/"/>
232     </fileset>
233     </copy>
234     </target>
235    
236 alfonx 608 <target name="nativeToAscii" description="Wandelt alle .properties dateien in src/ in ascii UTF8 um.">
237     <ac:for xmlns:ac="antlib:net.sf.antcontrib" param="file">
238     <path>
239     <fileset dir="${DIR.SRC}" includes="**/*.properties" />
240     </path>
241     <sequential>
242     <move file="@{file}" overwrite="true" tofile="@{file}Native" verbose="false"/>
243     </sequential>
244     </ac:for>
245     <native2ascii encoding="ISO8859_15" src="${DIR.SRC}" includes="**/*.propertiesNative" dest="${DIR.SRC}" ext=".properties" />
246    
247     <ac:for xmlns:ac="antlib:net.sf.antcontrib" param="file">
248     <path>
249     <fileset dir="${DIR.SRC}" includes="**/*.propertiesNative" />
250     </path>
251     <sequential>
252     <delete file="@{file}" quiet="true"/>
253     </sequential>
254     </ac:for>
255     </target>
256    
257 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