/[xulu]/trunk/build.xml
ViewVC logotype

Annotation of /trunk/build.xml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 19 - (hide annotations)
Mon Mar 2 14:56:39 2009 UTC (15 years, 9 months ago) by mojays
File MIME type: text/xml
File size: 5670 byte(s)
build.xml: new option "extJar" to create an extended JAR (including resource/icons and /resource/locales)

1 mojays 14 <!-- Build file for XULU. Target ZIPs/JARs are placed in "dist" folder.
2     Note: This script does not (yet) compile the java source!!
3    
4     Option "jar" -> a JAR from the existing binaries expected in folder
5     "classes" plus a ZIP of the JAR
6 mojays 19 Option "extJar" -> Option "jar"
7     + folder "resource/icons" in JAR
8     + folder "resource/locales" in JAR
9 mojays 14 Option "src" -> a ZIP of the source code in folder "src"
10     Option "javadoc" -> a JavaDoc in folder "javadoc" plus a ZIP of
11     this folder
12     Option "all" -> all of the upper mentioned options
13     Option "basic" -> only "jar" and "src"
14 mojays 19
15 mojays 14 The default option is "basic"
16     -->
17     <project default="basic" basedir=".">
18    
19     <!-- Destination folder for ZIPs and JARs -->
20     <property name="DEST.DIR" value="dist"/>
21     <!-- Prefix for the destination file names
22     e.g. "schmitzm" >> "schmitzm.jar", "schmitzm-src.jar" -->
23     <property name="PROJECT.PREFIX" value="xulu"/>
24     <!-- Global prefix directory for ZIP files (except ZIP of JAR!) -->
25     <property name="ZIP.ROOT.DIR" value="${PROJECT.PREFIX}"/>
26    
27     <!-- Source and Destination for source code ZIP -->
28     <property name="DIR.SRC" value="src"/>
29     <property name="FILE.SRC.ZIP" value="${DEST.DIR}/${PROJECT.PREFIX}-src.zip"/>
30    
31     <!-- Source and Destination for JAR file -->
32     <property name="DIR.CLASSES" value="classes"/>
33     <property name="FILE.JAR" value="${DEST.DIR}/${PROJECT.PREFIX}.jar"/>
34     <property name="FILE.JAR.ZIP" value="${FILE.JAR}.zip"/>
35 mojays 19 <!-- Informations for extended JAR -->
36     <property name="FILE.EXT.JAR" value="${DEST.DIR}/${PROJECT.PREFIX}-ext.jar"/>
37     <property name="DIR.RESOURCE" value="resource"/>
38    
39 mojays 14
40     <!-- Destination for JavaDoc and its ZIP -->
41     <property name="DIR.JAVADOC" value="javadoc"/>
42     <property name="FILE.JAVADOC.ZIP" value="${DEST.DIR}/${PROJECT.PREFIX}-doc.zip"/>
43     <property name="LINK.JDK" value="http://java.sun.com/javase/6/docs/api/"/>
44     <property name="LINK.LOG4J" value="http://logging.apache.org/log4j/docs/api/"/>
45     <property name="JAVADOC.TITLE" value="The XULU modelling platform by Martin Schmitz"/>
46    
47     <target name="all">
48     <antcall target="jar"/>
49     <antcall target="src"/>
50     <antcall target="javadoc"/>
51     </target>
52    
53     <target name="basic">
54     <antcall target="jar"/>
55     <antcall target="src"/>
56     </target>
57    
58     <!-- ############## Create a JAR from "classes" and ZIP it ############## -->
59     <target name="jar">
60     <!-- Create the JAR -->
61     <delete failonerror="false" file="${FILE.JAR}"/>
62     <jar destfile="${FILE.JAR}" index="false" level="8" duplicate="preserve">
63     <fileset dir="${DIR.CLASSES}">
64     <exclude name="schmitzm/test**" />
65     <exclude name="**/*.html" />
66     <exclude name="**/*.xcf" />
67     <exclude name="**/Thumbs.db" />
68     </fileset>
69     <manifest>
70     <attribute name="Created-By" value="Martin O.J. Schmitz, Stefan A. Krüger, Dominik Appl" />
71     </manifest>
72     </jar>
73     <!-- Create a ZIP of the JAR -->
74     <delete failonerror="false" file="${FILE.JAR.ZIP}"/>
75     <zip basedir="." destfile="${FILE.JAR.ZIP}">
76     <filename name="${FILE.JAR}"/>
77     </zip>
78     </target>
79    
80 mojays 19 <!-- ############## Create an extended JAR from "classes" ############## -->
81     <!-- ## besides the classes, this JAR includes the XULU folders
82     ## - resource/icons
83     ## - resource/locales
84     #################################################################### -->
85     <target name="extJar">
86     <!-- Create JAR and source ZIP -->
87     <antcall target="jar"/>
88     <!-- Copy JAR to "..-ext.jar" -->
89     <copy file="${FILE.JAR}" tofile="${FILE.EXT.JAR}" overwrite="true" />
90     <!-- Update the JAR with the extended folders -->
91     <jar destfile="${FILE.EXT.JAR}" update="true" index="false" level="8" duplicate="preserve">
92     <fileset dir="${DIR.RESOURCE}">
93     <exclude name="unused**" />
94     <exclude name="**/.svn" />
95     <exclude name="**/*.xcf" />
96     <exclude name="**/Thumbs.db" />
97     </fileset>
98     </jar>
99     </target>
100    
101 mojays 14 <!-- ############## Create a ZIP from "src" folder ############## -->
102     <target name="src">
103     <!-- Create a ZIP from "src" folder -->
104     <delete failonerror="false" file="${FILE.SRC.ZIP}"/>
105     <zip destfile="${FILE.SRC.ZIP}" update="false">
106     <zipfileset dir="${DIR.SRC}" prefix="${ZIP.ROOT.DIR}/${DIR.SRC}">
107     <exclude name="schmitzm/test**" />
108     <exclude name="**/Thumbs.db" />
109     <exclude name="**/.svn" />
110     </zipfileset>
111     </zip>
112     <!-- Add build.xml to ZIP -->
113     <zip destfile="${FILE.SRC.ZIP}" update="true">
114     <zipfileset file="build.xml" prefix="${ZIP.ROOT.DIR}"/>
115     </zip>
116     </target>
117    
118     <!-- ############## Create a JavaDoc to "javadoc" and ZIP it ############## -->
119     <target name="javadoc">
120     <!-- Create a JavaDoc to "javadoc" folder -->
121     <delete failonerror="false" dir="${DIR.JAVADOC}"/>
122     <javadoc sourcepath ="${DIR.SRC}"
123     destdir ="${DIR.JAVADOC}"
124     author ="true"
125     version ="true"
126     overview ="${DIR.SRC}/overview.html"
127     windowtitle="${JAVADOC.TITLE}"
128     >
129     <excludepackage name="schmitzm.test"/>
130     <link href="${LINK.JDK}"/>
131     <link href="${LINK.LOG4J}"/>
132     </javadoc>
133     <!-- Create a ZIP from "javadoc" folder -->
134     <delete failonerror="false" file="${FILE.JAVADOC.ZIP}"/>
135     <zip destfile="${FILE.JAVADOC.ZIP}" update="false">
136     <zipfileset dir="${DIR.JAVADOC}" prefix="${ZIP.ROOT.DIR}/${DIR.JAVADOC}">
137     <exclude name="**/Thumbs.db" />
138     <exclude name="**/.svn" />
139     </zipfileset>
140     </zip>
141     </target>
142     </project>

root@scm.wald.intevation.org
ViewVC Help
Powered by ViewVC 1.1.26