-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.xml
70 lines (54 loc) · 1.78 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
<project name='heroku' default='package'>
<!-- Properties -->
<property file='application.properties' />
<property environment='env'/>
<!-- optional properties file for developer overrides -->
<property file='build.properties' />
<property name='grails.home' value='${env.GRAILS_HOME}' />
<condition property='grails' value='grails.bat'>
<os family='windows'/>
</condition>
<property name='grails' value='grails' />
<!-- Macrodefs -->
<macrodef name='grails'>
<attribute name='action' />
<attribute name='environment' default='dev' />
<element name='args' optional='true' />
<sequential>
<exec executable='${grails}' failonerror='true'>
<args />
<arg value='@{environment}'/>
<arg value='@{action}'/>
</exec>
</sequential>
</macrodef>
<!-- Targets -->
<target name='init'>
<mkdir dir='grails-app/conf/spring'/>
</target>
<target name='clean' description='Cleans a Grails application' depends='init'>
<grails action='clean' />
<delete><fileset dir='.' includes='*.log*' /></delete>
</target>
<target name='test' description='Run unit tests' depends='clean'>
<grails action='test-app' environment='test' />
</target>
<target name='package' description='Package the plugin'
depends='test, doPackage, post-package-cleanup'/>
<target name='doPackage'>
<grails action='package-plugin' />
</target>
<target name='post-package-cleanup'>
<delete dir='grails-app/conf/hibernate'/>
<delete dir='grails-app/conf/spring'/>
<delete dir='grails-app/controllers'/>
<delete dir='grails-app/domain'/>
<delete dir='grails-app/i18n'/>
<delete dir='grails-app/services'/>
<delete dir='grails-app/utils'/>
<delete dir='grails-app/views'/>
<delete dir='lib'/>
<delete dir='src/java'/>
<delete dir='web-app'/>
</target>
</project>