3623 |
26 Mar 10 |
gregory |
1 |
<?xml version="1.0"?> |
3623 |
26 Mar 10 |
gregory |
2 |
<!-- |
3623 |
26 Mar 10 |
gregory |
$Id: build.xml 31 2009-07-14 14:32:16Z olle $ |
3623 |
26 Mar 10 |
gregory |
4 |
--> |
3623 |
26 Mar 10 |
gregory |
5 |
<project name="SpectrumFileInspectorExtension" default="dist"> |
3623 |
26 Mar 10 |
gregory |
6 |
<description> |
3623 |
26 Mar 10 |
gregory |
7 |
Extension for Proteios to inspect spectra in a selected spectrum file |
3623 |
26 Mar 10 |
gregory |
8 |
</description> |
3623 |
26 Mar 10 |
gregory |
9 |
<!-- ================================ |
3623 |
26 Mar 10 |
gregory |
Configuration |
3623 |
26 Mar 10 |
gregory |
See http://dev.thep.lu.se/proteios_plugins/wiki/NamingConventions |
3623 |
26 Mar 10 |
gregory |
12 |
================================ --> |
3623 |
26 Mar 10 |
gregory |
13 |
<property name="name" value="SpectrumFileInspectorExtension-0.4" /> |
3623 |
26 Mar 10 |
gregory |
14 |
<property environment="env" /> |
3623 |
26 Mar 10 |
gregory |
15 |
<property name="src" location="src" /> |
3623 |
26 Mar 10 |
gregory |
16 |
<property name="build" location="build" /> |
4391 |
05 Dec 12 |
olle |
17 |
<property name="dist" location="${env.CATALINA_BASE}/webapps/proteios/WEB-INF/lib" /> |
3623 |
26 Mar 10 |
gregory |
18 |
<property name="test" location="test" /> |
3623 |
26 Mar 10 |
gregory |
19 |
<path id="classpath"> |
4391 |
05 Dec 12 |
olle |
<!-- Point it to your tomcat installation should work nicely if you have set CATALINA_BASE --> |
4391 |
05 Dec 12 |
olle |
21 |
<fileset dir="${env.CATALINA_BASE}/webapps/proteios/WEB-INF/lib"> |
3623 |
26 Mar 10 |
gregory |
22 |
<include name="**/*.jar" /> |
3623 |
26 Mar 10 |
gregory |
23 |
</fileset> |
3623 |
26 Mar 10 |
gregory |
24 |
</path> |
3623 |
26 Mar 10 |
gregory |
25 |
|
3623 |
26 Mar 10 |
gregory |
26 |
<!-- ================================= |
3623 |
26 Mar 10 |
gregory |
target: init |
3623 |
26 Mar 10 |
gregory |
28 |
================================= --> |
3623 |
26 Mar 10 |
gregory |
29 |
<target name="init" description="Creates directory structure for your extension"> |
3623 |
26 Mar 10 |
gregory |
30 |
<mkdir dir="${src}"/> |
3623 |
26 Mar 10 |
gregory |
31 |
<mkdir dir="${src}/example"/> |
3623 |
26 Mar 10 |
gregory |
32 |
<mkdir dir="${src}/org"/> |
3623 |
26 Mar 10 |
gregory |
33 |
<mkdir dir="${src}/org/proteios"/> |
3623 |
26 Mar 10 |
gregory |
34 |
<mkdir dir="${src}/org/proteios/action"/> |
3623 |
26 Mar 10 |
gregory |
35 |
<mkdir dir="${src}/org/proteios/action/file"/> |
3623 |
26 Mar 10 |
gregory |
36 |
<get src="http://www.proteios.org/attachment/wiki/ExtensionManual/ImportXFileForm.java?format=raw" dest="${src}/example/ImportXFileForm.java" /> |
3623 |
26 Mar 10 |
gregory |
37 |
<get src="http://www.proteios.org/attachment/wiki/ExtensionManual/CreateXFileImportJob.java?format=raw" dest="${src}/example/CreateXFileImportJob.java" /> |
3623 |
26 Mar 10 |
gregory |
38 |
<get src="http://www.proteios.org/attachment/wiki/ExtensionManual/ImportXFile.java?format=raw" dest="${src}/example/ImportXFile.java" /> |
3623 |
26 Mar 10 |
gregory |
39 |
</target> |
3623 |
26 Mar 10 |
gregory |
40 |
|
3623 |
26 Mar 10 |
gregory |
41 |
<!-- ================================= |
3623 |
26 Mar 10 |
gregory |
target: dist |
3623 |
26 Mar 10 |
gregory |
43 |
================================= --> |
3623 |
26 Mar 10 |
gregory |
44 |
<target name="dist" depends="clean,compile,testVersion" description="--> Plugins"> |
3623 |
26 Mar 10 |
gregory |
45 |
<mkdir dir="${dist}" /> |
3623 |
26 Mar 10 |
gregory |
<!-- Build jar file --> |
3623 |
26 Mar 10 |
gregory |
47 |
<jar basedir="${build}" destfile="${dist}/${name}-${proteios-version}.ext.jar" includes="**/*.class" excludes="example/**" /> |
3623 |
26 Mar 10 |
gregory |
48 |
</target> |
3623 |
26 Mar 10 |
gregory |
49 |
|
3623 |
26 Mar 10 |
gregory |
50 |
<!-- - - - - - - - - - - - - - - - - - |
3623 |
26 Mar 10 |
gregory |
target: compile |
3623 |
26 Mar 10 |
gregory |
52 |
- - - - - - - - - - - - - - - - - --> |
3623 |
26 Mar 10 |
gregory |
53 |
<target name="compile"> |
3623 |
26 Mar 10 |
gregory |
54 |
<mkdir dir="${build}" /> |
3623 |
26 Mar 10 |
gregory |
55 |
<javac encoding="ISO-8859-1" srcdir="${src}" destdir="${build}" classpathref="classpath" debug="true" deprecation="true"> |
3623 |
26 Mar 10 |
gregory |
56 |
<compilerarg value="-Xlint:unchecked" /> |
3623 |
26 Mar 10 |
gregory |
57 |
</javac> |
3623 |
26 Mar 10 |
gregory |
58 |
</target> |
3623 |
26 Mar 10 |
gregory |
59 |
|
3623 |
26 Mar 10 |
gregory |
60 |
<!-- - - - - - - - - - - - - - - - - - |
3623 |
26 Mar 10 |
gregory |
target: clean |
3623 |
26 Mar 10 |
gregory |
62 |
- - - - - - - - - - - - - - - - - --> |
3623 |
26 Mar 10 |
gregory |
63 |
<target name="clean"> |
3623 |
26 Mar 10 |
gregory |
64 |
<delete dir="${dist}/${name}-${proteios-version}.ext.jar" /> |
3623 |
26 Mar 10 |
gregory |
65 |
<delete dir="${build}" /> |
3623 |
26 Mar 10 |
gregory |
66 |
<delete dir="${test}/build" /> |
3623 |
26 Mar 10 |
gregory |
67 |
</target> |
3623 |
26 Mar 10 |
gregory |
68 |
|
3623 |
26 Mar 10 |
gregory |
69 |
<!-- - - - - - - - - - - - - - - - - - |
3623 |
26 Mar 10 |
gregory |
target: test |
3623 |
26 Mar 10 |
gregory |
71 |
- - - - - - - - - - - - - - - - - --> |
3623 |
26 Mar 10 |
gregory |
72 |
<target name="test" description="Compiles and runs all tests"> |
3623 |
26 Mar 10 |
gregory |
73 |
<mkdir dir="${test}/build" /> |
3623 |
26 Mar 10 |
gregory |
74 |
<javac encoding="ISO-8859-1" srcdir="${test}/src" destdir="${test}/build" classpathref="classpath" debug="true" deprecation="true"> |
3623 |
26 Mar 10 |
gregory |
75 |
<compilerarg value="-Xlint:unchecked" /> |
3623 |
26 Mar 10 |
gregory |
76 |
</javac> |
3623 |
26 Mar 10 |
gregory |
<!-- Run tests |
3623 |
26 Mar 10 |
gregory |
All tests should run quietly unless something goes wrong. |
3623 |
26 Mar 10 |
gregory |
79 |
--> |
3623 |
26 Mar 10 |
gregory |
80 |
<junit printsummary="false" haltonfailure="true" forkmode="once" reloading="false"> |
3623 |
26 Mar 10 |
gregory |
81 |
<formatter type="brief" usefile="false" /> |
3623 |
26 Mar 10 |
gregory |
82 |
<classpath refid="classpath" /> |
3623 |
26 Mar 10 |
gregory |
83 |
<!-- |
3623 |
26 Mar 10 |
gregory |
Example |
3623 |
26 Mar 10 |
gregory |
<test name="org.proteios.plugin.TestSomePlugin" /> |
3623 |
26 Mar 10 |
gregory |
86 |
--> |
3623 |
26 Mar 10 |
gregory |
87 |
</junit> |
3623 |
26 Mar 10 |
gregory |
88 |
</target> |
3623 |
26 Mar 10 |
gregory |
89 |
|
3623 |
26 Mar 10 |
gregory |
90 |
<!-- |
3623 |
26 Mar 10 |
gregory |
Gets the version number from installed proteios |
3623 |
26 Mar 10 |
gregory |
92 |
--> |
3623 |
26 Mar 10 |
gregory |
93 |
<target name="testVersion"> |
3623 |
26 Mar 10 |
gregory |
94 |
<java classname="org.proteios.core.Application" classpathref="classpath" outputproperty="proteios-version" /> |
4391 |
05 Dec 12 |
olle |
95 |
<fail unless="proteios-version" message="Please set CATALINA_BASE and make sure proteios is installed" /> |
3623 |
26 Mar 10 |
gregory |
96 |
</target> |
3623 |
26 Mar 10 |
gregory |
97 |
|
3623 |
26 Mar 10 |
gregory |
98 |
<!-- - - - - - - - - - - - - - - - - - |
3623 |
26 Mar 10 |
gregory |
target: doc |
3623 |
26 Mar 10 |
gregory |
100 |
- - - - - - - - - - - - - - - - - --> |
3623 |
26 Mar 10 |
gregory |
101 |
<target name="doc"> |
3623 |
26 Mar 10 |
gregory |
102 |
<javadoc classpathref="classpath" destdir="${dist}/docs/api" author="true" version="true" use="true" windowtitle="${name}"> |
3623 |
26 Mar 10 |
gregory |
103 |
<packageset dir="src" /> |
3623 |
26 Mar 10 |
gregory |
104 |
</javadoc> |
3623 |
26 Mar 10 |
gregory |
105 |
</target> |
3623 |
26 Mar 10 |
gregory |
106 |
|
3623 |
26 Mar 10 |
gregory |
107 |
</project> |