Thursday, September 24, 2009

How NHIN Connect Ant Scripts Work

global build.xml task default
- depends on build
global build.xml task build
- calls do-to-projects(do-to-target => build)
global build.xml task do-to-projects
- parses xml file build.projects.xml
- for each /projects/project
- determines project directory by directory element
- invokes ant on project's build.xml for target build (or whatever do-to-target is set to)

project build.xml task build
- sets property target-to-call to jar
- calls call-target-in-isolation-if-out-of-date

build.lib.xml task call-target-in-isolation-if-out-of-date (imported from project)
- Creates xml file named temp.xml
- writes ant script to temp.xml
- invokes ant on temp.xml target temp

temp.xml target temp
- sets property project-to-build to .
- preserves property target-to-call
- sets property base to ./lib
- imports property file ./lib/nblibraries.properties
- imports property file ./nbproject/project.properties
- calls build-project-if-out-of-date

build.lib.xml target build-project-if-out-of-date
- Checks classpath
- If need to build, invokes ant on project's build.xml target jar (or target-to-call)

project's build-impl.xml target jar
- depends on compile

project's build-impl.xml target compile
- depends on -do-compile

project's build-impl.xml target -do-compile

No comments: