Package org.fhirfrog.frog.ant
Class FhirInitTask
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
org.fhirfrog.frog.ant.FhirInitTask
- All Implemented Interfaces:
Cloneable
public class FhirInitTask
extends org.apache.tools.ant.Task
Ant task that generates Docker Compose and HAPI FHIR configuration files from
an IG's
sushi-config.yaml.
Reads the IG's declared dependencies, resolves transitive dependencies via the
local FHIR package cache (~/.fhir/packages), classifies packages by FHIR
version (R4 vs R5), and generates:
<outputDir>/application.yaml— HAPI bootstrap configuration; includespackageUrl: file://...for anydev/currentpackage found in the local cache, so HAPI loads it from a mounted tgz rather than the registry<outputDir>/application-test.yaml— same but withoutpackageUrlentries, safe for the test container which has no packages volume<outputDir>/docker-compose.yml— Docker Compose file withbootstrapandtestprofiles<outputDir>/packages/*.tgz— tgz archives for eachdev/currentpackage, created from the local FHIR cache viaNpmPackage.save(java.io.OutputStream)
Prerequisites
The FHIR package cache must be populated before running this task.
Running SUSHI (sushi .) or the HL7 publisher (java -jar publisher.jar -ig ig.ini)
populates the cache as a side effect.
Example
<fhirinit igConfig="sushi-config.yaml"
fhirVersion="R4"
outputDir=".fhir-frog"
imageTag="hapi-erequesting:0.2.0"/>
-
Field Summary
Fields inherited from class org.apache.tools.ant.Task
target, taskName, taskType, wrapperFields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute()voidsetFhirVersion(String fhirVersion) voidsetIgConfig(String igConfig) voidsetImageTag(String imageTag) voidsetOutputDir(String outputDir) Methods inherited from class org.apache.tools.ant.Task
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskTypeMethods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
-
Constructor Details
-
FhirInitTask
public FhirInitTask()
-
-
Method Details
-
setIgConfig
-
setFhirVersion
-
setOutputDir
-
setImageTag
-
execute
public void execute() throws org.apache.tools.ant.BuildException- Overrides:
executein classorg.apache.tools.ant.Task- Throws:
org.apache.tools.ant.BuildException
-