/[schmitzm]/branches/2.1/build.xml
ViewVC logotype

Annotation of /branches/2.1/build.xml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 689 - (hide annotations)
Wed Feb 10 15:35:01 2010 UTC (15 years ago) by mojays
Original Path: trunk/build.xml
File MIME type: text/xml
File size: 5498 byte(s)
distribution of v2.0.x added
readme.txt, release.txt and .classpath updated to version 2.0.x
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 mojays 689 <property name="VERSION" value="-2.0.x"/>
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 mojays 686 <!-- <target name="jar" depends="nativeToAscii"-->
61     <target name="jar">
62 mojays 12 <!-- Create the JAR -->
63     <delete failonerror="false" file="${FILE.JAR}"/>
64     <jar destfile="${FILE.JAR}" index="false" level="8" duplicate="preserve">
65     <fileset dir="${DIR.CLASSES}">
66 alfonx 9 <exclude name="schmitzm/test**" />
67     <exclude name="**/*.html" />
68     <exclude name="**/*.xcf" />
69     <exclude name="**/Thumbs.db" />
70     </fileset>
71     <manifest>
72     <attribute name="Created-By" value="Martin O.J. Schmitz, Stefan A. Krüger" />
73     </manifest>
74     </jar>
75 mojays 12 <!-- Create a ZIP of the JAR -->
76     <delete failonerror="false" file="${FILE.JAR.ZIP}"/>
77     <zip basedir="." destfile="${FILE.JAR.ZIP}">
78     <filename name="${FILE.JAR}"/>
79     </zip>
80     </target>
81    
82     <!-- ############## Create a ZIP from "src" folder ############## -->
83     <target name="src">
84     <!-- Create a ZIP from "src" folder -->
85     <delete failonerror="false" file="${FILE.SRC.ZIP}"/>
86     <zip destfile="${FILE.SRC.ZIP}" update="false">
87     <zipfileset dir="${DIR.SRC}" prefix="${ZIP.ROOT.DIR}/${DIR.SRC}">
88 mojays 14 <exclude name="schmitzm/test**" />
89 mojays 12 <exclude name="**/Thumbs.db" />
90     <exclude name="**/.svn" />
91     </zipfileset>
92     </zip>
93     <!-- Add build.xml to ZIP -->
94     <zip destfile="${FILE.SRC.ZIP}" update="true">
95     <zipfileset file="build.xml" prefix="${ZIP.ROOT.DIR}"/>
96     </zip>
97     </target>
98 alfonx 10
99 mojays 12 <!-- ############## Create a JavaDoc to "javadoc" and ZIP it ############## -->
100     <target name="javadoc">
101     <!-- Create a JavaDoc to "javadoc" folder -->
102     <delete failonerror="false" dir="${DIR.JAVADOC}"/>
103     <javadoc sourcepath ="${DIR.SRC}"
104     destdir ="${DIR.JAVADOC}"
105     author ="true"
106     version ="true"
107     overview ="${DIR.SRC}/overview.html"
108 mojays 14 windowtitle="${JAVADOC.TITLE}"
109 mojays 12 >
110     <excludepackage name="schmitzm.test"/>
111     <link href="${LINK.JDK}"/>
112     <link href="${LINK.LOG4J}"/>
113     </javadoc>
114     <!-- Create a ZIP from "javadoc" folder -->
115     <delete failonerror="false" file="${FILE.JAVADOC.ZIP}"/>
116     <zip destfile="${FILE.JAVADOC.ZIP}" update="false">
117     <zipfileset dir="${DIR.JAVADOC}" prefix="${ZIP.ROOT.DIR}/${DIR.JAVADOC}">
118     <exclude name="**/Thumbs.db" />
119     <exclude name="**/.svn" />
120     </zipfileset>
121 alfonx 10 </zip>
122 alfonx 9 </target>
123 alfonx 608
124     <target name="nativeToAscii" description="Wandelt alle .properties dateien in src/ in ascii UTF8 um.">
125     <ac:for xmlns:ac="antlib:net.sf.antcontrib" param="file">
126     <path>
127     <fileset dir="${DIR.SRC}" includes="**/*.properties" />
128     </path>
129     <sequential>
130     <move file="@{file}" overwrite="true" tofile="@{file}Native" verbose="false"/>
131     </sequential>
132     </ac:for>
133     <native2ascii encoding="ISO8859_15" src="${DIR.SRC}" includes="**/*.propertiesNative" dest="${DIR.SRC}" ext=".properties" />
134    
135     <ac:for xmlns:ac="antlib:net.sf.antcontrib" param="file">
136     <path>
137     <fileset dir="${DIR.SRC}" includes="**/*.propertiesNative" />
138     </path>
139     <sequential>
140     <delete file="@{file}" quiet="true"/>
141     </sequential>
142     </ac:for>
143     </target>
144    
145 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