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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 608 - (hide annotations)
Wed Dec 9 17:04:19 2009 UTC (15 years, 2 months ago) by alfonx
Original Path: branches/2.0-RC1/build.xml
File MIME type: text/xml
File size: 5473 byte(s)
build.xml erweitert, dass die proṕerties datein automatisch immer in utf8 inline umgewandelt werden wenn ein JAR gebaut wird
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     The default option is "basic"
14 mojays 11 -->
15 alfonx 608 <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 mojays 376 <!-- Project name -->
19     <property name="PROJECT.NAME" value="schmitzm"/>
20     <!-- Version number added as postfix to files -->
21 alfonx 605 <property name="VERSION" value="-2.0-RC1"/>
22 mojays 16
23     <!-- Destination folder for ZIPs and JARs -->
24     <property name="DEST.DIR" value="dist"/>
25 mojays 12 <!-- Prefix for the destination file names
26     e.g. "schmitzm" >> "schmitzm.jar", "schmitzm-src.jar" -->
27 mojays 376 <property name="PROJECT.PREFIX" value="${PROJECT.NAME}${VERSION}"/>
28    
29 mojays 12 <!-- 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 mojays 16 <property name="FILE.SRC.ZIP" value="${DEST.DIR}/${PROJECT.PREFIX}-src.zip"/>
35 mojays 12
36     <!-- Source and Destination for JAR file -->
37     <property name="DIR.CLASSES" value="classes"/>
38 mojays 16 <property name="FILE.JAR" value="${DEST.DIR}/${PROJECT.PREFIX}.jar"/>
39 mojays 12 <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 mojays 16 <property name="FILE.JAVADOC.ZIP" value="${DEST.DIR}/${PROJECT.PREFIX}-doc.zip"/>
44 mojays 12 <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 mojays 14 <property name="JAVADOC.TITLE" value="Klassenbibliothek Martin Schmitz"/>
47 alfonx 9
48 mojays 12 <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 alfonx 608 <target name="jar" depends="nativeToAscii">
61 mojays 12 <!-- Create the JAR -->
62     <delete failonerror="false" file="${FILE.JAR}"/>
63     <jar destfile="${FILE.JAR}" index="false" level="8" duplicate="preserve">
64     <fileset dir="${DIR.CLASSES}">
65 alfonx 9 <exclude name="schmitzm/test**" />
66     <exclude name="**/*.html" />
67     <exclude name="**/*.xcf" />
68     <exclude name="**/Thumbs.db" />
69     </fileset>
70     <manifest>
71     <attribute name="Created-By" value="Martin O.J. Schmitz, Stefan A. Krüger" />
72     </manifest>
73     </jar>
74 mojays 12 <!-- Create a ZIP of the JAR -->
75     <delete failonerror="false" file="${FILE.JAR.ZIP}"/>
76     <zip basedir="." destfile="${FILE.JAR.ZIP}">
77     <filename name="${FILE.JAR}"/>
78     </zip>
79     </target>
80    
81     <!-- ############## Create a ZIP from "src" folder ############## -->
82     <target name="src">
83     <!-- Create a ZIP from "src" folder -->
84     <delete failonerror="false" file="${FILE.SRC.ZIP}"/>
85     <zip destfile="${FILE.SRC.ZIP}" update="false">
86     <zipfileset dir="${DIR.SRC}" prefix="${ZIP.ROOT.DIR}/${DIR.SRC}">
87 mojays 14 <exclude name="schmitzm/test**" />
88 mojays 12 <exclude name="**/Thumbs.db" />
89     <exclude name="**/.svn" />
90     </zipfileset>
91     </zip>
92     <!-- Add build.xml to ZIP -->
93     <zip destfile="${FILE.SRC.ZIP}" update="true">
94     <zipfileset file="build.xml" prefix="${ZIP.ROOT.DIR}"/>
95     </zip>
96     </target>
97 alfonx 10
98 mojays 12 <!-- ############## Create a JavaDoc to "javadoc" and ZIP it ############## -->
99     <target name="javadoc">
100     <!-- Create a JavaDoc to "javadoc" folder -->
101     <delete failonerror="false" dir="${DIR.JAVADOC}"/>
102     <javadoc sourcepath ="${DIR.SRC}"
103     destdir ="${DIR.JAVADOC}"
104     author ="true"
105     version ="true"
106     overview ="${DIR.SRC}/overview.html"
107 mojays 14 windowtitle="${JAVADOC.TITLE}"
108 mojays 12 >
109     <excludepackage name="schmitzm.test"/>
110     <link href="${LINK.JDK}"/>
111     <link href="${LINK.LOG4J}"/>
112     </javadoc>
113     <!-- Create a ZIP from "javadoc" folder -->
114     <delete failonerror="false" file="${FILE.JAVADOC.ZIP}"/>
115     <zip destfile="${FILE.JAVADOC.ZIP}" update="false">
116     <zipfileset dir="${DIR.JAVADOC}" prefix="${ZIP.ROOT.DIR}/${DIR.JAVADOC}">
117     <exclude name="**/Thumbs.db" />
118     <exclude name="**/.svn" />
119     </zipfileset>
120 alfonx 10 </zip>
121 alfonx 9 </target>
122 alfonx 608
123     <target name="nativeToAscii" description="Wandelt alle .properties dateien in src/ in ascii UTF8 um.">
124     <ac:for xmlns:ac="antlib:net.sf.antcontrib" param="file">
125     <path>
126     <fileset dir="${DIR.SRC}" includes="**/*.properties" />
127     </path>
128     <sequential>
129     <move file="@{file}" overwrite="true" tofile="@{file}Native" verbose="false"/>
130     </sequential>
131     </ac:for>
132     <native2ascii encoding="ISO8859_15" src="${DIR.SRC}" includes="**/*.propertiesNative" dest="${DIR.SRC}" ext=".properties" />
133    
134     <ac:for xmlns:ac="antlib:net.sf.antcontrib" param="file">
135     <path>
136     <fileset dir="${DIR.SRC}" includes="**/*.propertiesNative" />
137     </path>
138     <sequential>
139     <delete file="@{file}" quiet="true"/>
140     </sequential>
141     </ac:for>
142     </target>
143    
144 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