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

Diff of /branches/2.4.x/build.xml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 12 by mojays, Wed Feb 25 17:32:38 2009 UTC revision 686 by mojays, Wed Feb 10 15:24:20 2010 UTC
# Line 1  Line 1 
1  <!-- Build file for SCHMITZM.  <!-- 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       NOTE: This script does not compile the java source (because of library
3             dependencies)!!             dependencies)!!
4    
5       Option "jar"     -> a JAR from the existing binaries expected in folder       Option "jar"     -> a JAR from the existing binaries expected in folder
# Line 12  Line 12 
12            
13       The default option is "basic"       The default option is "basic"
14  -->  -->
15  <project default="basic" basedir=".">  <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"/>
22    
23            <!-- Destination folder for ZIPs and JARs -->
24            <property name="DEST.DIR"         value="dist"/>
25          <!-- Prefix for the destination file names          <!-- Prefix for the destination file names
26               e.g. "schmitzm" >> "schmitzm.jar", "schmitzm-src.jar" -->               e.g. "schmitzm" >> "schmitzm.jar", "schmitzm-src.jar" -->
27          <property name="PROJECT.PREFIX"   value="schmitzm"/>          <property name="PROJECT.PREFIX"   value="${PROJECT.NAME}${VERSION}"/>
28    
29          <!-- Global prefix directory for ZIP files (except ZIP of JAR!) -->          <!-- Global prefix directory for ZIP files (except ZIP of JAR!) -->
30          <property name="ZIP.ROOT.DIR"     value="${PROJECT.PREFIX}"/>          <property name="ZIP.ROOT.DIR"     value="${PROJECT.PREFIX}"/>
31                    
32          <!-- Source and Destination for source code ZIP -->          <!-- Source and Destination for source code ZIP -->
33          <property name="DIR.SRC"          value="src"/>          <property name="DIR.SRC"          value="src"/>
34          <property name="FILE.SRC.ZIP"     value="${PROJECT.PREFIX}-src.zip"/>          <property name="FILE.SRC.ZIP"     value="${DEST.DIR}/${PROJECT.PREFIX}-src.zip"/>
35                    
36          <!-- Source and Destination for JAR file -->          <!-- Source and Destination for JAR file -->
37          <property name="DIR.CLASSES"      value="classes"/>          <property name="DIR.CLASSES"      value="classes"/>
38      <property name="FILE.JAR"         value="${PROJECT.PREFIX}.jar"/>      <property name="FILE.JAR"         value="${DEST.DIR}/${PROJECT.PREFIX}.jar"/>
39          <property name="FILE.JAR.ZIP"     value="${FILE.JAR}.zip"/>          <property name="FILE.JAR.ZIP"     value="${FILE.JAR}.zip"/>
40                    
41          <!-- Destination for JavaDoc and its ZIP -->          <!-- Destination for JavaDoc and its ZIP -->
42          <property name="DIR.JAVADOC"      value="javadoc"/>          <property name="DIR.JAVADOC"      value="javadoc"/>
43          <property name="FILE.JAVADOC.ZIP" value="${PROJECT.PREFIX}-doc.zip"/>          <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/"/>          <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/"/>          <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">          <target name="all">
49                  <antcall target="jar"/>                  <antcall target="jar"/>
# Line 46  Line 57 
57          </target>          </target>
58    
59          <!-- ##############  Create a JAR from "classes" and ZIP it ############## -->          <!-- ##############  Create a JAR from "classes" and ZIP it ############## -->
60    <!--    <target name="jar" depends="nativeToAscii"-->
61          <target name="jar">          <target name="jar">
62                  <!-- Create the JAR -->                  <!-- Create the JAR -->
63                  <delete failonerror="false" file="${FILE.JAR}"/>                  <delete failonerror="false" file="${FILE.JAR}"/>
# Line 73  Line 85 
85                  <delete failonerror="false" file="${FILE.SRC.ZIP}"/>                  <delete failonerror="false" file="${FILE.SRC.ZIP}"/>
86                  <zip destfile="${FILE.SRC.ZIP}" update="false">                  <zip destfile="${FILE.SRC.ZIP}" update="false">
87                          <zipfileset dir="${DIR.SRC}" prefix="${ZIP.ROOT.DIR}/${DIR.SRC}">                          <zipfileset dir="${DIR.SRC}" prefix="${ZIP.ROOT.DIR}/${DIR.SRC}">
88                                    <exclude name="schmitzm/test**" />
89                                  <exclude name="**/Thumbs.db" />                                  <exclude name="**/Thumbs.db" />
90                                  <exclude name="**/.svn" />                                  <exclude name="**/.svn" />
91                          </zipfileset>                          </zipfileset>
# Line 92  Line 105 
105                               author     ="true"                               author     ="true"
106                               version    ="true"                               version    ="true"
107                               overview   ="${DIR.SRC}/overview.html"                               overview   ="${DIR.SRC}/overview.html"
108                                   windowtitle="Klassenbibliothek Martin Schmitz"                                   windowtitle="${JAVADOC.TITLE}"
109                  >                  >
110                          <excludepackage name="schmitzm.test"/>                          <excludepackage name="schmitzm.test"/>
111                          <link href="${LINK.JDK}"/>                          <link href="${LINK.JDK}"/>
# Line 107  Line 120 
120                          </zipfileset>                          </zipfileset>
121                  </zip>                  </zip>
122          </target>          </target>
123    
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  </project>  </project>

Legend:
Removed from v.12  
changed lines
  Added in v.686

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26