/[schmitzm]/branches/2.0-RC2/build.xml
ViewVC logotype

Contents of /branches/2.0-RC2/build.xml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 696 - (show annotations)
Sat Feb 13 11:54:14 2010 UTC (15 years ago) by mojays
File MIME type: text/xml
File size: 5503 byte(s)
schmitzm-2.0-RC2-src.zip updated
1 <!-- 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 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 The default option is "basic"
14 -->
15 <project default="basic" basedir="." xmlns:ac="antlib:net.sf.antcontrib">
16 <taskdef uri="antlib:net.sf.antcontrib" classpath="ant-contrib-1.0b2.jar" />
17
18 <!-- Project name -->
19 <property name="PROJECT.NAME" value="schmitzm"/>
20 <!-- Version number added as postfix to files -->
21 <property name="VERSION" value="-2.0-RC2"/>
22
23 <!-- Destination folder for ZIPs and JARs -->
24 <property name="DEST.DIR" value="dist"/>
25 <!-- Prefix for the destination file names
26 e.g. "schmitzm" >> "schmitzm.jar", "schmitzm-src.jar" -->
27 <property name="PROJECT.PREFIX" value="${PROJECT.NAME}${VERSION}"/>
28
29 <!-- Global prefix directory for ZIP files (except ZIP of JAR!) -->
30 <property name="ZIP.ROOT.DIR" value="${PROJECT.PREFIX}"/>
31
32 <!-- Source and Destination for source code ZIP -->
33 <property name="DIR.SRC" value="src"/>
34 <property name="FILE.SRC.ZIP" value="${DEST.DIR}/${PROJECT.PREFIX}-src.zip"/>
35
36 <!-- Source and Destination for JAR file -->
37 <property name="DIR.CLASSES" value="classes"/>
38 <property name="FILE.JAR" value="${DEST.DIR}/${PROJECT.PREFIX}.jar"/>
39 <property name="FILE.JAR.ZIP" value="${FILE.JAR}.zip"/>
40
41 <!-- Destination for JavaDoc and its ZIP -->
42 <property name="DIR.JAVADOC" value="javadoc"/>
43 <property name="FILE.JAVADOC.ZIP" value="${DEST.DIR}/${PROJECT.PREFIX}-doc.zip"/>
44 <property name="LINK.JDK" value="http://java.sun.com/javase/6/docs/api/"/>
45 <property name="LINK.LOG4J" value="http://logging.apache.org/log4j/docs/api/"/>
46 <property name="JAVADOC.TITLE" value="Klassenbibliothek Martin Schmitz"/>
47
48 <target name="all">
49 <antcall target="jar"/>
50 <antcall target="src"/>
51 <antcall target="javadoc"/>
52 </target>
53
54 <target name="basic">
55 <antcall target="jar"/>
56 <antcall target="src"/>
57 </target>
58
59 <!-- ############## Create a JAR from "classes" and ZIP it ############## -->
60 <!--
61 <target name="jar">
62 -->
63 <target name="jar" depends="nativeToAscii">
64 <!-- Create the JAR -->
65 <delete failonerror="false" file="${FILE.JAR}"/>
66 <jar destfile="${FILE.JAR}" index="false" level="8" duplicate="preserve">
67 <fileset dir="${DIR.CLASSES}">
68 <exclude name="schmitzm/test**" />
69 <exclude name="**/*.html" />
70 <exclude name="**/*.xcf" />
71 <exclude name="**/Thumbs.db" />
72 </fileset>
73 <manifest>
74 <attribute name="Created-By" value="Martin O.J. Schmitz, Stefan A. Krüger" />
75 </manifest>
76 </jar>
77 <!-- Create a ZIP of the JAR -->
78 <delete failonerror="false" file="${FILE.JAR.ZIP}"/>
79 <zip basedir="." destfile="${FILE.JAR.ZIP}">
80 <filename name="${FILE.JAR}"/>
81 </zip>
82 </target>
83
84 <!-- ############## Create a ZIP from "src" folder ############## -->
85 <target name="src">
86 <!-- Create a ZIP from "src" folder -->
87 <delete failonerror="false" file="${FILE.SRC.ZIP}"/>
88 <zip destfile="${FILE.SRC.ZIP}" update="false">
89 <zipfileset dir="${DIR.SRC}" prefix="${ZIP.ROOT.DIR}/${DIR.SRC}">
90 <exclude name="schmitzm/test**" />
91 <exclude name="**/Thumbs.db" />
92 <exclude name="**/.svn" />
93 </zipfileset>
94 </zip>
95 <!-- Add build.xml to ZIP -->
96 <zip destfile="${FILE.SRC.ZIP}" update="true">
97 <zipfileset file="build.xml" prefix="${ZIP.ROOT.DIR}"/>
98 </zip>
99 </target>
100
101 <!-- ############## Create a JavaDoc to "javadoc" and ZIP it ############## -->
102 <target name="javadoc">
103 <!-- Create a JavaDoc to "javadoc" folder -->
104 <delete failonerror="false" dir="${DIR.JAVADOC}"/>
105 <javadoc sourcepath ="${DIR.SRC}"
106 destdir ="${DIR.JAVADOC}"
107 author ="true"
108 version ="true"
109 overview ="${DIR.SRC}/overview.html"
110 windowtitle="${JAVADOC.TITLE}"
111 >
112 <excludepackage name="schmitzm.test"/>
113 <link href="${LINK.JDK}"/>
114 <link href="${LINK.LOG4J}"/>
115 </javadoc>
116 <!-- Create a ZIP from "javadoc" folder -->
117 <delete failonerror="false" file="${FILE.JAVADOC.ZIP}"/>
118 <zip destfile="${FILE.JAVADOC.ZIP}" update="false">
119 <zipfileset dir="${DIR.JAVADOC}" prefix="${ZIP.ROOT.DIR}/${DIR.JAVADOC}">
120 <exclude name="**/Thumbs.db" />
121 <exclude name="**/.svn" />
122 </zipfileset>
123 </zip>
124 </target>
125
126 <target name="nativeToAscii" description="Wandelt alle .properties dateien in src/ in ascii UTF8 um.">
127 <ac:for xmlns:ac="antlib:net.sf.antcontrib" param="file">
128 <path>
129 <fileset dir="${DIR.SRC}" includes="**/*.properties" />
130 </path>
131 <sequential>
132 <move file="@{file}" overwrite="true" tofile="@{file}Native" verbose="false"/>
133 </sequential>
134 </ac:for>
135 <native2ascii encoding="ISO8859_15" src="${DIR.SRC}" includes="**/*.propertiesNative" dest="${DIR.SRC}" ext=".properties" />
136
137 <ac:for xmlns:ac="antlib:net.sf.antcontrib" param="file">
138 <path>
139 <fileset dir="${DIR.SRC}" includes="**/*.propertiesNative" />
140 </path>
141 <sequential>
142 <delete file="@{file}" quiet="true"/>
143 </sequential>
144 </ac:for>
145 </target>
146
147 </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