-
Notifications
You must be signed in to change notification settings - Fork 7
/
build.xml
140 lines (115 loc) · 5.08 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="BrandAnalytics" default="frontend" basedir=".">
<!--main paths defenition-->
<property name="project.dir" location="."/>
<property name="lib.dir" location="${project.dir}/lib"/>
<property name="tars.dir" location="${project.dir}/build-tars"/>
<property name="build.dir" location="${project.dir}/build"/>
<property name="classes.dir" location="${build.dir}/classes"/>
<property name="dist.dir" location="${build.dir}/lib"/>
<!--пути к вложенным билд файлам-->
<property name="core.build" location="${project.dir}/core/build.xml"/>
<property name="miner.build" location="${project.dir}/miner/build.xml"/>
<property name="index.build" location="${project.dir}/index/build.xml"/>
<property name="frontend.build" location="${project.dir}/frontend/build.xml"/>
<property name="tasker.build" location="${project.dir}/tasker/build.xml"/>
<property file="build.properties"/>
<!-- lib holder -->
<path id="libs">
<fileset dir="lib" includes="**/*.jar"/>
<fileset dir="${classes.dir}" includes="**/*.class"/>
</path>
<target name="init">
<delete dir="${build.dir}"/>
<mkdir dir="${build.dir}"/>
<mkdir dir="${tars.dir}"/>
<mkdir dir="${dist.dir}"/>
<tstamp>
<format property="TODAY" pattern="d-MMMM-yyyy" locale="en,UK"/>
</tstamp>
</target>
<target name="core" depends="init">
<ant antfile="${core.build}"/>
</target>
<!--server includes indexer-->
<target name="frontend" depends="core">
<ant antfile="${frontend.build}"/>
<tar destfile="${tars.dir}/${TODAY}-SERVER.tar" basedir="${build.dir}"/>
</target>
<target name="frontend-install" depends="frontend">
<scp todir="${username}:${password}@${host}:/server/">
<fileset dir="tars.dir" includes="*SERVER.tar"/>
</scp>
</target>
<target name="tasker" depends="core">
<ant antfile="${tasker.build}"/>
<tar destfile="${tars.dir}/${TODAY}-TASKER.tar" basedir="${build.dir}"/>
</target>
<target name="tasker-install" depends="tasker">
<scp todir="${username}:${password}@${host}:/tasker/">
<fileset dir="tars.dir" includes="*SERVER.tar"/>
</scp>
</target>
<target name="miner" depends="core">
<ant antfile="${miner.build}"/>
<tar destfile="${tars.dir}/${TODAY}-MINER.tar" basedir="${build.dir}"/>
</target>
<!--not building targets-->
<target name="checkstyle">
<delete file="checkstyle_report.xml"/>
<delete file="checkstyle_report.htm"/>
<taskdef resource="checkstyletask.properties" classpath="${lib.dir}/checkstyle/checkstyle-5.4-all.jar"/>
<checkstyle config="code-validation/checks.xml"
failureProperty="checkstyle.failure"
failOnViolation="false">
<formatter type="xml" tofile="checkstyle_report.xml"/>
<fileset dir="${project.dir}" includes="**/*.java" excludes="**/net/**/*.java **/test/** "/>
</checkstyle>
<xslt in="checkstyle_report.xml" out="checkstyle_report.htm" style="code-validation/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>
<target name="findbugs">
<delete file="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="findbugs_report.xml">
<auxClasspath refid="libs"/>
<sourcePath path="${project.dir}"/>
<class location="${build.dir}/"/>
</findbugs>
</target>
<target name="findbugs_html">
<delete file="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="findbugs_report.html">
<auxClasspath refid="${build.dir}/lib"/>
<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="Brandillo javadoc"
>
<fileset dir="${project.dir}" defaultexcludes="yes">
<include name="**/*.java"/>
<exclude name="**/xfresh/**/*.java"/>
</fileset>
</javadoc>
</target>
</project>