Skip to content

Commit 4fb61f2

Browse files
committed
beta ant integration
1 parent 5f8bde5 commit 4fb61f2

File tree

93 files changed

+45583
-9972
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+45583
-9972
lines changed

.idea/.gitignore

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

META-INF/MANIFEST.MF

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Manifest-Version: 1.0
2+

build.properties

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
project.name = lab
2+
3+
lib.dir=lib
4+
lib.junit = lib/junit-4.12.jar
5+
lib.hamcrest = lib/hamcrest-core-1.3.jar
6+
7+
src.dir=src/main
8+
src.dir.doc=src/main/java
9+
src.res=src/resources/META-INF
10+
src.test=src/tests/MatchingManagerTest.java
11+
12+
web.content=web
13+
14+
build.dir=ant/build
15+
build.dir.classes = ant/build/WEB-INF/classes
16+
build.dir.lib = ant/build/WEB-INF/lib
17+
build.dir.meta-inf = ant/build/WEB-INF/classes/META-INF
18+
build.web-xml = ant/build/WEB-INF/web.xml
19+
build.dir.doc=ant/build/doc
20+
build.test.report = ant/build/test-report
21+
build.test = ant/build/test/classes
22+
23+
dist.dir = ant/dist
24+
25+
info.version=03
26+
info.md5=none
27+
info.sha1=none

build.xml

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
<project name="ThirdLab" default="build" basedir="." >
2+
3+
<!-- File Properties-->
4+
<property file="build.properties"/>
5+
6+
<path id="classpath">
7+
<fileset dir="${lib.dir}" includes="*.jar" />
8+
<fileset dir="${src.dir}" includes="*.java" />
9+
</path>
10+
11+
<path id="classpath.test">
12+
<pathelement location="${lib.junit}" />
13+
<pathelement location="${lib.hamcrest}" />
14+
<pathelement location="${build.dir}/WEB-INF/classes"/>
15+
</path>
16+
17+
<!-- Task clean -->
18+
<target name="clean">
19+
<delete dir="${build.dir}"/>
20+
<delete dir="WEB-INF"/>
21+
<delete dir="main"/>
22+
<delete dir="resources"/>
23+
<delete dir="test"/>
24+
<delete dir="src/WEB-INF"/>
25+
<delete dir="src/resources"/>
26+
27+
<delete>
28+
<fileset dir="." includes="*.MD5"/>
29+
<fileset dir="." includes="*.SHA-512"/>
30+
<fileset dir="${src.dir}" includes="*.MD5"/>
31+
<fileset dir="${src.dir}" includes="*.SHA-512"/>
32+
<fileset dir="${web.content}" includes="*.MD5"/>
33+
<fileset dir="${web.content}" includes="*.SHA-512"/>
34+
</delete>
35+
</target>
36+
37+
<!-- Task compile -->
38+
<target name="compile" depends="clean">
39+
<mkdir dir="${build.dir.classes}"/>
40+
<javac srcdir="${src.dir}" destdir="${build.dir.classes}" classpathref="classpath"/>
41+
</target>
42+
43+
<!-- Task build -->
44+
<target name="build" depends="compile">
45+
<copy todir="${build.dir.meta-inf}">
46+
<fileset dir="${src.res}"/>
47+
</copy>
48+
49+
<copy todir="${build.dir}">
50+
<fileset dir="${web.content}"/>
51+
</copy>
52+
53+
<copy todir="${build.dir.lib}">
54+
<fileset dir="${lib.dir}"/>
55+
</copy>
56+
57+
<war destfile="${dist.dir}/${project.name}.war" webxml="${build.web-xml}">
58+
<fileset dir="${build.dir}"/>
59+
<manifest>
60+
<attribute name="Specification-Version" value="${info.version}"/>
61+
<attribute name="MD5" value="${info.md5}" />
62+
<attribute name="SHA-1" value="${info.sha1}"/>
63+
</manifest>
64+
</war>
65+
</target>
66+
67+
<!-- Task doc -->
68+
<target name="doc" depends= "clean">
69+
<checksum todir="." format="MD5SUM" totalproperty="md5" forceOverwrite="yes">
70+
<fileset dir="${web.content}" />
71+
<fileset dir="${src.dir}" />
72+
</checksum>
73+
74+
<checksum todir="." algorithm="SHA-512" totalproperty="sha1" forceOverwrite="yes">
75+
<fileset dir="${web.content}" />
76+
<fileset dir="${src.dir}" />
77+
</checksum>
78+
79+
<propertyfile file="old.build.properties">
80+
<entry key="info.md5" value="${md5}" />
81+
<entry key="info.sha1" value="${sha1}" />
82+
</propertyfile>
83+
84+
<mkdir dir="${build.dir.doc}"/>
85+
<javadoc destdir="${build.dir.doc}" classpathref="classpath">
86+
<fileset dir="${src.dir.doc}" includes="*/*.java"/>
87+
<fileset dir="${src.dir.doc}" includes="*.java"/>
88+
</javadoc>
89+
</target>
90+
91+
<!-- Task test -->
92+
<target name="test" depends="build">
93+
94+
<mkdir dir="${build.test}"/>
95+
<javac destdir="${build.test}" srcdir="${src.test}" includeantruntime="false">
96+
<classpath refid="classpath.test"/>
97+
</javac>
98+
<mkdir dir="${build.test.report}"/>
99+
100+
<junit printsummary="on">
101+
102+
<classpath>
103+
<path refid="classpath.test"/>
104+
<pathelement location="${build.test}"/>
105+
</classpath>
106+
107+
<formatter type="plain" usefile="true"/>
108+
<batchtest todir="${build.test.report}">
109+
<fileset dir="${src.test}" includes="*java"/>
110+
</batchtest>
111+
</junit>
112+
</target>
113+
114+
</project>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Manifest-Version: 1.0
2+
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)