source: ccr/trunk/nhin-vista/projects/NHINC/Current/Product/build.xml@ 563

Last change on this file since 563 was 507, checked in by George Lilly, 16 years ago

NHIN gateway and adaptor for use on linux with VistA EHR and RPMS

File size: 7.5 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2
3<project name="nhinc" default="default" basedir="." xmlns:web="http://www.netbeans.org/ns/j2ee-ejbjarproject/1">
4
5 <description>Builds nhinc, tests, runs NHINC projects</description>
6
7 <property file="build.properties"/>
8 <echo message="ant.home=${ant.home}" />
9 <taskdef name="xmltask" classname="com.oopsconsultancy.xmltask.ant.XmlTask">
10 <classpath>
11 <pathelement location="${ant.home}/lib/xmltask-v1.15.1.jar" />
12 </classpath>
13 </taskdef>
14
15 <import file="Properties.Build.xml"/>
16
17 <condition property="progress-filepath" value="${TempDirectory}/ant-progress.txt">
18 <not>
19 <isset property="progress-filepath" />
20 </not>
21 </condition>
22
23 <path id="ant.contrib.task.classpath">
24 <pathelement location="${ant.home}/lib/ant-contrib-1.0b3.jar"/>
25 <pathelement location="${ant.home}/lib/ivy-1.3.1.jar"/>
26 <pathelement location="${ant.home}/lib/bcel-5.1.jar"/>
27 <pathelement location="${ant.home}/lib/commons-httpclient-3.0.1.jar"/>
28 <pathelement location="${ant.home}/lib/commons-logging-1.0.4.jar"/>
29 </path>
30
31 <taskdef name="for" classname="net.sf.antcontrib.logic.ForTask">
32 <classpath refid="ant.contrib.task.classpath"/>
33 </taskdef>
34
35 <taskdef name="math" classname="net.sf.antcontrib.math.MathTask">
36 <classpath refid="ant.contrib.task.classpath"/>
37 </taskdef>
38
39 <target name="default" depends="build" description="Builds the NHIN-C solution." />
40
41 <target name="build" description="Builds the NHIN-C solution." >
42 <property name="do-to-target" value="build"/>
43 <antcall target="do-to-projects" />
44 </target>
45
46 <target name="build-test" description="Cleans and then builds the NHIN-C solution." depends="init-tests">
47 <property name="do-to-target" value="build-test"/>
48 <antcall target="do-to-projects" />
49 </target>
50
51 <target name="clean" description="Cleans the NHIN-C solution." >
52 <property name="do-to-target" value="clean"/>
53 <antcall target="do-to-projects" />
54 </target>
55
56 <target name="clean-build" description="Cleans and then builds the NHIN-C solution.">
57 <property name="do-to-target" value="clean-build"/>
58 <antcall target="do-to-projects" />
59 </target>
60
61 <target name="clean-test" description="Cleans and then builds the NHIN-C solution." depends="init-tests">
62 <property name="do-to-target" value="clean-test"/>
63 <antcall target="do-to-projects" />
64 </target>
65
66 <target name="test" depends="init-tests">
67 <property name="do-to-target" value="test"/>
68 <antcall target="do-to-projects" />
69 </target>
70
71
72 <target name="do-to-projects" description="calls the target specified in the property do-to-target on all the projects.">
73 <property name="project.count" value="0" />
74 <echo message="PRoduct directory = ${ProductDirectory}"/>
75 <xmltask source="build.projects.xml">
76 <call path="/projects/project">
77 <actions>
78 <math result="project.count" operand1="${project.count}" operation="+" operand2="1" datatype="int" />
79 </actions>
80 </call>
81 </xmltask>
82<echo message="here"/>
83 <property name="current.project.count" value="0" />
84 <xmltask source="build.projects.xml">
85 <call path="/projects/project">
86 <param name="project.name" path="name/text()" />
87 <param name="project.directory" path="directory/text()" />
88 <actions>
89 <math result="current.project.count" operand1="${current.project.count}" operation="+" operand2="1" datatype="int" />
90 <echo message=" ******************** Start @{project.name} ${do-to-target} project ${current.project.count} of ${project.count} *************************" file="${progress-filepath}" />
91 <echo message=" ******************** Start @{project.name} ${do-to-target} project ${current.project.count} of ${project.count} *************************" />
92 <ant dir="${ProductDirectory}/@{project.directory}" antfile="build.xml" inheritAll="true">
93 <target name="${do-to-target}" />
94 </ant>
95 <echo message=" ******************** End @{project.name} ${do-to-target} project ${current.project.count} of ${project.count} *************************" file="${progress-filepath}" />
96 <echo message=" ******************** End @{project.name} ${do-to-target} project ${current.project.count} of ${project.count} *************************" />
97 </actions>
98 </call>
99 </xmltask>
100 </target>
101
102 <target name="init-tests">
103 <delete includeemptydirs="true" failonerror="false">
104 <fileset dir="./UnitTestResults" includes="*.xml"/>
105 <fileset dir="./UnitTestResults/html" />
106 </delete>
107 <mkdir dir="./UnitTestResults"/>
108 </target>
109
110 <target name="UnitTestReport">
111 <echo message=" ******************** Format JUnit Results *************************"/>
112 <junitreport todir="./UnitTestResults" tofile="UnitTests.xml">
113 <fileset dir="./UnitTestResults">
114 <include name="TEST-*.xml"/>
115 </fileset>
116 <report format="frames" todir="./UnitTestResults/html"/>
117 </junitreport>
118 <echo message=" ******************** End Format JUnit Results **********************"/>
119 </target>
120
121 <target name="debug" description="Debugging Build Process" >
122
123 </target>
124
125 <target name="echo_vars" description="Echo variables target." >
126 <echo message="netbeans.home = ${netbeans.home}" />
127 </target>
128
129 <target name="xsd" description="xsd">
130 <echo message="**** Converting XSD's to Jar's ************ "/>
131 <taskdef name="xjc" classname="com.sun.tools.xjc.XJCTask">
132 <classpath>
133 <fileset dir="${caps.netbeans.home}/java2/modules/ext/jaxws21/" includes="*.jar" />
134 </classpath>
135 </taskdef>
136 <mkdir dir="${ProductionDirectory}/CommonBin"/>
137 <mkdir dir="${ProductionDirectory}/Interfaces/Agency/temp/src"/>
138 <mkdir dir="${ProductionDirectory}/Interfaces/Agency/temp/build/classes"/>
139 <mkdir dir="${ProductionDirectory}/Interfaces/temp/src"/>
140 <mkdir dir="${ProductionDirectory}/Interfaces/temp/build/classes"/>
141 <xjc package="gov.hhs.fha.nhinc.adaptermodel" destdir="${ProductionDirectory}/Interfaces/Agency/temp/src">
142 <schema dir="${ProductionDirectory}/Interfaces/src/schemas/Agency" includes="*.xsd"/>
143 </xjc>
144 <xjc package="gov.hhs.fha.nhinc.nhiemodel.ebRS" destdir="${ProductionDirectory}/Interfaces/temp/src">
145 <schema dir="${ProductionDirectory}/Interfaces/src/schemas/ebRS" includes="*.xsd"/>
146 </xjc>
147 <xjc package="gov.hhs.fha.nhinc.nhiemodel.ihe" destdir="${ProductionDirectory}/Interfaces/temp/src">
148 <schema dir="${ProductionDirectory}/Interfaces/src/schemas/ihe" includes="*.xsd"/>
149 </xjc>
150 <javac srcdir="${ProductionDirectory}/Interfaces/Agency/temp/src"
151 destdir="${ProductionDirectory}/Interfaces/Agency/temp/build/classes" />
152 <javac srcdir="${ProductionDirectory}/Interfaces/temp/src"
153 destdir="${ProductionDirectory}/Interfaces/temp/build/classes" />
154 <delete file="${ProductionDirectory}/CommonBin/adaptermodels.jar"/>
155 <delete file="${ProductionDirectory}/CommonBin/nhiemodels.jar"/>
156 <jar destfile="${ProductionDirectory}/CommonBin/adaptermodels.jar"
157 basedir="${ProductionDirectory}/Interfaces/Agency/temp/build/classes"
158 excludes="**/Test.class" />
159 <jar destfile="${ProductionDirectory}/CommonBin/nhiemodels.jar"
160 basedir="${ProductionDirectory}/Interfaces/temp/build/classes"
161 excludes="**/Test.class" />
162 <delete includeEmptyDirs="true">
163 <fileset dir="${ProductionDirectory}/Interfaces/Agency/temp"/>
164 <fileset dir="${ProductionDirectory}/Interfaces/temp"/>
165 </delete>
166 </target>
167
168</project>
Note: See TracBrowser for help on using the repository browser.