-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
131 lines (112 loc) · 5.22 KB
/
build.xml
File metadata and controls
131 lines (112 loc) · 5.22 KB
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
<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="git-bamboo-plugin" default="all">
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- -->
<!-- Change this to the location of your Bamboo lib directory or -Dbamboo.server.lib=your-path to override it -->
<!-- -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<property name="bamboo.server.lib" value="/Applications/Bamboo/webapp/WEB-INF/lib/"/>
<property name="release.version" value="1.0.1"/>
<patternset id="compiler.resources">
<include name="**/?*.properties"/>
<include name="**/?*.xml"/>
<include name="**/?*.gif"/>
<include name="**/?*.jpg"/>
<include name="**/?*.ftl"/>
</patternset>
<dirname property="basedir" file="${ant.file}"/>
<path id="classpath">
<fileset dir="lib">
<include name="**/*.jar"/>
</fileset>
</path>
<path id="sourcepath">
<dirset dir="${basedir}">
<include name="src/main/java"/>
<include name="src/main/resources"/>
</dirset>
</path>
<path id="sourcepath.test">
<dirset dir="${basedir}">
<include name="src/test/java"/>
<include name="src/test/resources"/>
</dirset>
</path>
<target name="clean" description="Remove all build files">
<delete dir="build"/>
<delete file="github-web-rep-viewer-${release.version}.jar"/>
</target>
<target name="copy-dependencies">
<echo message="Copying Bamboo jars from ${bamboo.server.lib}"/>
<copy todir="lib">
<fileset dir="${bamboo.server.lib}">
<include name="atlassian-core-*.jar"/>
<include name="atlassian-bamboo-api-*.jar"/>
<include name="atlassian-bamboo-core-*.jar"/>
<include name="atlassian-bamboo-plugin-git-*.jar"/>
<include name="atlassian-util-concurrent-*.jar"/>
<include name="atlassian-bamboo-web-*.jar"/>
<include name="atlassian-event-*.jar"/>
<include name="atlassian-spring-*.jar"/>
<include name="atlassian-util-concurrent-*.jar"/>
<include name="commons-configuration-*.jar"/>
<include name="commons-logging-*.jar"/>
<include name="commons-lang-*.jar"/>
<include name="webwork-*.jar"/>
<include name="xwork-*.jar"/>
<include name="spring-context-*.jar"/>
<include name="rife-continuations-*.jar"/>
<include name="oscore-*.jar"/>
<include name="log4j-*.jar"/>
<include name="guava-*.jar"/>
</fileset>
</copy>
</target>
<target name="compile" depends="copy-dependencies, src.compile, test.compile" description="compile the source"/>
<target name="src.compile" description="compile the source">
<mkdir dir="build/classes"/>
<javac destdir="build/classes" fork="true" debug="true">
<classpath refid="classpath"/>
<src refid="sourcepath"/>
</javac>
<copy todir="build/classes">
<fileset dir="${basedir}/src/main/java">
<patternset refid="compiler.resources"/>
<type type="file"/>
</fileset>
<fileset dir="${basedir}/src/main/resources">
<patternset refid="compiler.resources"/>
<type type="file"/>
</fileset>
</copy>
</target>
<target name="test.compile">
<mkdir dir="build/test-classes"/>
<javac destdir="build/test-classes" debug="true" fork="true">
<classpath refid="classpath"/>
<classpath location="build/classes"/>
<src refid="sourcepath.test"/>
</javac>
</target>
<target name="test" depends="compile">
<mkdir dir="build/test-reports"/>
<junit printsummary="yes" haltonfailure="yes" forkmode="once">
<formatter type="brief" usefile= "no"/>
<formatter type="xml"/>
<classpath refid="classpath"/>
<classpath location="build/classes"/>
<classpath location="build/test-classes"/>
<batchtest fork="yes" todir="build/test-reports">
<fileset dir="${basedir}/src/test/java">
<include name="**/*Test*.java"/>
</fileset>
</batchtest>
</junit>
</target>
<target name="jar" description="Create the bamboo plugin jar">
<replace file="${basedir}/build/classes/atlassian-plugin.xml" token="@@VERSION@@" value="${release.version}"/>
<jar destfile="github-web-rep-viewer-${release.version}.jar" basedir="build/classes"/>
</target>
<target name="all" depends="clean, test, jar" description="build all"/>
<target name="ci" depends="clean, test" description="Continuous Integration"/>
</project>