sventon subversion web client - http://www.sventon.org
[show recent changes]
 
  Go to revisionGo to path
HEAD Help
Rev: 657 - svn://greenwoodma.servehttp.com/open-source / SVGRoundTrip / trunk / build.xml
Show File - build.xml  [show properties]
spinner
<project name="SVGRoundTrip" default="jar" basedir=".">
    <description>
        SVGRoundTrip
    </description>
    <property file="build.properties" />
    <property name="build.compiler" value="modern" />
10 
11      <property name="classes" location="classes" />
12      <property name="src" location="src" />
13      <property name="lib" location="lib" />
14      <property name="docs.api" location="docs/api" />
15      <property name="archive" location="archive" />
16      <property name="jar.file" value="SVGRoundTrip.jar" />
17 
18      <property name="test.src" location="test/src" />
19      <property name="test.classes" location="test/classes" />
20      <property name="test.reports" location="test/reports" />
21      <property name="test.images" location="test/images" />
22 
23      <property name="findbugs.home" location="/opt/findbugs" />
24 
25      <available file="${src}" type="dir" property="src.present" />
26      <available file="${jar.file}" type="file" property="jar.present" />
27 
28      <manifestclasspath property="jar.classpath" jarfile="${jar.file}" maxParentLevels="20">
29          <classpath>
30              <fileset dir="${lib}">
31                  <include name="**/*.jar" />
32              </fileset>
33          </classpath>
34      </manifestclasspath>
35 
36      <target name="clean">
37          <delete dir="${classes}" />
38          <delete dir="${test.classes}" />
39          <delete dir="${test.reports}" />
40          <delete file="${jar.file}" />
41          <delete dir="${docs.api}" />
42      </target>
43 
44      <target name="prepare">
45          <mkdir dir="${classes}" />
46 
47          <uptodate property="do.not.build">
48              <srcfiles dir="${src}" includes="**/*.java" />
49              <mapper type="glob" from="*.java" to="${classes}/*.class" />
50          </uptodate>
51      </target>
52 
53      <target name="build.number" unless="do.not.build" depends="prepare">
54          <propertyfile file="${src}/version.info" comment="Version Information">
55              <entry key="build.number" default="0" type="int" operation="+" />
56              <entry key="build.date" type="date" value="now" pattern="dd/mm/yyyy" />
57          </propertyfile>
58      </target>
59 
60      <target name="compile" unless="do.nothing" depends="build.number">
61          <javac destdir="${classes}" srcdir="${src}" excludes="dev/**" debug="true" target="1.6" source="1.6">
62              <compilerarg value="-Xlint:all" />
63              <compilerarg value="-Xlint:-serial" />
64 
65              <classpath>
66                  <fileset file="${findbugs.home}/lib/annotations.jar" />
67                  <fileset file="${findbugs.home}/lib/jsr305.jar" />
68                  <fileset dir="${lib}">
69                      <include name="*.jar" />
70                  </fileset>
71              </classpath>
72          </javac>
73      </target>
74 
75      <target name="resources" depends="prepare">
76          <copy todir="${classes}/englishcoffeedrinker/svg/in/templates" includeEmptyDirs="true">
77              <fileset dir="${src}/englishcoffeedrinker/svg/in/templates" />
78          </copy>
79      </target>
80 
81      <target name="jar" depends="compile, resources">
82          <property file="${src}/version.info" />
83          <jar file="${jar.file}" update="false">
84              <fileset dir="${classes}" />
85              <manifest>
86                  <attribute name="Main-Class" value="englishcoffeedrinker.svg.in.SVGBatchConverter" />
87                  <attribute name="Class-Path" value="${jar.classpath}" />
88                  <section name="SVGRoundTrip">
89                      <attribute name="Built-By" value="${user.name}" />
90                      <attribute name="version-major" value="${version.major}" />
91                      <attribute name="version-minor" value="${version.minor}" />
92                      <attribute name="version-bugfix" value="${version.bugfix}" />
93                      <attribute name="build-number" value="${build.number}" />
94                      <attribute name="build-date" value="${build.date}" />
95                  </section>
96              </manifest>
97          </jar>
98      </target>
99 
100      <target name="javadoc" depends="jar">
101          <javadoc sourcepath="${src}" destdir="${docs.api}" windowtitle="SVGRoundTrip">
102              <classpath>
103                  <fileset file="${findbugs.home}/lib/annotations.jar" />
104                  <fileset file="${findbugs.home}/lib/jsr305.jar" />
105                  <fileset dir="${lib}">
106                      <include name="*.jar" />
107                  </fileset>
108              </classpath>
109          </javadoc>
110      </target>
111 
112      <target name="rebuild" depends="clean,jar" />
113 
114      <target name="archive" depends="rebuild">
115          <property file="${src}/version.info" />
116          <mkdir dir="${archive}" />
117          <zip file="${archive}/SVGRoundTrip-${version.major}.${version.minor}.${version.bugfix}b${build.number}.zip" update="false">
118              <zipfileset dir="${src}" prefix="src" />
119              <zipfileset dir="${lib}" prefix="lib" />
120              <zipfileset dir="." includes="${jar.file}" />
121              <zipfileset dir="." includes="build.xml" />
122          </zip>
123      </target>
124 
125      <target name="version-major" depends="rebuild">
126          <propertyfile file="${src}/version.info" comment="Version Information">
127              <entry key="version.major" type="int" default="0" operation="+" />
128              <entry key="version.minor" value="0" />
129              <entry key="version.bugfix" value="0" />
130          </propertyfile>
131          <antcall target="archive" inheritAll="false" />
132      </target>
133 
134      <target name="version-minor" depends="rebuild">
135          <propertyfile file="${src}/version.info" comment="Version Information">
136              <entry key="version.minor" type="int" default="0" operation="+" />
137              <entry key="version.bugfix" value="0" />
138          </propertyfile>
139          <antcall target="archive" inheritAll="false" />
140      </target>
141 
142      <target name="version-bugfix" depends="rebuild">
143          <propertyfile file="${src}/version.info" comment="Version Information">
144              <entry key="version.bugfix" type="int" default="0" operation="+" />
145          </propertyfile>
146          <antcall target="archive" inheritAll="false" />
147      </target>
148 
149      <taskdef name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask" />
150 
151      <target name="findbugs" depends="jar">
152          <findbugs home="${findbugs.home}" jvmargs="-Xmx512M" failonerror="true" output="xml:withMessages" outputFile="findbugs.xml" effort="max">
153              <auxclasspath>
154                  <fileset dir="${lib}">
155                      <include name="*.jar" />
156                  </fileset>
157              </auxclasspath>
158              <sourcePath path="${basedir}/src/" />
159              <class location="${jar.file}" />
160          </findbugs>
161      </target>
162 
163      <target name="test" depends="jar">
164          <java fork="true" classname="englishcoffeedrinker.svg.in.SVGBatchConverter" failonerror="true">
165              <jvmarg value="-Xmx512m" />
166              <jvmarg value="-Djava.awt.headless=true" />
167              <classpath>
168                  <pathelement location="${jar.file}" />
169              </classpath>
170              <arg value="-e" />
171              <arg value="-f" />
172              <arg value="-o" />
173              <arg value="${test.src}" />
174              <arg value="${test.images}" />
175          </java>
176          <mkdir dir="${test.classes}" />
177          <javac destdir="${test.classes}" srcdir="${test.src}" debug="true" target="1.6" source="1.6">
178              <classpath>
179                  <fileset file="${findbugs.home}/lib/annotations.jar" />
180                  <fileset file="${findbugs.home}/lib/jsr305.jar" />
181                  <fileset file="${jar.file}" />
182              </classpath>
183          </javac>
184          <mkdir dir="${test.reports}" />
185          <java classname="englishcoffeedrinker.svg.utils.Paint2PNG" fork="true" failonerror="true">
186              <jvmarg value="-Djava.awt.headless=true" />
187              <classpath>
188                  <fileset file="${jar.file}" />
189                  <pathelement location="${test.classes}" />
190              </classpath>
191              <arg value="Logo" />
192              <arg value="${test.reports}/logo.png" />
193          </java>
194          <java classname="englishcoffeedrinker.svg.utils.Paint2PNG" fork="true" failonerror="true">
195              <jvmarg value="-Djava.awt.headless=true" />
196              <classpath>
197                  <fileset file="${jar.file}" />
198                  <pathelement location="${test.classes}" />
199              </classpath>
200              <arg value="-m" />
201              <arg value="-s" />
202              <arg value="128x128" />
203              <arg value="GATEVersion" />
204              <arg value="${test.reports}/GATEVersion.png" />
205          </java>
206          <java classname="englishcoffeedrinker.svg.utils.Paint2PNG" fork="true" failonerror="true">
207              <jvmarg value="-Djava.awt.headless=true" />
208              <classpath>
209                  <fileset file="${jar.file}" />
210                  <pathelement location="${test.classes}" />
211              </classpath>
212              <arg value="BasicTextTest" />
213              <arg value="${test.reports}/BasicTextTest.png" />
214          </java>
215      </target>
216 
217  </project>

feed icon

sventon 2.1.4