Downloads Documentation Community Contribute Demo






Show Sidebar
Login | Register

root/openmrs-modules/chica/build.xml

Revision 4767, 4.7 kB (checked in by tmdugan, 5 months ago)

-- chica

* made changes to reflect changes in dependent modules
* added webapp to parse Chica 1.0 dictionary into openmrs concepts
* add script to convert Chica 1.0 mlms into Chica 2.0 mlms
* added code to set insurance category
* added archiving of aliasQuery and MRFQuery messages
* interpolated percentiles
* round vitals to one decimal place

Line 
1 <?xml version="1.0"?>
2 <!-- ********************************************************* -->
3 <!-- ** Chica Module                                 ** -->
4 <!-- **                                                     ** -->
5 <!-- ** @author Vibha Anand and Tammy Dugan                                 ** -->
6 <!-- ** @version 1.0                                        ** -->
7 <!-- ********************************************************* -->
8 <project basedir="." name="Chica" default="package-module">
9                
10         <!-- *********************************************************** -->
11         <!-- **                     TARGETS                           ** -->
12         <!-- *********************************************************** -->
13         <target name="init" description="initialization">
14                 <xmlcatalog id="common-dtds">
15                                 <dtd
16                                     publicId="-//OpenMRS//DTD OpenMRS Config 1.0//EN"
17                                     location="lib-common/config-1.0.dtd"/>
18                             </xmlcatalog>
19                                
20                                 <xmlproperty file="metadata/config.xml" >
21                                         <xmlcatalog refid="common-dtds"/>
22                                 </xmlproperty>
23
24                 <filterset id="variables.to.replace">
25                         <filter token="MODULE_ID" value="${module.id}" />
26                         <filter token="MODULE_NAME" value="${module.name}" />
27                         <filter token="MODULE_VERSION" value="${module.version}" />
28                         <filter token="MODULE_PACKAGE" value="${module.package}" />
29                 </filterset>
30                
31                 <path id="classpath">
32                         <fileset dir="lib">
33                                 <include name="**/*.jar"/>
34                         </fileset>
35                         <fileset dir="lib-common">
36                                 <include name="**/*.jar"/>
37                         </fileset>
38                         <pathelement location="build" />
39                 </path>
40
41         </target>
42
43         <target name="clean" description="Delete build and dist directories">
44                 <delete dir="dist" />
45                 <delete dir="build" />
46         </target>
47
48         <target name="compile-module" depends="init" description="Compiles the module">
49                 <mkdir dir="build" />
50                
51                 <!-- Copy other source data to the build folder -->
52                 <copy todir="build">
53                         <fileset dir="src/" excludes="**/*.java" />
54                 </copy>
55                
56                 <!--  Compile module java files -->
57                 <javac destdir="build" classpathref="classpath" debug="true" debuglevel="lines,vars,source">
58                         <src path="src/" />
59                         <include name="**/*.java" />
60                 </javac>
61                
62                 <!--  Compile module test java files -->
63                                 <javac destdir="build" classpathref="classpath" debug="true" debuglevel="lines,vars,source">
64                                         <src path="test/" />
65                                         <include name="**/*.java" />
66                                 </javac>
67                
68                 <!--  Compile module web java files -->
69                 <javac destdir="build" classpathref="classpath" debug="true" debuglevel="lines,vars,source">
70                         <compilerarg line="-g" />
71                         <src path="web/src/" />
72                         <include name="**/*.java" />
73                 </javac>
74                
75         </target>
76        
77         <target name="package-module" depends="compile-module,bind" description="Packages module into jar file">
78                 <mkdir dir="dist" />
79                
80                 <!-- Copy module metadata -->
81                 <copy todir="build/">
82                         <fileset dir="metadata/" includes="**/*" />
83                         <filterset refid="variables.to.replace" />
84                 </copy>
85                
86                 <!-- Copy module web data -->
87                 <copy todir="build/web/module/">
88                         <fileset dir="web/module/" includes="**/*" />
89                         <filterset refid="variables.to.replace" />
90                 </copy>
91                
92                 <!-- Copy lib folder -->
93                 <!-- (lib should only contain this module's required -->
94                 <!-- libraries that OpenMRS doesn't contain already) -->
95                 <copy todir="build/lib" failonerror="false">
96                         <fileset dir="lib" includes="**/*" />
97                 </copy>
98                
99             <!-- Copy log4j properties -->
100              <copy todir="build/">
101                 <fileset dir="" includes="log4j.xml" />
102              </copy>
103                
104                 <!-- Copy test files -->
105                              <copy todir="build/">
106                                 <fileset dir="test" includes="*.xml" />
107                              </copy>
108                
109                 <!-- Create distributable jar file -->
110                 <jar destfile="dist/${module.id}-${module.version}.omod">
111                         <fileset dir="build" includes="**/*" >
112                                         <exclude name="**/dbunitFiles/**" />
113                                         <exclude name="**/testFiles/**" />
114                         </fileset>
115                 </jar>
116         </target>
117        
118         <target name="deploy-web" depends="package-module">
119                 <property environment="env"/>
120                 <copy todir="${env.CATALINA_HOME}/webapps/openmrs/WEB-INF/view/module/${module.id}">
121                         <fileset dir="web/module" includes="**/*" />
122                 </copy>
123         </target>
124        
125         <target name="package-jar" depends="package-module" description="Packages class files into jar file to be included in other projects">
126                 <!-- Create distributable jar file -->
127                 <jar destfile="dist/${module.id}-${module.version}.jar">
128                         <fileset dir="build" >
129                                 <exclude name="test/**/*" />
130                         </fileset>
131                 </jar>
132         </target>
133        
134         <target name="bind">
135                  <taskdef name="bind" classname="org.jibx.binding.ant.CompileTask">
136                         <classpath refid="classpath" />
137                   </taskdef>
138                  <bind binding="${basedir}/binding.xml">
139                   <classpath refid="classpath" />
140                   </bind>
141                   </target>
142        
143 </project>
144
Note: See TracBrowser for help on using the browser.