-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
135 lines (123 loc) · 5.81 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project default="build" name="Build script for JCloP project">
<property name="jclopVersion" value="0.0.0"/>
<tstamp><format property="TODAY" pattern="yyyyMMddhhmm" locale="fr,FR"/></tstamp>
<property name="AJLib" location="../A-JLib/bin"/>
<property name="Dropbox" location="C:/Users/Jean-Marc/Dropbox/dropbox-java-sdk-1.5.3/lib/dropbox-java-sdk-1.5.3.jar"/>
<property name="HttpClient" location="C:/Users/Jean-Marc/Dropbox/dropbox-java-sdk-1.5.1xxx/lib/httpclient-4.2.1.jar"/>
<property name="HttpCore" location="C:/Users/Jean-Marc/Dropbox/dropbox-java-sdk-1.5.1xxx/lib/httpcore-4.2.1.jar"/>
<property name="srcAJLib" location="../A-JLib/src"/>
<property name="srcDropbox" location="../JClop-Dropbox/src"/>
<property name="releaseDir" value="release"/>
<property name="deploymentDir" value="deployment" />
<property name="jUnitClasses" value="jUnitClasses" />
<target name="freshDeploymentDir">
<delete dir="${deploymentDir}"/>
<mkdir dir="${deploymentDir}"/>
</target>
<target name="build" depends="doc">
<!-- Ensure the releaseDir and deploymentDir are fresh new ones. -->
<delete dir="${releaseDir}"/>
<!-- Compile core classes -->
<mkdir dir="${releaseDir}"/>
<copy todir="${releaseDir}">
<fileset dir="src" excludes="**/*.java"/>
<fileset dir="src" excludes="**/*.html"/>
</copy>
<javac srcdir="src" destdir="${releaseDir}" source="1.6" target="1.6" encoding="ISO8859-1" includeAntRuntime="false" debug="false" classpath="${AJLib}"/>
<jar destfile="zip/jclop.jar">
<manifest>
<section name="com.fathzer.soft.jclop">
<attribute name="Specification-Title" value="JCloP"/>
<attribute name="Specification-Version" value="${shortversion}"/>
<attribute name="Specification-Vendor" value="Jean-Marc Astesana"/>
<attribute name="Implementation-Title" value="com.fathzer.soft.jclop"/>
<attribute name="Implementation-Version" value="${jclopVersion}"/>
<attribute name="Implementation-Vendor" value="http://jclop.sourceforge.net"/>
</section>
</manifest>
<fileset dir="${releaseDir}"/>
</jar>
<delete dir="${releaseDir}"/>
<!-- Compile Dropbox classes -->
<mkdir dir="${releaseDir}"/>
<copy todir="${releaseDir}">
<fileset dir="${srcDropbox}" excludes="**/*.java"/>
<fileset dir="${srcDropbox}" excludes="**/*.html"/>
</copy>
<javac srcdir="${srcDropbox}" destdir="${releaseDir}" source="1.6" target="1.6" encoding="ISO8859-1" includeAntRuntime="false" debug="false" classpath="${AJLib}:${Dropbox}:${HttpClient}:${HttpCore}:zip/jclop.jar"/>
<jar destfile="zip/jclop-dropbox.jar">
<manifest>
<section name="com.fathzer.soft.jclop.dropbox">
<attribute name="Specification-Title" value="JCloP"/>
<attribute name="Specification-Version" value="${shortversion}"/>
<attribute name="Specification-Vendor" value="Jean-Marc Astesana"/>
<attribute name="Implementation-Title" value="com.fathzer.soft.jclop.dropbox"/>
<attribute name="Implementation-Version" value="${jclopVersion}"/>
<attribute name="Implementation-Vendor" value="http://jclop.sourceforge.net"/>
</section>
</manifest>
<fileset dir="${releaseDir}"/>
</jar>
<delete dir="${releaseDir}"/>
<zip destfile="zip/src.zip">
<zipfileset dir="src"/>
<zipfileset dir="${srcDropbox}"/>
</zip>
<copy todir="zip" file="license.html"/>
<zip basedir="zip" destfile="${deploymentDir}/jclop-v${jclopVersion}.zip"/>
<delete dir="zip"/>
</target>
<target name="doc" depends="freshDeploymentDir">
<javadoc header="${jclopVersion}" sourcepath="src:${srcDropbox}" classpath="${AJLib}:${Dropbox}:${HttpClient}:${HttpCore}" overview="src/overview.html"
destdir="zip/doc" doctitle="JClop" windowtitle="JCloP" source="1.6" />
<copy todir="${deploymentDir}/doc/javadoc">
<fileset dir="zip/doc"/>
</copy>
<!-- copy todir="${deploymentDir}/doc" file="relnotes.txt"/>
<copy todir="${deploymentDir}/doc/javadoc" file="license.html"/>
<copy todir="${deploymentDir}/doc/tutorial">
<fileset dir="demoSrc/examples"/>
</copy-->
</target>
<target name="test">
<echo message="${releaseDir}"/>
<mkdir dir="${junitCLasses}" />
<mkdir dir="jUnitReports" />
<javac srcdir="junit" classpath="${releaseDir};${junitPath}/junit.jar" destdir="${junitClasses}" source="1.5" target="1.5" encoding="ISO8859-1" includeAntRuntime="true" debug="false"/>
<echo message="fakeTest"></echo>
<!-- That fucking ANT add some wrong class on the classpath, Unit fails looking for hamcrest libraries !!!
<junit printsummary="yes" fork="yes" haltonfailure="yes">
<classpath>
<pathelement location="${releaseDir}" />
<pathelement location="${junitPath}/junit.jar" />
<pathelement location="${junitClasses}" />
</classpath>
<formatter type="plain" />
<batchtest fork="yes" todir="jUnitReports">
<fileset dir="${junitClasses}" includes="**/*.class" />
</batchtest>
</junit>
-->
<delete dir="${junitCLasses}"/>
<delete dir="jUnitReports"/>
</target>
<!--property name="demo.dest" location="demo.build"/>
<target name="demo" depends="freshDeploymentDir"-->
<!-- Ensure the releaseDir is a fresh new one. -->
<!--delete dir="${demo.dest}"/>
<mkdir dir="${demo.dest}"/>
<copy todir="${demo.dest}">
<fileset dir="demoSrc" includes="**/*.properties"/>
</copy>
<javac srcdir="demoSrc" destdir="${demo.dest}" debug="on" source="1.6" target="1.6" encoding="ISO8859-1" sourcepath="${srcAJLib};src" />
<echo file="${deploymentDir}/demo/demoId.txt" message="${TODAY}"/>
<jar destfile="${deploymentDir}/demo/JavaluatorDemo${TODAY}.jar">
<manifest>
<attribute name="Main-Class" value="net.astesana.javaluator.demo.DemoApplet"/>
</manifest>
<fileset dir="${demo.dest}"/>
</jar>
<delete dir="${demo.dest}"/>
</target-->
</project>