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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 429 - (show annotations)
Fri Nov 17 21:04:22 2006 UTC (14 years, 8 months ago) by gregoa
File MIME type: text/xml
File size: 8605 byte(s)
[svn-inject] Forking libjempbox-java source to Trunk
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.1.0-dev" />
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" 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="${dest.dir}"/>
71 <pathelement path="." />
72 </classpath>
73 <formatter usefile="false" type="plain" />
74 <test name="test.jempbox.TestAll" />
75 </junit>
76 </target>
77
78 <target name="checkstyle" depends="compile">
79 <!--
80 This doesn't work when run from netbeans for some reason-->
81 <taskdef name="checkstyle"
82 classname="com.puppycrawl.tools.checkstyle.CheckStyleTask"
83 classpathref="build.classpath" />
84 <checkstyle config="${checkstyle.config}" classpathref="build.classpath" failOnViolation="false">
85 <fileset dir="${src.dir}" />
86 </checkstyle>
87 <!--<java fork="yes" failonerror="yes" classname="com.puppycrawl.tools.checkstyle.Main"
88 classpathref="build.classpath">
89 <arg value="-p" />
90 <arg value="${checkstyle.properties}" />
91 <arg value="-r" />
92 <arg value="${src.dir}" />
93 </java>-->
94 </target>
95
96 <target name="package" depends="compile" description="Package JempBox">
97 <property name="release.name" value="${project.name}-${project.version}" />
98 <propertyfile file="${resources.dir}/jempbox.version">
99 <entry key="jempbox.version" value="${release.name}"/>
100 </propertyfile>
101
102 <jar jarfile="./lib/${release.name}.jar">
103 <fileset dir="${dest.dir}">
104 <include name="org/**/*.class"/>
105 </fileset>
106 <fileset dir=".">
107 <include name="${resources.dir}/**/*" />
108 </fileset>
109 <manifest>
110 <attribute name="Built-By" value="${user.name}"/>
111 <section name="common">
112 <attribute name="Specification-Title" value="JempBox"/>
113 <attribute name="Specification-Version" value="${project.version}"/>
114 <attribute name="Specification-Vendor" value="JempBox.org"/>
115 </section>
116 </manifest>
117 </jar>
118 </target>
119
120 <target name="nightly-dist">
121 <tstamp />
122 <property name="release.name" value="${project.name}-${project.version}-${DSTAMP}" />
123 <antcall target="dist" />
124 </target>
125
126 <target name="release-dist">
127 <delete dir="${dist.dir}"/>
128 <antcall target="dist" />
129 </target>
130
131 <target name="dist" depends="clean,package,javadoc,website,build.NET,checkstyle" description="Create zip distribution file">
132
133 <zip zipfile="${dist.dir}/${release.name}.zip">
134 <zipfileset dir="." prefix="${release.name}">
135 <include name="${lib.dir}/*.jar"/>
136 <include name="${licenses.dir}/**/*"/>
137 <include name="${src.dir}/**/*.java"/>
138 <include name="${src.dir}/**/*.html"/>
139 <include name="${resources.dir}/**/*" />
140 <include name="${bin.dir}/**/*" />
141 <include name="build.xml" />
142 <include name="build.properties.example" />
143 <include name="${checkstyle.config}" />
144 </zipfileset>
145 <zipfileset dir="${website.build.dir}" prefix="${release.name}/docs">
146 <include name="**/*" />
147 <exclude name="**/*.zip" />
148 </zipfileset>
149 <zipfileset dir="." prefix="${release.name}">
150 <include name="website/**/*" />
151 <exclude name="website/build/**/*" />
152 </zipfileset>
153 <zipfileset dir="${ikvm.dir}/bin" prefix="${release.name}/bin" >
154 <include name="*.dll" />
155 </zipfileset>
156 </zip>
157 </target>
158
159 <target name="checkForIKVM">
160 <condition property="IKVMAvailable">
161 <and>
162 <os family="windows"/>
163 <available file="${ikvmc}" property="ignored" />
164 </and>
165 </condition>
166 </target>
167
168 <target name="build.NET" depends="checkForIKVM,package" if="IKVMAvailable" description="Build JempBox .NET DLL files">
169 <property name="release.name" value="${project.name}-${project.version}" />
170 <exec executable="${ikvmc}">
171 <arg value="-reference:${ikvm.dir}/bin/IKVM.GNU.Classpath.dll" />
172 <arg value="-reference:${ikvm.dir}/bin/IKVM.AWT.WinForms.dll" />
173 <arg value="-target:library" />
174 <arg value="-out:bin\${release.name}.dll" />
175 <arg value="lib\${release.name}.jar" />
176 </exec>
177 </target>
178
179 <target name="javadoc" depends="compile" description="Create Javadocs">
180 <property name="release.name" value="${project.name}-${project.version}" />
181 <javadoc packagenames="org.*"
182 sourcepath="${src.dir}"
183 destdir="${docs.dir}"
184 author="true"
185 version="true"
186 use="true"
187 windowtitle="${release.name} API"
188 doctitle="${project.name}"
189 verbose="no"
190 classpathref="build.classpath"
191 encoding="ISO-8859-1"
192 breakiterator="yes">
193 <link href="http://java.sun.com/j2se/1.4.2/docs/api/"/>
194 <!--<link href="http://jakarta.apache.org/ant/manual/api/" />-->
195 </javadoc>
196 </target>
197
198 <!-- FORREST_HOME must be set as an environment variable -->
199 <property name="project.home" value="${basedir}/website" />
200
201 <import file="${env.FORREST_HOME}/main/forrest.build.xml" optional="true"/>
202 <target name="website" if="env.FORREST_HOME">
203 <antcall target="site"/>
204 </target>
205
206 </project>

  ViewVC Help
Powered by ViewVC 1.1.26