3698 |
05 May 10 |
fredrik |
1 |
<?xml version="1.0"?> |
3698 |
05 May 10 |
fredrik |
2 |
<!-- |
3698 |
05 May 10 |
fredrik |
$Id$ |
3698 |
05 May 10 |
fredrik |
4 |
--> |
3698 |
05 May 10 |
fredrik |
5 |
<project name="Satoshi_extension" default="dist"> |
3698 |
05 May 10 |
fredrik |
6 |
<description> |
3698 |
05 May 10 |
fredrik |
7 |
My extension for Proteios |
3698 |
05 May 10 |
fredrik |
8 |
</description> |
3698 |
05 May 10 |
fredrik |
9 |
<!-- ================================ |
3698 |
05 May 10 |
fredrik |
Configuration |
3698 |
05 May 10 |
fredrik |
See http://dev.thep.lu.se/proteios_plugins/wiki/NamingConventions |
3698 |
05 May 10 |
fredrik |
12 |
================================ --> |
3698 |
05 May 10 |
fredrik |
13 |
<property name="name" value="Satoshi_extension-0.1" /> |
3698 |
05 May 10 |
fredrik |
14 |
<property environment="env" /> |
3698 |
05 May 10 |
fredrik |
15 |
<property name="src" location="src" /> |
3698 |
05 May 10 |
fredrik |
16 |
<property name="build" location="build" /> |
4391 |
05 Dec 12 |
olle |
17 |
<property name="dist" location="${env.CATALINA_BASE}/webapps/proteios/WEB-INF/lib" /> |
3698 |
05 May 10 |
fredrik |
18 |
<property name="test" location="test" /> |
3698 |
05 May 10 |
fredrik |
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"> |
3698 |
05 May 10 |
fredrik |
22 |
<include name="**/*.jar" /> |
3698 |
05 May 10 |
fredrik |
23 |
</fileset> |
3698 |
05 May 10 |
fredrik |
24 |
</path> |
3698 |
05 May 10 |
fredrik |
25 |
|
3698 |
05 May 10 |
fredrik |
26 |
<!-- ================================= |
3698 |
05 May 10 |
fredrik |
target: init |
3698 |
05 May 10 |
fredrik |
28 |
================================= --> |
3698 |
05 May 10 |
fredrik |
29 |
<target name="init" description="Creates directory structure for your extension"> |
3698 |
05 May 10 |
fredrik |
30 |
<mkdir dir="${src}"/> |
3698 |
05 May 10 |
fredrik |
31 |
<mkdir dir="${src}/greg"/> |
3698 |
05 May 10 |
fredrik |
32 |
<get src="http://www.proteios.org/attachment/wiki/ExtensionManual/ImportXFileForm.java?format=raw" dest="${src}/greg/ImportXFileForm.java" /> |
3698 |
05 May 10 |
fredrik |
33 |
<get src="http://www.proteios.org/attachment/wiki/ExtensionManual/CreateXFileImportJob.java?format=raw" dest="${src}/greg/CreateXFileImportJob.java" /> |
3698 |
05 May 10 |
fredrik |
34 |
<get src="http://www.proteios.org/attachment/wiki/ExtensionManual/ImportXFile.java?format=raw" dest="${src}/greg/ImportXFile.java" /> |
3698 |
05 May 10 |
fredrik |
35 |
</target> |
3698 |
05 May 10 |
fredrik |
36 |
|
3698 |
05 May 10 |
fredrik |
37 |
<!-- ================================= |
3698 |
05 May 10 |
fredrik |
target: dist |
3698 |
05 May 10 |
fredrik |
39 |
================================= --> |
3698 |
05 May 10 |
fredrik |
40 |
<target name="dist" depends="clean,compile,testVersion" description="--> Plugins"> |
3698 |
05 May 10 |
fredrik |
41 |
<mkdir dir="${dist}" /> |
3698 |
05 May 10 |
fredrik |
<!-- Build jar file --> |
3698 |
05 May 10 |
fredrik |
43 |
<jar basedir="${build}" destfile="${dist}/${name}-${proteios-version}.ext.jar" includes="**/*.class" /> |
3698 |
05 May 10 |
fredrik |
44 |
</target> |
3698 |
05 May 10 |
fredrik |
45 |
|
3698 |
05 May 10 |
fredrik |
46 |
<!-- - - - - - - - - - - - - - - - - - |
3698 |
05 May 10 |
fredrik |
target: compile |
3698 |
05 May 10 |
fredrik |
48 |
- - - - - - - - - - - - - - - - - --> |
3698 |
05 May 10 |
fredrik |
49 |
<target name="compile"> |
3698 |
05 May 10 |
fredrik |
50 |
<mkdir dir="${build}" /> |
3698 |
05 May 10 |
fredrik |
51 |
<javac encoding="ISO-8859-1" srcdir="${src}" destdir="${build}" classpathref="classpath" debug="true" deprecation="true"> |
3698 |
05 May 10 |
fredrik |
52 |
<compilerarg value="-Xlint:unchecked" /> |
3698 |
05 May 10 |
fredrik |
53 |
</javac> |
3698 |
05 May 10 |
fredrik |
54 |
</target> |
3698 |
05 May 10 |
fredrik |
55 |
|
3698 |
05 May 10 |
fredrik |
56 |
<!-- - - - - - - - - - - - - - - - - - |
3698 |
05 May 10 |
fredrik |
target: clean |
3698 |
05 May 10 |
fredrik |
58 |
- - - - - - - - - - - - - - - - - --> |
3698 |
05 May 10 |
fredrik |
59 |
<target name="clean"> |
3698 |
05 May 10 |
fredrik |
60 |
<delete dir="${dist}/${name}-${proteios-version}.ext.jar" /> |
3698 |
05 May 10 |
fredrik |
61 |
<delete dir="${build}" /> |
3698 |
05 May 10 |
fredrik |
62 |
<delete dir="${test}/build" /> |
3698 |
05 May 10 |
fredrik |
63 |
</target> |
3698 |
05 May 10 |
fredrik |
64 |
|
3698 |
05 May 10 |
fredrik |
65 |
<!-- - - - - - - - - - - - - - - - - - |
3698 |
05 May 10 |
fredrik |
target: test |
3698 |
05 May 10 |
fredrik |
67 |
- - - - - - - - - - - - - - - - - --> |
3698 |
05 May 10 |
fredrik |
68 |
<target name="test" description="Compiles and runs all tests"> |
3698 |
05 May 10 |
fredrik |
69 |
<mkdir dir="${test}/build" /> |
3698 |
05 May 10 |
fredrik |
70 |
<javac encoding="ISO-8859-1" srcdir="${test}/src" destdir="${test}/build" classpathref="classpath" debug="true" deprecation="true"> |
3698 |
05 May 10 |
fredrik |
71 |
<compilerarg value="-Xlint:unchecked" /> |
3698 |
05 May 10 |
fredrik |
72 |
</javac> |
3698 |
05 May 10 |
fredrik |
<!-- Run tests |
3698 |
05 May 10 |
fredrik |
All tests should run quietly unless something goes wrong. |
3698 |
05 May 10 |
fredrik |
75 |
--> |
3698 |
05 May 10 |
fredrik |
76 |
<junit printsummary="false" haltonfailure="true" forkmode="once" reloading="false"> |
3698 |
05 May 10 |
fredrik |
77 |
<formatter type="brief" usefile="false" /> |
3698 |
05 May 10 |
fredrik |
78 |
<classpath refid="classpath" /> |
3698 |
05 May 10 |
fredrik |
79 |
<!-- |
3698 |
05 May 10 |
fredrik |
Example |
3698 |
05 May 10 |
fredrik |
<test name="org.proteios.plugin.TestSomePlugin" /> |
3698 |
05 May 10 |
fredrik |
82 |
--> |
3698 |
05 May 10 |
fredrik |
83 |
</junit> |
3698 |
05 May 10 |
fredrik |
84 |
</target> |
3698 |
05 May 10 |
fredrik |
85 |
|
3698 |
05 May 10 |
fredrik |
86 |
<!-- |
3698 |
05 May 10 |
fredrik |
Gets the version number from installed proteios |
3698 |
05 May 10 |
fredrik |
88 |
--> |
3698 |
05 May 10 |
fredrik |
89 |
<target name="testVersion"> |
3698 |
05 May 10 |
fredrik |
90 |
<java classname="org.proteios.core.Application" classpathref="classpath" outputproperty="proteios-version" /> |
4391 |
05 Dec 12 |
olle |
91 |
<fail unless="proteios-version" message="Please set CATALINA_BASE and make sure proteios is installed" /> |
3698 |
05 May 10 |
fredrik |
92 |
</target> |
3698 |
05 May 10 |
fredrik |
93 |
|
3698 |
05 May 10 |
fredrik |
94 |
<!-- - - - - - - - - - - - - - - - - - |
3698 |
05 May 10 |
fredrik |
target: doc |
3698 |
05 May 10 |
fredrik |
96 |
- - - - - - - - - - - - - - - - - --> |
3698 |
05 May 10 |
fredrik |
97 |
<target name="doc"> |
3698 |
05 May 10 |
fredrik |
98 |
<javadoc classpathref="classpath" destdir="${dist}/docs/api" author="true" version="true" use="true" windowtitle="${name}"> |
3698 |
05 May 10 |
fredrik |
99 |
<packageset dir="src" /> |
3698 |
05 May 10 |
fredrik |
100 |
</javadoc> |
3698 |
05 May 10 |
fredrik |
101 |
</target> |
3698 |
05 May 10 |
fredrik |
102 |
|
3698 |
05 May 10 |
fredrik |
103 |
</project> |