root/trunk/build.xml

Revision 1564, 3.7 kB (checked in by richi, 3 weeks ago)

check-style: added support for running check-style without user interaction (via -Dcheck-style.namespace= -Dcheck-style.path=main)

Line 
1 <?xml version="1.0"?>
2 <project name="stubbles" default="main">
3   <property file="build.properties" />
4
5   <target name="main" if="package" depends="packagecheck">
6     <phing phingfile="${build.base.dir}/${package}/build.xml" />
7   </target>
8
9   <target name="build" if="package" depends="packagecheck">
10     <phing phingfile="${build.base.dir}/${package}/build.xml" target="build" />
11   </target>
12
13   <target name="packagecheck" unless="package">
14     <echo message="=====================================================" />
15     <echo message="Package not specified. You must enter the package " />
16     <echo message="name to be build. " />
17     <echo message=" " />
18     <echo message="-Dpackage=stubbles" />
19     <echo message="=====================================================" />
20     <input propertyname="package" promptChar=":">package to build</input>
21   </target>
22
23   <!-- Setup examples -->
24   <target name="setup-examples" description="Setup the included examples">
25     <phing phingfile="${stubbles.base.dir}/examples/build.xml" inheritAll="false">
26       <property name="javascript.srcpath" value="./src/main/javascript" />
27     </phing>
28   </target>
29
30   <target name="test" description="run test suite">
31     <if>
32       <isset property="package" />
33       <then>
34         <phing phingfile="${build.base.dir}/${package}/build.xml" target="test" />
35       </then>
36       <else>
37         <phing phingfile="${build.base.dir}/stubbles/build.xml" target="test" />
38       </else>
39     </if>
40   </target>
41
42   <target name="test-report" description="run test suite">
43     <if>
44       <isset property="package" />
45       <then>
46         <phing phingfile="${build.base.dir}/${package}/build.xml" target="test-report" />
47       </then>
48       <else>
49         <phing phingfile="${build.base.dir}/stubbles/build.xml" target="test-report" />
50       </else>
51     </if>
52   </target>
53
54   <target name="test-integration" description="run test suite">
55     <if>
56       <isset property="package" />
57       <then>
58         <phing phingfile="${build.base.dir}/${package}/build.xml" target="test-integration" />
59       </then>
60       <else>
61         <phing phingfile="${build.base.dir}/stubbles/build.xml" target="test-integration" />
62       </else>
63     </if>
64   </target>
65
66   <target name="test-initializers" description="run initializers">
67     <if>
68       <isset property="package" />
69       <then>
70         <phing phingfile="${build.base.dir}/${package}/build.xml" target="test-initializers" />
71       </then>
72       <else>
73         <phing phingfile="${build.base.dir}/stubbles/build.xml" target="test-initializers" />
74       </else>
75     </if>
76   </target>
77
78   <target name="checkstyle-pathcheck" unless="check-style.path">
79     <input propertyname="check-style.path" defaultValue="main" validArgs="main,test" promptChar=":">which check path should be used</input>
80   </target>
81  
82   <target name="checkstyle-namespacecheck" unless="check-style.namespace">
83     <input propertyname="check-style.namespace" defaultValue="" promptChar=":">which stubbles namespace should be checked</input>
84   </target>
85  
86   <target name="check-style" description="check coding standards" depends="checkstyle-pathcheck,checkstyle-namespacecheck">
87     <echo message="'check-style.path' is set to '${check-style.path}'"/>
88     <echo message="'check-style.namespace' is set to '${check-style.namespace}' ('' = all)"/>
89     <phing phingfile="${build.base.dir}/stubbles/build.xml" target="check-style" />
90   </target>
91
92   <target name="test-all" depends="check-style, test, test-integration" description="Runs all available checks and tests."/>
93
94   <target name="clear-cache" description="Clears all cache files.">
95     <delete file="${stubbles.base.dir}/lib/.cache" verbose="true"/>
96     <delete>
97       <fileset dir="./cache">
98         <include name="**/*.cache" />
99       </fileset>
100     </delete>
101   </target>
102 </project>
Note: See TracBrowser for help on using the browser.