/[debian]/libjempbox-java/trunk/build.xml
ViewVC logotype

Contents of /libjempbox-java/trunk/build.xml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1255 - (show annotations)
Mon Apr 7 19:00:03 2008 UTC (13 years, 1 month ago) by gregoa
File MIME type: text/xml
File size: 8743 byte(s)
New upstream release.
1 <project default="dist" name="JempBox" basedir=".">
2
3 <!-- Use the following file to alter any of the below properties -->
4 <property file="build.properties" />
5 <property environment="env"/>
6
7 <property name="build.compiler" value="modern" />
8 <property name="src.dir" value="src" />
9 <property name="dest.dir" value="classes" />
10 <property name="bin.dir" value="bin" />
11 <property name="website.dir" value="website" />
12 <property name="website.build.dir" value="${website.dir}/build/site" />
13 <property name="docs.dir" value="${website.dir}/build/site/javadoc" />
14 <property name="lib.dir" value="lib" />
15 <property name="licenses.dir" value="licenses" />
16 <property name="dist.dir" value="dist" />
17 <property name="resources.dir" value="Resources" />
18 <property name="checkstyle.config" value="jempbox-checkstyle.xml" />
19
20 <property name="project.name" value="JempBox"/>
21 <property name="project.version" value="0.2.0" />
22
23 <property name="checkstyle.jar.dir" value="lib" />
24 <property name="checkstyle.jar" value="${checkstyle.jar.dir}/checkstyle-all-*.jar" />
25
26 <property name="junit.jar.dir" value="lib"/>
27 <property name="junit.jar" value="${junit.jar.dir}/junit.jar" />
28
29 <!--.NET properties -->
30 <property name="ikvm.dir" value="."/>
31 <property name="ikvmc" value="${ikvm.dir}/bin/ikvmc.exe"/>
32
33 <path id="build.classpath">
34 <fileset dir="lib" >
35 <include name="**/*.jar" />
36 <exclude name="**/${project.name}*.jar" />
37 </fileset>
38 <pathelement path="${dest.dir}" />
39 <pathelement path="." />
40 </path>
41
42 <target name="clean" description="Remove all generated files">
43 <delete failonerror="false">
44 <fileset dir="${dest.dir}"/>
45 <fileset dir="${docs.dir}"/>
46 <fileset dir="${bin.dir}"/>
47 <fileset dir="${lib.dir}">
48 <include name="${project.name}*.jar" />
49 </fileset>
50 <fileset dir="." file="checkstyle.cache" />
51 </delete>
52 </target>
53
54 <target name="jempbox.init">
55 <mkdir dir="${lib.dir}"/>
56 <mkdir dir="${dest.dir}"/>
57 <mkdir dir="${docs.dir}" />
58 <mkdir dir="${dist.dir}" />
59 <mkdir dir="${bin.dir}" />
60 </target>
61
62 <target name="compile" depends="jempbox.init" description="Compile Java source files">
63 <!-- required encoding flag to be able to build using ibm-jdk on redhat ES-->
64 <javac srcdir="${src.dir}" destdir="${dest.dir}" debug="on" target="1.4" classpathref="build.classpath" deprecation="on" encoding="ISO-8859-1"/>
65 </target>
66
67 <target name="junit" depends="clean,compile" description="run junit tests">
68 <junit printsummary="off" fork="on" dir=".">
69 <classpath>
70 <pathelement path="lib/junit.jar"/>
71 <pathelement path="${dest.dir}"/>
72 <pathelement path="." />
73 </classpath>
74 <formatter usefile="false" type="plain" />
75 <test name="test.jempbox.xmp.AllTests" />
76 </junit>
77 </target>
78
79 <target name="checkstyle" depends="compile">
80 <!--
81 This doesn't work when run from netbeans for some reason-->
82 <taskdef name="checkstyle"
83 classname="com.puppycrawl.tools.checkstyle.CheckStyleTask"
84 classpathref="build.classpath" />
85 <checkstyle config="${checkstyle.config}" classpathref="build.classpath" failOnViolation="false">
86 <fileset dir="${src.dir}" />
87 </checkstyle>
88 <!--<java fork="yes" failonerror="yes" classname="com.puppycrawl.tools.checkstyle.Main"
89 classpathref="build.classpath">
90 <arg value="-p" />
91 <arg value="${checkstyle.properties}" />
92 <arg value="-r" />
93 <arg value="${src.dir}" />
94 </java>-->
95 </target>
96
97 <target name="package" depends="compile" description="Package JempBox">
98 <property name="release.name" value="${project.name}-${project.version}" />
99 <propertyfile file="${resources.dir}/jempbox.version">
100 <entry key="jempbox.version" value="${release.name}"/>
101 </propertyfile>
102
103 <jar jarfile="./lib/${release.name}.jar">
104 <fileset dir="${dest.dir}">
105 <include name="org/**/*.class"/>
106 </fileset>
107 <fileset dir=".">
108 <include name="${resources.dir}/**/*" />
109 </fileset>
110 <manifest>
111 <attribute name="Built-By" value="${user.name}"/>
112 <section name="common">
113 <attribute name="Specification-Title" value="JempBox"/>
114 <attribute name="Specification-Version" value="${project.version}"/>
115 <attribute name="Specification-Vendor" value="JempBox.org"/>
116 </section>
117 </manifest>
118 </jar>
119 </target>
120
121 <target name="nightly-dist">
122 <tstamp />
123 <property name="release.name" value="${project.name}-${project.version}-${DSTAMP}" />
124 <antcall target="dist" />
125 </target>
126
127 <target name="release-dist">
128 <delete dir="${dist.dir}"/>
129 <antcall target="dist" />
130 </target>
131
132 <target name="dist" depends="clean,package,checkstyle,junit,javadoc,website,build.NET" description="Create zip distribution file">
133
134 <zip zipfile="${dist.dir}/${release.name}.zip">
135 <zipfileset dir="." prefix="${release.name}">
136 <include name="${lib.dir}/*.jar"/>
137 <include name="${licenses.dir}/**/*"/>
138 <include name="${src.dir}/**/*.java"/>
139 <include name="${src.dir}/**/*.html"/>
140 <include name="${resources.dir}/**/*" />
141 <include name="${bin.dir}/**/*" />
142 <include name="build.xml" />
143 <include name="build.properties.example" />
144 <include name="${checkstyle.config}" />
145 </zipfileset>
146 <zipfileset dir="${website.build.dir}" prefix="${release.name}/docs">
147 <include name="**/*" />
148 <exclude name="**/*.zip" />
149 </zipfileset>
150 <zipfileset dir="." prefix="${release.name}">
151 <include name="website/**/*" />
152 <exclude name="website/build/**/*" />
153 </zipfileset>
154 <zipfileset dir="${ikvm.dir}/bin" prefix="${release.name}/bin" >
155 <include name="*.dll" />
156 </zipfileset>
157 </zip>
158 </target>
159
160 <target name="checkForIKVM">
161 <condition property="IKVMAvailable">
162 <and>
163 <os family="windows"/>
164 <available file="${ikvmc}" property="ignored" />
165 </and>
166 </condition>
167 </target>
168
169 <target name="build.NET" depends="checkForIKVM,package" if="IKVMAvailable" description="Build JempBox .NET DLL files">
170 <property name="release.name" value="${project.name}-${project.version}" />
171 <exec executable="${ikvmc}">
172 <arg value="-reference:${ikvm.dir}/bin/IKVM.GNU.Classpath.dll" />
173 <arg value="-reference:${ikvm.dir}/bin/IKVM.AWT.WinForms.dll" />
174 <arg value="-target:library" />
175 <arg value="-out:bin\${release.name}.dll" />
176 <arg value="lib\${release.name}.jar" />
177 </exec>
178 </target>
179
180 <target name="javadoc" depends="compile" description="Create Javadocs">
181 <property name="release.name" value="${project.name}-${project.version}" />
182 <javadoc packagenames="org.*"
183 sourcepath="${src.dir}"
184 destdir="${docs.dir}"
185 author="true"
186 version="true"
187 use="true"
188 windowtitle="${release.name} API"
189 doctitle="${project.name}"
190 verbose="no"
191 classpathref="build.classpath"
192 encoding="ISO-8859-1"
193 breakiterator="yes">
194 <link href="http://java.sun.com/j2se/1.4.2/docs/api/"/>
195 <!--<link href="http://jakarta.apache.org/ant/manual/api/" />-->
196 </javadoc>
197 </target>
198
199 <!-- FORREST_HOME must be set as an environment variable -->
200 <property name="project.home" value="${basedir}/website" />
201 <property name="forrest.jvmargs" value="-Djava.awt.headless=true" />
202 <import file="${env.FORREST_HOME}/main/forrest.build.xml" optional="true"/>
203 <target name="website" if="env.FORREST_HOME">
204 <antcall target="site"/>
205 </target>
206
207 </project>

  ViewVC Help
Powered by ViewVC 1.1.26