Downloads Documentation Community Contribute Demo






Show Sidebar
Login | Register

root/openmrs-modules/patientmatching/build.xml

Revision 4695, 6.2 kB (checked in by nribeka, 5 months ago)

patient matching module: add some web pages to the module. need to decide on how to move on with the web section of the module.

Line 
1 <?xml version="1.0"?>
2         <!-- ********************************************************* -->
3         <!-- ** Patient Matching Module                             ** -->
4         <!-- **                                                     ** -->
5         <!-- ** @author James Egg                                   ** -->
6         <!-- ** @version 1.0                                        ** -->
7         <!-- ********************************************************* -->
8         <project name="PatientMatchingModule" default="package-module">
9                        
10                 <!-- *********************************************************** -->
11                 <!-- **                     TARGETS                           ** -->
12                 <!-- *********************************************************** -->
13                 <target name="init" description="initialization">
14                         <xmlproperty file="metadata/config.xml" />
15        
16                         <filterset id="variables.to.replace">
17                                 <filter token="MODULE_ID" value="${module.id}" />
18                                 <filter token="MODULE_NAME" value="${module.name}" />
19                                 <filter token="MODULE_VERSION" value="${module.version}" />
20                                 <filter token="MODULE_PACKAGE" value="${module.package}" />
21                         </filterset>
22                        
23                         <path id="classpath">
24                                 <fileset dir="lib">
25                                         <include name="**/*.jar"/>
26                                 </fileset>
27                                 <fileset dir="lib-common">
28                                         <include name="**/*.jar"/>
29                                 </fileset>
30                         </path>
31        
32                 </target>
33        
34                 <target name="clean" description="Delete build and dist directories">
35                         <delete dir="dist" />
36                         <delete dir="build" />
37                 </target>
38        
39                 <target name="compile-module" depends="init" description="Compiles the module">
40                         <mkdir dir="build" />
41                        
42                         <!-- Copy other source data to the build folder -->
43                         <copy todir="build">
44                                 <fileset dir="src/" excludes="**/*.java" />
45                         </copy>
46                        
47                         <!--  Compile module java files -->
48                         <javac destdir="build" classpathref="classpath" debug="true" debuglevel="lines,vars,source">
49                                 <src path="src/" />
50                                 <include name="**/*.java" />
51                         </javac>
52                        
53                         <!--  Compile module web java files -->
54                         <javac destdir="build" classpathref="classpath" debug="true" debuglevel="lines,source">
55                                 <compilerarg line="-g" />
56                                 <src path="web/src/" />
57                                 <include name="**/*.java" />
58                         </javac>
59                        
60                 </target>
61                
62                 <target name="package-module" depends="compile-module" description="Packages module into omod file">
63                         <mkdir dir="dist" />
64                        
65                         <!-- Copy module metadata -->
66                         <copy todir="build/">
67                                 <fileset dir="metadata/" includes="**/*" />
68                                 <filterset refid="variables.to.replace" />
69                         </copy>
70                        
71                         <!-- Copy module web data -->
72                         <copy todir="build/web/module/">
73                                 <fileset dir="web/module/" includes="**/*" />
74                                 <filterset refid="variables.to.replace" />
75                         </copy>
76                        
77                         <!-- Copy lib folder -->
78                         <!-- (lib should only contain this module's required -->
79                         <!-- libraries that OpenMRS doesn't contain already) -->
80                         <copy todir="build/lib" failonerror="false">
81                                 <fileset dir="lib" includes="**/*" />
82                         </copy>
83                        
84                         <!-- Create distributable jar file -->
85                         <jar destfile="dist/${module.id}-${module.version}.omod">
86                                 <fileset dir="build" includes="**/*" />
87                         </jar>
88                 </target>
89                
90                 <target name="package-jar" depends="package-module" description="Packages module into jar file">
91                         <!-- Create distributable jar file -->
92                         <jar destfile="dist/${module.id}-${module.version}.jar">
93                                 <fileset dir="build" includes="**/*" />
94                         </jar>
95                 </target>
96                
97                         <target name="gui-jar" depends="package-module" description="Creates executable jar that runs GUI">
98                                 <path id="library.Project">
99                                         <fileset dir="lib/">
100                                         <include name="*.jar"/>
101                                         </fileset>
102                                 </path>
103                                 <path id="library-common.Project">
104                                         <fileset dir="lib-common/">
105                                                 <include name="*.jar"/>
106                                         </fileset>
107                                 </path>
108                                                                
109                                 <pathconvert property="lib.project.manifest.classpath" pathsep=" ">
110                                         <path refid="library.Project"/>
111                                         <chainedmapper>
112                                                 <flattenmapper/>
113                                             <globmapper from="*" to="lib/*"/>
114                                         </chainedmapper>
115                                 </pathconvert>
116                                 <pathconvert property="lib-common.project.manifest.classpath" pathsep=" ">
117                                         <path refid="library-common.Project"/>
118                                         <chainedmapper>
119                                                 <flattenmapper/>
120                                                 <globmapper from="*" to="lib-common/*"/>
121                                         </chainedmapper>
122                                 </pathconvert>
123
124                                 <mkdir dir="dist/RecMatch/tmp" />
125                                 <jar destfile="dist/RecMatch/${module.id}-${module.version}-gui.jar">
126                                         <manifest>
127                                                 <attribute name="Main-Class" value="org.regenstrief.linkage.gui.RecMatch" />
128                                                 <attribute name="Class-Path" value="${lib.project.manifest.classpath} ${lib-common.project.manifest.classpath}" />
129                                         </manifest>
130                                         <fileset dir="build" includes="**/*" />
131                                 </jar>
132                                 <copy todir="dist/RecMatch/lib">
133                                         <fileset dir="lib" />
134                                 </copy>
135                                 <copy todir="dist/RecMatch/lib-common">
136                                         <fileset dir="lib-common" />
137                                 </copy>
138                                 <copy file="win32/sort.exe" todir="dist/RecMatch/win32" />
139                         </target>
140                
141         </project>
Note: See TracBrowser for help on using the browser.