OSDN Git Service

環境まわりの細かい修正(前回コミットし忘れ)
[rabbit-bts/RabbitBTS.git] / build.xml
1 <!-- vim:set et sw=2 sts=2 ts=2 fenc=utf-8: -->
2 <project default="compile">
3   <property name="sdk.dir" location="../appengine-java-sdk-1.2.5" />
4
5   <import file="${sdk.dir}/config/user/ant-macros.xml" />
6
7   <path id="project.classpath">
8     <pathelement path="war/WEB-INF/classes" />
9     <fileset dir="war/WEB-INF/lib">
10       <include name="**/*.jar" />
11     </fileset>
12     <fileset dir="${sdk.dir}/lib">
13       <include name="shared/**/*.jar" />
14     </fileset>
15   </path>
16
17   <target name="init">
18     <!-- 不要ファイルの削除 -->
19     <delete>
20       <fileset dir=".">
21         <include name="**/*.swp" />
22       </fileset>
23     </delete>
24   </target>
25
26   <target name="copyjars"
27       depends="init"
28       description="Copies the App Engine JARs to the WAR.">
29     <copy
30         todir="war/WEB-INF/lib"
31         flatten="true">
32       <fileset dir="${sdk.dir}/lib/user">
33         <include name="**/*.jar" />
34       </fileset>
35     </copy>
36   </target>
37
38   <target name="compile" depends="copyjars"
39       description="Compiles Java source and copies other source files to the WAR.">
40     <mkdir dir="war/WEB-INF/classes" />
41     <copy todir="war/WEB-INF/classes">
42       <fileset dir="src">
43         <exclude name="**/*.java" />
44       </fileset>
45     </copy>
46     <javac
47         srcdir="src"
48         destdir="war/WEB-INF/classes"
49         classpathref="project.classpath"
50         debug="on" />
51   </target>
52
53   <target name="datanucleusenhance" depends="compile"
54       description="Performs JDO enhancement on compiled data classes.">
55     <enhance_war war="war" />
56   </target>
57
58   <target name="runserver" depends="datanucleusenhance"
59       description="Starts the development server.">
60     <dev_appserver war="war" />
61   </target>
62
63   <target name="update" depends="datanucleusenhance"
64       description="Uploads the application to App Engine.">
65     <appcfg action="update" war="war" />
66   </target>
67
68   <target name="update_indexes" depends="datanucleusenhance"
69       description="Uploads just the datastore index configuration to App Engine.">
70     <appcfg action="update_indexes" war="war" />
71   </target>
72
73   <target name="rollback" depends="datanucleusenhance"
74       description="Rolls back an interrupted application update.">
75     <appcfg action="rollback" war="war" />
76   </target>
77
78   <target name="request_logs"
79       description="Downloads log data from App Engine for the application.">
80     <appcfg action="request_logs" war="war">
81       <options>
82         <arg value="--num_days=5"/>
83         <arg value="--severity=0"/>
84       </options>
85       <args>
86         <arg value="logs.txt"/>
87       </args>
88     </appcfg>
89   </target>
90
91   <target name="clean">
92     <delete>
93       <fileset dir="war/WEB-INF/classes">
94         <include name="**/*.class" />
95       </fileset>
96     </delete>
97   </target>
98
99 </project>
100