This repository has been archived by the owner on Mar 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.xml
168 lines (136 loc) · 6.16 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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
<?xml version="1.0" encoding="UTF-8"?>
<project name="GoodsReview" default="all" basedir=".">
<!--main paths defenition-->
<property name="project.dir" location="."/>
<property name="lib.dir" location="${project.dir}/lib"/>
<property name="build.dir" location="${project.dir}/build"/>
<property name="classes.dir" location="${build.dir}/classes"/>
<property name="dist.dir" location="${build.dir}/dist"/>
<!--пути к вложенным билд файлам-->
<property name="core.build" location="${project.dir}/core/build.xml"/>
<property name="analyzer.build" location="${project.dir}/analyzer/build.xml"/>
<property name="indexer.build" location="${project.dir}/indexer/build.xml"/>
<property name="frontend.build" location="${project.dir}/frontend/build.xml"/>
<!-- <property name="searcher.build" location="${project.dir}/searcher/build.xml"/>-->
<property name="storage.build" location="${project.dir}/storage/build.xml"/>
<property name="miner.build" location="${project.dir}/miner/build.xml"/>
<property name="searcher.build" location="${project.dir}/searcher/build.xml"/>
<!-- classpath -->
<path id="libs">
<fileset dir="lib" includes="**/*.jar"/>
<fileset dir="${classes.dir}" includes="**/*.class"/>
</path>
<!--iсоздание папок-->
<target name="init">
<mkdir dir="${build.dir}"/>
<mkdir dir="${classes.dir}"/>
<mkdir dir="${dist.dir}"/>
</target>
<!--далее по всем таргетам вызываются вложенные билдеры-->
<target name="core" depends="init">
<ant antfile="${core.build}"/>
</target>
<target name="storage" depends="core">
<ant antfile="${storage.build}"/>
</target>
<target name="miner" depends="storage">
<ant antfile="${miner.build}"/>
</target>
<target name="analyzer" depends="storage">
<ant antfile="${analyzer.build}"/>
</target>
<target name="indexer" depends="storage">
<ant antfile="${indexer.build}"/>
</target>
<target name="searcher" depends="indexer">
<ant antfile="${searcher.build}"/>
</target>
<target name="frontend" depends="searcher">
<ant antfile="${frontend.build}"/>
</target>
<!--по умолчанию вызывается этот таргет (тут пара строчек лишние, но так понятнее)-->
<target name="all" depends="init">
<antcall target="core"/>
<antcall target="frontend"/>
<antcall target="storage"/>
<antcall target="analyzer"/>
<antcall target="indexer"/>
<antcall target="searcher"/>
<antcall target="storage"/>
<antcall target="miner"/>
</target>
<!--для запуска различных модулей испольются следующие таргеты-->
<target name="run_storage">
<java dir="${build.dir}" jar="${dist.dir}/core.jar" fork="true">
<jvmarg value="-Xms64m"/>
<jvmarg value="-Xmx1000m"/>
<arg value="storage/src/scripts/beans.xml"/>
</java>
</target>
<target name="run_frontend">
<java dir="${build.dir}" jar="${dist.dir}/core.jar" fork="true">
<jvmarg value="-Xms64m"/>
<jvmarg value="-Xmx1000m"/>
<arg value="frontend/src/scripts/beans.xml"/>
</java>
</target>
<!-- for checking code style -->
<target name="checkstyle">
<delete file="docs/codeValidation/checkstyle_report.xml"/>
<delete file="docs/codeValidation/checkstyle_report.htm"/>
<taskdef resource="checkstyletask.properties" classpath="${lib.dir}/checkstyle/checkstyle-5.4-all.jar"/>
<checkstyle config="docs/codeValidation/checks.xml"
failureProperty="checkstyle.failure"
failOnViolation="false">
<formatter type="xml" tofile="docs/codeValidation/checkstyle_report.xml"/>
<fileset dir="${project.dir}" includes="**/*.java" excludes="**/net/**/*.java **/test/** "/>
</checkstyle>
<xslt in="docs/codeValidation/checkstyle_report.xml" out="docs/codeValidation/checkstyle_report.htm"
style="docs/codeValidation/checkstyle.xsl">
<outputproperty name="method" value="html"/>
<outputproperty name="standalone" value="yes"/>
<outputproperty name="encoding" value="iso8859_1"/>
<outputproperty name="indent" value="yes"/>
</xslt>
</target>
<!--for find bugs in code -->
<target name="findbugs">
<delete file="docs/codeValidation/findbugs_report.xml"/>
<taskdef name="findbugs" classpath="${lib.dir}/findbugs/findbugs-ant.jar"
classname="edu.umd.cs.findbugs.anttask.FindBugsTask"/>
<findbugs home="${lib.dir}/findbugs/"
output="xml"
outputFile="docs/codeValidation/findbugs_report.xml">
<auxClasspath refid="libs"/>
<sourcePath path="${project.dir}"/>
<class location="${build.dir}/"/>
</findbugs>
</target>
<target name="findbugs_html">
<delete file="codeValidation/findbugs_report.html"/>
<taskdef name="findbugs" classpath="${lib.dir}/findbugs/findbugs-ant.jar"
classname="edu.umd.cs.findbugs.anttask.FindBugsTask"/>
<findbugs home="${lib.dir}/findbugs/"
output="html"
outputFile="docs/codeValidation/findbugs_report.html">
<auxClasspath refid="libs"/>
<sourcePath path="${project.dir}"/>
<class location="${build.dir}/"/>
</findbugs>
</target>
<target name="javadoc">
<fileset id="sources" dir="${project.dir}" includes="**/*.jar"/>
<javadoc
access="public"
destdir="docs"
author="true"
version="true"
use="true"
windowtitle="GoodsReview javadoc"
>
<fileset dir="${project.dir}" defaultexcludes="yes">
<include name="**/*.java"/>
</fileset>
</javadoc>
</target>
</project>