-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
79 lines (69 loc) · 3.46 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<project basedir="." default="build-jar" name="simplecaptcha">
<property name="debuglevel" value="source,lines,vars"/>
<property name="target" value="1.6"/>
<property name="version.num" value="1.2.1" />
<property environment="env" />
<path id="simplecaptcha.classpath">
<pathelement location="bin"/>
<pathelement location="${env.CATALINA_HOME}/lib/servlet-api.jar"/>
<pathelement location="lib/imaging.jar"/>
</path>
<target name="init">
<mkdir dir="bin"/>
<copy includeemptydirs="false" todir="bin">
<fileset dir="Java/src" excludes="**/*.launch, **/*.java"/>
<fileset dir="Java/test" excludes="**/*.launch, **/*.java"/>
</copy>
</target>
<target name="build-project" depends="init">
<echo message="${ant.project.name}: ${ant.file}, target: ${target}"/>
<javac destdir="bin" includeantruntime="false" source="1.6" target="1.6">
<src path="Java/src"/>
<classpath refid="simplecaptcha.classpath"/>
</javac>
</target>
<target name="build-jar" depends="build-project">
<property name="marshalldir" value="marshalltmp" />
<mkdir dir="${marshalldir}" />
<unzip src="lib/imaging.jar" dest="${marshalldir}" />
<jar destfile="dist/simplecaptcha-${version.num}.jar">
<fileset dir="${marshalldir}" />
<fileset dir="bin" />
<fileset dir=".">
<include name="**/sounds/**" />
</fileset>
</jar>
<delete dir="${marshalldir}" />
<echo message="Successfully created dist/simplecaptcha-${version.num}.jar" />
</target>
<target name="j2ee-example" depends="build-jar">
<war destfile="dist/simplecaptcha-${version.num}-j2ee-sample.war">
<fileset dir="examples/j2ee" />
<lib dir="dist">
<include name="simplecaptcha-latest.jar" />
</lib>
<lib dir="lib">
<include name="jstl-1.2.jar" />
<include name="standard.jar" />
</lib>
</war>
</target>
<target name="javadocs">
<javadoc packagenames="nl.captcha.*"
sourcepath="Java/src"
excludepackagenames="com.jhlabs.*"
defaultexcludes="yes"
destdir="docs/output/javadocs"
author="true"
version="true"
use="true"
windowtitle="SimpleCaptcha API">
<classpath refid="simplecaptcha.classpath"/>
<doctitle><![CDATA[<h1>SimpleCaptcha</h1>]]></doctitle>
<bottom><![CDATA[<i>Copyright © 2010-2011 James Childers. All Rights Reserved.</i>
<!-- Piwik --> <script type="text/javascript"> var pkBaseURL = (("https:" == document.location.protocol) ? "https://sourceforge.net/apps/piwik/simplecaptcha/" : "http://sourceforge.net/apps/piwik/simplecaptcha/"); document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E")); </script><script type="text/javascript"> try { var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 1); piwikTracker.trackPageView(); piwikTracker.enableLinkTracking(); } catch( err ) {} </script><noscript><p><img src="http://sourceforge.net/apps/piwik/simplecaptcha/piwik.php?idsite=1" style="border:0" alt=""/></p></noscript> <!-- End Piwik Tag -->
]]></bottom>
</javadoc>
<echo message="Javadocs built to docs/output/javadocs" />
</target>
</project>