-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
100 lines (92 loc) · 4.69 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
<project name="citsmart" default="init" basedir=".">
<description>Monta o WAR do CITSmart</description>
<property file="locais.properties"/>
<property name="webContent" value="${projeto.web.path}"/>
<property name="web-inf" value="${webContent}/WEB-INF"/>
<property name="web-class" value="${web-inf}/classes"/>
<property name="web-source" value="${web-inf}/src"/>
<property name="web-lib" value="${web-inf}/lib"/>
<property name="java-lib" value="${java.root}/lib"/>
<property name="jboss-lib" value="${jboss.lib.path}/lib"/>
<property name="teste.home" value="${webContent}/resultsTest" />
<property name="findbugs.inst" value="C:/Program Files/Testes/findbugs-2.0.2" />
<property name="pmd.inst" value="C:/Program Files/Testes/pmd-bin-5.0.4" />
<property name="checkstyle.inst" value="C:/Program Files/Testes/checkstyle-5.6" />
<!-- Executa a compilação e geração do war -->
<target name="war" >
<delete dir="${web-class}"/>
<mkdir dir="${web-class}"/>
<javac srcdir="${web-source}" destdir="${web-class}" includeantruntime="false" debug="true" optimize="false" nowarn="true" deprecation="false" source="1.6" memoryinitialsize="80m" memorymaximumsize="1256m" encoding="ISO-8859-1" fork="true">
<classpath>
<pathelement location="${web-class}"/>
<fileset dir="${web-lib}">
<include name="**/*.jar"/>
</fileset>
<fileset dir="${java-lib}">
<include name="**/*.jar"/>
</fileset>
<fileset dir="${jboss-lib}">
<include name="**/*.jar"/>
</fileset>
</classpath>
</javac>
</target>
<!-- Executa o findBugs -->
<taskdef name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask" classpath="${findbugs.inst}/lib/findbugs-ant.jar" />
<target name="findbugs" depends="war" >
<findbugs home="${findbugs.inst}" output="xml:withMessages" outputFile="${teste.home}/findBugs.xml" >
<sourcePath path="${web-class}" />
<class location="${web-class}" />
</findbugs>
</target>
<!-- Executa o checkstyle -->
<taskdef resource="checkstyletask.properties" classpath="${checkstyle.inst}/checkstyle-5.6-all.jar"/>
<target name="checkstyle" depends="findbugs" description="Generates a report of code convention violations.">
<checkstyle config="${checkstyle.inst}/sun_checks.xml" failureProperty="checkstyle.failure" failOnViolation="false">
<formatter type="xml" tofile="${teste.home}/checkstyle.xml"/>
<fileset dir="${web-source}" includes="**/*.java"/>
</checkstyle>
<style in="${teste.home}/checkstyle.xml" out="${teste.home}/checkstyle_report.html" style="${checkstyle.inst}/contrib/checkstyle-noframes.xsl"/>
</target>
<!-- Executa o log -->
<target name="init" depends="checkstyle">
<record name="build.log" loglevel="verbose" append="false"/>
</target>
<!-- Executa o PMD -->
<!--taskdef name="pmd" classpath="${pmd.inst}/lib/pmd-5.0.4.jar" classname="net.sourceforge.pmd.ant.PMDTask"/>
<target name="pmd" depends="init">
<pmd rulesetfiles="${pmd.inst}/favorites.xml">
<auxClasspath>
<pathelement path="${pmd.inst}/lib" location="${pmd.inst}/lib/jaxen-1.1.4.jar" />
<pathelement path="${pmd.inst}/lib" location="${pmd.inst}/lib/*.jar" />
</auxClasspath>
<formatter type="xml" toFile="${teste.home}/pmd.xml"/>
<fileset dir="${web-source}" includes="**/*.java"/>
</pmd>
</target-->
<!--taskdef resource="selenium-ant.properties">
<classpath>
<pathelement location="C:\Users\cleison.ferreira\.hudson\tools\selenium-server.jar"/>
</classpath>
</taskdef>
<selenese suite="${webContent}\testSelenium\*.html" browser="*firefox"
results="${webContent}\testSelenium\*.html"
multiWindow="true"
timeoutInSeconds="900"
startURL="http://10.2.1.3/citsmart" /-->
<!--taskdef uri="antlib:org.sonar.ant" resource="org/sonar/ant/antlib.xml">
<classpath path="C:\Program Files (x86)\Jenkins\tools\ANT\bin\sonar-ant-task.jar" />
</taskdef-->
<!--target name="sonar" depends="init">
<property name="useUnicode" value="true"/>
<property name="characterEncoding" value="UTF-8"/>
<property name="sonar.host.url" value="http://10.2.1.3:8080/sonar" />
<property name="sonar.java.source" value="1.6"/>
<property name="sonar.java.target" value="1.6"/>
<sonar:sonar key="br.com.centralit:citsmart" version="2.0" xmlns:sonar="antlib:org.sonar.ant">
<sources>
<path location="${web-source}"/>
</sources>
</sonar:sonar>
</target-->
</project>