1 | <?xml version="1.0"?> |
---|
2 | <!-- |
---|
3 | $Id: build.xml 3079 2009-02-04 08:26:20Z gregory $ |
---|
4 | |
---|
5 | Copyright (C) 2007 Gregory Vincic |
---|
6 | |
---|
7 | Files are copyright by their respective authors. The contributions to |
---|
8 | files where copyright is not explicitly stated can be traced with the |
---|
9 | source code revision system. |
---|
10 | |
---|
11 | This file is part of Proteios. |
---|
12 | Available at http://www.proteios.org/ |
---|
13 | |
---|
14 | Proteios is free software; you can redistribute it and/or |
---|
15 | modify it under the terms of the GNU General Public License |
---|
16 | as published by the Free Software Foundation; either version 2 |
---|
17 | of the License, or (at your option) any later version. |
---|
18 | |
---|
19 | Proteios is distributed in the hope that it will be useful, |
---|
20 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
21 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
22 | GNU General Public License for more details. |
---|
23 | |
---|
24 | You should have received a copy of the GNU General Public License |
---|
25 | along with this program; if not, write to the Free Software |
---|
26 | Foundation, Inc., 59 Temple Place - Suite 330, |
---|
27 | Boston, MA 02111-1307, USA. |
---|
28 | --> |
---|
29 | <project name="Proteios Servlet" default="dist-jar"> |
---|
30 | <description> |
---|
31 | Graphical interface of proteios. |
---|
32 | </description> |
---|
33 | <!-- ================================ |
---|
34 | Configuration |
---|
35 | ================================ --> |
---|
36 | <property name="src" location="src" /> |
---|
37 | <property name="build" location="build" /> |
---|
38 | <property name="dist" location="dist" /> |
---|
39 | <property name="test" location="test" /> |
---|
40 | <path id="classpath"> |
---|
41 | <fileset dir="../../api/external"> |
---|
42 | <include name="**/*.jar" /> |
---|
43 | </fileset> |
---|
44 | <!-- Core dependency --> |
---|
45 | <pathelement location="../../api/core/build" /> |
---|
46 | |
---|
47 | <!-- Waf dependency --> |
---|
48 | <pathelement location="../../api/waf/build" /> |
---|
49 | |
---|
50 | <!-- Plugin dependency --> |
---|
51 | <pathelement location="../../plugin/build" /> |
---|
52 | |
---|
53 | |
---|
54 | </path> |
---|
55 | |
---|
56 | <!-- ================================= |
---|
57 | target: dist-jar |
---|
58 | ================================= --> |
---|
59 | <target name="dist-jar" description="--> Proteios Servlet"> |
---|
60 | <mkdir dir="${dist}" /> |
---|
61 | <jar basedir="${build}" destfile="${dist}/proteios_client.jar" includes="**/*.class" /> |
---|
62 | </target> |
---|
63 | |
---|
64 | |
---|
65 | <!-- ================================= |
---|
66 | target: package |
---|
67 | ================================= --> |
---|
68 | <target name="package" depends="clean, compile, dist-jar" description="--> Proteios Servlet"> |
---|
69 | <!-- Build war file --> |
---|
70 | <war destfile="${dist}/proteios.war" webxml="conf/web.xml"> |
---|
71 | <classes dir="${build}" /> |
---|
72 | <lib dir="../../api"> |
---|
73 | <include name="external/*.jar" /> |
---|
74 | <include name="core/dist/*.jar" /> |
---|
75 | <include name="waf/dist/*.jar" /> |
---|
76 | </lib> |
---|
77 | <fileset dir="www" /> |
---|
78 | </war> |
---|
79 | </target> |
---|
80 | |
---|
81 | <!-- - - - - - - - - - - - - - - - - - |
---|
82 | target: compile |
---|
83 | - - - - - - - - - - - - - - - - - --> |
---|
84 | <target name="compile"> |
---|
85 | <mkdir dir="${build}" /> |
---|
86 | <javac encoding="ISO-8859-1" srcdir="${src}" destdir="${build}" classpathref="classpath" debug="true" deprecation="true"> |
---|
87 | <compilerarg value="-Xlint:unchecked" /> |
---|
88 | </javac> |
---|
89 | <!-- Copy locale stuff. TODO Move locale stuff out of the src directory --> |
---|
90 | <copy todir="${build}"> |
---|
91 | <fileset dir="${src}"> |
---|
92 | <exclude name="**/*.java" /> |
---|
93 | </fileset> |
---|
94 | </copy> |
---|
95 | </target> |
---|
96 | |
---|
97 | <!-- - - - - - - - - - - - - - - - - - |
---|
98 | target: clean |
---|
99 | - - - - - - - - - - - - - - - - - --> |
---|
100 | <target name="clean"> |
---|
101 | <delete dir="${dist}" /> |
---|
102 | <delete dir="${build}" /> |
---|
103 | <delete dir="${test}/build" /> |
---|
104 | </target> |
---|
105 | |
---|
106 | <!-- - - - - - - - - - - - - - - - - - |
---|
107 | target: test |
---|
108 | - - - - - - - - - - - - - - - - - --> |
---|
109 | <target name="test" description="Compiles and runs all tests"> |
---|
110 | <mkdir dir="${test}/build" /> |
---|
111 | <javac encoding="ISO-8859-1" srcdir="${test}/src" destdir="${test}/build" classpathref="classpath" debug="true" deprecation="true"> |
---|
112 | <compilerarg value="-Xlint:unchecked" /> |
---|
113 | </javac> |
---|
114 | <!-- Run tests |
---|
115 | All tests should run quietly unless something goes wrong. |
---|
116 | --> |
---|
117 | <junit printsummary="false" haltonfailure="true" forkmode="once" reloading="false"> |
---|
118 | <formatter type="brief" usefile="false" /> |
---|
119 | <classpath refid="classpath" /> |
---|
120 | <!-- |
---|
121 | Example |
---|
122 | <test name="org.proteios.action.TestSomething" /> |
---|
123 | --> |
---|
124 | </junit> |
---|
125 | </target> |
---|
126 | |
---|
127 | |
---|
128 | <!-- - - - - - - - - - - - - - - - - - |
---|
129 | target: doc |
---|
130 | - - - - - - - - - - - - - - - - - --> |
---|
131 | <target name="doc"> |
---|
132 | <javadoc classpathref="classpath" destdir="${dist}/docs/api" author="true" version="true" use="true" windowtitle="Proteios Servlet"> |
---|
133 | <packageset dir="src" /> |
---|
134 | </javadoc> |
---|
135 | </target> |
---|
136 | |
---|
137 | </project> |
---|