Downloads Documentation Community Contribute Demo






Show Sidebar
Login | Register

root/openmrs-modules/formcompletion/build.xml

Revision 4703, 3.9 kB (checked in by catullus, 7 months ago)

form completion module: Initial import. This module gives the status of what forms have been completed how many times for all patients / all patients in a specific program.

Line 
1 <?xml version="1.0"?>
2 <!-- ********************************************************* -->
3 <!-- ** Form Completion Module                                        ** -->
4 <!-- **                                                     ** -->
5 <!-- ** @author Chase Yarbrough                                   ** -->
6 <!-- ** @version 1.0                                        ** -->
7 <!-- ********************************************************* -->
8 <project name="FormCompletion" 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                 <xmlproperty file="metadata/config.xml" />
25
26                 <filterset id="variables.to.replace">
27                         <filter token="MODULE_ID" value="${module.id}" />
28                         <filter token="MODULE_NAME" value="${module.name}" />
29                         <filter token="MODULE_VERSION" value="${module.version}" />
30                         <filter token="MODULE_PACKAGE" value="${module.package}" />
31                 </filterset>
32                
33                 <path id="classpath">
34                         <fileset dir="../openmrs-trunk/lib">
35                                 <include name="**/*.jar"/>
36                         </fileset>
37                         <fileset dir="../openmrs-trunk/dist">
38                                 <include name="**/*.jar"/>
39                         </fileset>
40                 </path>
41
42         </target>
43
44         <target name="clean" description="Delete build and dist directories">
45                 <delete dir="dist" />
46                 <delete dir="build" />
47         </target>
48
49         <target name="compile-module" depends="init" description="Compiles the module">
50                 <mkdir dir="build" />
51                
52                 <!-- Copy other source data to the build folder -->
53                 <copy todir="build">
54                         <fileset dir="src/" excludes="**/*.java" />
55                 </copy>
56                
57                 <!--  Compile module java files -->
58                 <javac destdir="build" classpathref="classpath" debug="true" debuglevel="lines,source">
59                         <src path="src/" />
60                         <include name="**/*.java" />
61                 </javac>
62                
63                 <!--  Compile module web java files -->
64                 <javac destdir="build" classpathref="classpath" debug="true" debuglevel="lines,source">
65                         <compilerarg line="-g" />
66                         <src path="web/src/" />
67                         <include name="**/*.java" />
68                 </javac>
69                
70         </target>
71        
72         <target name="package-module" depends="compile-module" description="Packages module into jar file">
73                 <mkdir dir="dist" />
74                
75                 <!-- Copy module metadata -->
76                 <copy todir="build/">
77                         <fileset dir="metadata/" includes="**/*" />
78                         <filterset refid="variables.to.replace" />
79                 </copy>
80                
81                 <!-- Copy module web data -->
82                 <copy todir="build/web/module/">
83                         <fileset dir="web/module/" includes="**/*" />
84                         <filterset refid="variables.to.replace" />
85                 </copy>
86                
87                 <!-- Copy lib folder -->
88                 <!-- (lib should only contain this module's required -->
89                 <!-- libraries that OpenMRS doesn't contain already) -->
90                 <copy todir="build/lib" failonerror="false">
91                         <fileset dir="lib" includes="**/*" />
92                 </copy>
93                
94                 <!-- Create distributable jar file -->
95                 <jar destfile="dist/${module.id}-${module.version}.omod">
96                         <fileset dir="build" includes="**/*" />
97                 </jar>
98         </target>
99        
100         <target name="deploy-web" depends="package-module">
101                 <property environment="env"/>
102                 <copy todir="${env.CATALINA_HOME}/webapps/openmrs/WEB-INF/view/module/${module.id}">
103                         <fileset dir="web/module" includes="**/*" />
104                 </copy>
105         </target>
106        
107         <target name="package-jar" depends="package-module" description="Packages class files into jar file to be included in other projects">
108                 <!-- Create distributable jar file -->
109                 <jar destfile="dist/${module.id}-${module.version}.jar">
110                         <fileset dir="build" >
111                                 <exclude name="web/**/*" />
112                                 <exclude name="test/**/*" />
113                         </fileset>
114                 </jar>
115         </target>
116
117 </project>
118
Note: See TracBrowser for help on using the browser.