Merge branch 'generic-tinder-from-model'
This commit is contained in:
commit
cef7678eb0
|
@ -1,128 +1,128 @@
|
|||
target/
|
||||
/bin
|
||||
|
||||
# Created by https://www.gitignore.io
|
||||
|
||||
### Java ###
|
||||
*.class
|
||||
|
||||
# Mobile Tools for Java (J2ME)
|
||||
.mtj.tmp/
|
||||
|
||||
# Package Files #
|
||||
*.jar
|
||||
*.war
|
||||
*.ear
|
||||
|
||||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
||||
hs_err_pid*
|
||||
|
||||
|
||||
### Maven ###
|
||||
target/
|
||||
pom.xml.tag
|
||||
pom.xml.releaseBackup
|
||||
pom.xml.versionsBackup
|
||||
pom.xml.next
|
||||
release.properties
|
||||
dependency-reduced-pom.xml
|
||||
buildNumber.properties
|
||||
|
||||
|
||||
### Vim ###
|
||||
[._]*.s[a-w][a-z]
|
||||
[._]s[a-w][a-z]
|
||||
*.un~
|
||||
Session.vim
|
||||
.netrwhist
|
||||
*~
|
||||
|
||||
|
||||
### Intellij ###
|
||||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm
|
||||
|
||||
*.iml
|
||||
|
||||
## Directory-based project format:
|
||||
.idea/
|
||||
# if you remove the above rule, at least ignore the following:
|
||||
|
||||
# User-specific stuff:
|
||||
# .idea/workspace.xml
|
||||
# .idea/tasks.xml
|
||||
# .idea/dictionaries
|
||||
|
||||
# Sensitive or high-churn files:
|
||||
# .idea/dataSources.ids
|
||||
# .idea/dataSources.xml
|
||||
# .idea/sqlDataSources.xml
|
||||
# .idea/dynamic.xml
|
||||
# .idea/uiDesigner.xml
|
||||
|
||||
# Gradle:
|
||||
# .idea/gradle.xml
|
||||
# .idea/libraries
|
||||
|
||||
# Mongo Explorer plugin:
|
||||
# .idea/mongoSettings.xml
|
||||
|
||||
## File-based project format:
|
||||
*.ipr
|
||||
*.iws
|
||||
|
||||
## Plugin-specific files:
|
||||
|
||||
# IntelliJ
|
||||
/out/
|
||||
|
||||
# mpeltonen/sbt-idea plugin
|
||||
.idea_modules/
|
||||
|
||||
# JIRA plugin
|
||||
atlassian-ide-plugin.xml
|
||||
|
||||
# Crashlytics plugin (for Android Studio and IntelliJ)
|
||||
com_crashlytics_export_strings.xml
|
||||
crashlytics.properties
|
||||
crashlytics-build.properties
|
||||
|
||||
|
||||
|
||||
### Eclipse ###
|
||||
*.pydevproject
|
||||
.metadata
|
||||
.gradle
|
||||
bin/
|
||||
tmp/
|
||||
*.tmp
|
||||
*.bak
|
||||
*.swp
|
||||
*~.nib
|
||||
local.properties
|
||||
.settings/
|
||||
.loadpath
|
||||
|
||||
# Eclipse Core
|
||||
.project
|
||||
|
||||
# External tool builders
|
||||
.externalToolBuilders/
|
||||
|
||||
# Locally stored "Eclipse launch configurations"
|
||||
*.launch
|
||||
|
||||
# CDT-specific
|
||||
.cproject
|
||||
|
||||
# JDT-specific (Eclipse Java Development Tools)
|
||||
.classpath
|
||||
|
||||
# PDT-specific
|
||||
.buildpath
|
||||
|
||||
# sbteclipse plugin
|
||||
.target
|
||||
|
||||
# TeXlipse plugin
|
||||
.texlipse
|
||||
|
||||
target/
|
||||
/bin
|
||||
|
||||
# Created by https://www.gitignore.io
|
||||
|
||||
### Java ###
|
||||
*.class
|
||||
|
||||
# Mobile Tools for Java (J2ME)
|
||||
.mtj.tmp/
|
||||
|
||||
# Package Files #
|
||||
*.jar
|
||||
*.war
|
||||
*.ear
|
||||
|
||||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
||||
hs_err_pid*
|
||||
|
||||
|
||||
### Maven ###
|
||||
target/
|
||||
pom.xml.tag
|
||||
pom.xml.releaseBackup
|
||||
pom.xml.versionsBackup
|
||||
pom.xml.next
|
||||
release.properties
|
||||
dependency-reduced-pom.xml
|
||||
buildNumber.properties
|
||||
|
||||
|
||||
### Vim ###
|
||||
[._]*.s[a-w][a-z]
|
||||
[._]s[a-w][a-z]
|
||||
*.un~
|
||||
Session.vim
|
||||
.netrwhist
|
||||
*~
|
||||
|
||||
|
||||
### Intellij ###
|
||||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm
|
||||
|
||||
*.iml
|
||||
|
||||
## Directory-based project format:
|
||||
.idea/
|
||||
# if you remove the above rule, at least ignore the following:
|
||||
|
||||
# User-specific stuff:
|
||||
# .idea/workspace.xml
|
||||
# .idea/tasks.xml
|
||||
# .idea/dictionaries
|
||||
|
||||
# Sensitive or high-churn files:
|
||||
# .idea/dataSources.ids
|
||||
# .idea/dataSources.xml
|
||||
# .idea/sqlDataSources.xml
|
||||
# .idea/dynamic.xml
|
||||
# .idea/uiDesigner.xml
|
||||
|
||||
# Gradle:
|
||||
# .idea/gradle.xml
|
||||
# .idea/libraries
|
||||
|
||||
# Mongo Explorer plugin:
|
||||
# .idea/mongoSettings.xml
|
||||
|
||||
## File-based project format:
|
||||
*.ipr
|
||||
*.iws
|
||||
|
||||
## Plugin-specific files:
|
||||
|
||||
# IntelliJ
|
||||
/out/
|
||||
|
||||
# mpeltonen/sbt-idea plugin
|
||||
.idea_modules/
|
||||
|
||||
# JIRA plugin
|
||||
atlassian-ide-plugin.xml
|
||||
|
||||
# Crashlytics plugin (for Android Studio and IntelliJ)
|
||||
com_crashlytics_export_strings.xml
|
||||
crashlytics.properties
|
||||
crashlytics-build.properties
|
||||
|
||||
|
||||
|
||||
### Eclipse ###
|
||||
*.pydevproject
|
||||
.metadata
|
||||
.gradle
|
||||
bin/
|
||||
tmp/
|
||||
*.tmp
|
||||
*.bak
|
||||
*.swp
|
||||
*~.nib
|
||||
local.properties
|
||||
.settings/
|
||||
.loadpath
|
||||
|
||||
# Eclipse Core
|
||||
.project
|
||||
|
||||
# External tool builders
|
||||
.externalToolBuilders/
|
||||
|
||||
# Locally stored "Eclipse launch configurations"
|
||||
*.launch
|
||||
|
||||
# CDT-specific
|
||||
.cproject
|
||||
|
||||
# JDT-specific (Eclipse Java Development Tools)
|
||||
.classpath
|
||||
|
||||
# PDT-specific
|
||||
.buildpath
|
||||
|
||||
# sbteclipse plugin
|
||||
.target
|
||||
|
||||
# TeXlipse plugin
|
||||
.texlipse
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@ package ca.uhn.fhir.tinder;
|
|||
|
||||
import ca.uhn.fhir.context.FhirContext;
|
||||
import ca.uhn.fhir.context.FhirVersionEnum;
|
||||
import ca.uhn.fhir.tinder.GeneratorContext.ResourceSource;
|
||||
import ca.uhn.fhir.tinder.parser.BaseStructureParser;
|
||||
import ca.uhn.fhir.tinder.parser.DatatypeGeneratorUsingSpreadsheet;
|
||||
import ca.uhn.fhir.tinder.parser.ResourceGeneratorUsingModel;
|
||||
|
@ -112,35 +113,37 @@ public abstract class AbstractGenerator {
|
|||
DatatypeGeneratorUsingSpreadsheet dtp = null;
|
||||
Map<String, String> datatypeLocalImports = new HashMap<String, String>();
|
||||
|
||||
vsp = new ValueSetGenerator(context.getVersion());
|
||||
vsp.setResourceValueSetFiles(context.getValueSetFiles());
|
||||
context.setValueSetGenerator(vsp);
|
||||
try {
|
||||
vsp.parse();
|
||||
} catch (Exception e) {
|
||||
throw new FailureException("Failed to load valuesets", e);
|
||||
if (ResourceSource.SPREADSHEET.equals(context.getResourceSource())) {
|
||||
vsp = new ValueSetGenerator(context.getVersion());
|
||||
vsp.setResourceValueSetFiles(context.getValueSetFiles());
|
||||
context.setValueSetGenerator(vsp);
|
||||
try {
|
||||
vsp.parse();
|
||||
} catch (Exception e) {
|
||||
throw new FailureException("Failed to load valuesets", e);
|
||||
}
|
||||
|
||||
/*
|
||||
* A few enums are not found by default because none of the generated classes
|
||||
* refer to them, but we still want them.
|
||||
*/
|
||||
vsp.getClassForValueSetIdAndMarkAsNeeded("NarrativeStatus");
|
||||
|
||||
logInfo("Loading Datatypes...");
|
||||
|
||||
dtp = new DatatypeGeneratorUsingSpreadsheet(context.getVersion(), context.getBaseDir());
|
||||
context.setDatatypeGenerator(dtp);
|
||||
try {
|
||||
dtp.parse();
|
||||
dtp.markResourcesForImports();
|
||||
} catch (Exception e) {
|
||||
throw new FailureException("Failed to load datatypes", e);
|
||||
}
|
||||
dtp.bindValueSets(vsp);
|
||||
|
||||
datatypeLocalImports = dtp.getLocalImports();
|
||||
}
|
||||
|
||||
/*
|
||||
* A few enums are not found by default because none of the generated classes
|
||||
* refer to them, but we still want them.
|
||||
*/
|
||||
vsp.getClassForValueSetIdAndMarkAsNeeded("NarrativeStatus");
|
||||
|
||||
logInfo("Loading Datatypes...");
|
||||
|
||||
dtp = new DatatypeGeneratorUsingSpreadsheet(context.getVersion(), context.getBaseDir());
|
||||
context.setDatatypeGenerator(dtp);
|
||||
try {
|
||||
dtp.parse();
|
||||
dtp.markResourcesForImports();
|
||||
} catch (Exception e) {
|
||||
throw new FailureException("Failed to load datatypes", e);
|
||||
}
|
||||
dtp.bindValueSets(vsp);
|
||||
|
||||
datatypeLocalImports = dtp.getLocalImports();
|
||||
|
||||
/*
|
||||
* Load the requested resources
|
||||
*/
|
||||
|
@ -173,6 +176,7 @@ public abstract class AbstractGenerator {
|
|||
|
||||
rp.setBaseResourceNames(includeResources);
|
||||
rp.parse();
|
||||
rp.markResourcesForImports();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,6 +16,7 @@ import org.apache.maven.project.MavenProject;
|
|||
|
||||
import ca.uhn.fhir.tinder.AbstractGenerator.ExecutionException;
|
||||
import ca.uhn.fhir.tinder.AbstractGenerator.FailureException;
|
||||
import ca.uhn.fhir.tinder.GeneratorContext.ResourceSource;
|
||||
import ca.uhn.fhir.tinder.TinderStructuresMojo.ValueSetFileDefinition;
|
||||
import ca.uhn.fhir.tinder.parser.BaseStructureParser;
|
||||
import ca.uhn.fhir.tinder.parser.DatatypeGeneratorUsingSpreadsheet;
|
||||
|
@ -76,7 +77,8 @@ import ca.uhn.fhir.tinder.parser.TargetType;
|
|||
* <td valign="top">Which source of resource definitions should be processed? Valid values are:<br>
|
||||
* <ul>
|
||||
* <li><code><b>spreadsheet</b></code> to cause resources to be generated based on the FHIR spreadsheets</li>
|
||||
* <li><code><b>model</b></code> to cause resources to be generated based on the model structure classes</li></ul></td>
|
||||
* <li><code><b>model</b></code> to cause resources to be generated based on the model structure classes. Note that
|
||||
* <code>generateResources</code> is the only one of the above options that can be used when <code>model</code> is specified.</li></ul></td>
|
||||
* <td valign="top" align="center">No. Defaults to: <code><b>spreadsheet</b></code></td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
|
@ -276,6 +278,14 @@ public class TinderGenericMultiFileMojo extends AbstractMojo {
|
|||
context.setExcludeResources(excludeResources);
|
||||
context.setResourceSource(resourceSource);
|
||||
context.setValueSetFiles(valueSetFiles);
|
||||
if (ResourceSource.MODEL.equals(context.getResourceSource())) {
|
||||
if (generateDatatypes) {
|
||||
throw new MojoFailureException("Cannot use \"generateDatatypes\" when resourceSource=model");
|
||||
}
|
||||
if (generateValueSets) {
|
||||
throw new MojoFailureException("Cannot use \"generateValueSets\" when resourceSource=model");
|
||||
}
|
||||
}
|
||||
|
||||
generator.prepare(context);
|
||||
} catch (ExecutionException e) {
|
||||
|
|
|
@ -25,6 +25,7 @@ import org.apache.velocity.tools.generic.EscapeTool;
|
|||
|
||||
import ca.uhn.fhir.tinder.AbstractGenerator.ExecutionException;
|
||||
import ca.uhn.fhir.tinder.AbstractGenerator.FailureException;
|
||||
import ca.uhn.fhir.tinder.GeneratorContext.ResourceSource;
|
||||
import ca.uhn.fhir.tinder.TinderStructuresMojo.ValueSetFileDefinition;
|
||||
import ca.uhn.fhir.tinder.parser.BaseStructureParser;
|
||||
import ca.uhn.fhir.tinder.parser.BaseStructureSpreadsheetParser;
|
||||
|
@ -76,7 +77,8 @@ import ca.uhn.fhir.tinder.parser.TargetType;
|
|||
* <td valign="top">Which source of resource definitions should be processed? Valid values are:<br>
|
||||
* <ul>
|
||||
* <li><code><b>spreadsheet</b></code> to cause resources to be generated based on the FHIR spreadsheets</li>
|
||||
* <li><code><b>model</b></code> to cause resources to be generated based on the model structure classes</li></ul></td>
|
||||
* <li><code><b>model</b></code> to cause resources to be generated based on the model structure classes. Note that
|
||||
* <code>generateResources</code> is the only one of the above options that can be used when <code>model</code> is specified.</li></ul></td>
|
||||
* <td valign="top" align="center">No. Defaults to: <code><b>spreadsheet</b></code></td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
|
@ -269,6 +271,11 @@ public class TinderGenericSingleFileMojo extends AbstractMojo {
|
|||
context.setExcludeResources(excludeResources);
|
||||
context.setResourceSource(resourceSource);
|
||||
context.setValueSetFiles(valueSetFiles);
|
||||
if (ResourceSource.MODEL.equals(context.getResourceSource())) {
|
||||
if (generateDatatypes) {
|
||||
throw new MojoFailureException("Cannot use \"generateDatatypes\" when resourceSource=model");
|
||||
}
|
||||
}
|
||||
|
||||
generator.prepare(context);
|
||||
} catch (ExecutionException e) {
|
||||
|
|
|
@ -41,6 +41,7 @@ import ca.uhn.fhir.tinder.AbstractGenerator;
|
|||
import ca.uhn.fhir.tinder.AbstractGenerator.ExecutionException;
|
||||
import ca.uhn.fhir.tinder.AbstractGenerator.FailureException;
|
||||
import ca.uhn.fhir.tinder.GeneratorContext;
|
||||
import ca.uhn.fhir.tinder.GeneratorContext.ResourceSource;
|
||||
import ca.uhn.fhir.tinder.TinderStructuresMojo.ValueSetFileDefinition;
|
||||
import ca.uhn.fhir.tinder.ValueSetGenerator;
|
||||
import ca.uhn.fhir.tinder.VelocityHelper;
|
||||
|
@ -107,7 +108,8 @@ import ca.uhn.fhir.tinder.parser.TargetType;
|
|||
* <td valign="top">Which source of resource definitions should be processed? Valid values are:<br>
|
||||
* <ul>
|
||||
* <li><code><b>spreadsheet</b></code> to cause resources to be generated based on the FHIR spreadsheets</li>
|
||||
* <li><code><b>model</b></code> to cause resources to be generated based on the model structure classes</li></ul></td>
|
||||
* <li><code><b>model</b></code> to cause resources to be generated based on the model structure classes. Note that
|
||||
* <code>generateResources</code> is the only one of the above options that can be used when <code>model</code> is specified.</li></ul></td>
|
||||
* <td valign="top" align="center">No. Defaults to: <code><b>spreadsheet</b></code></td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
|
@ -327,6 +329,14 @@ public class TinderGeneratorTask extends Task {
|
|||
context.setExcludeResources(excludeResources);
|
||||
context.setResourceSource(resourceSource);
|
||||
context.setValueSetFiles(valueSetFiles);
|
||||
if (ResourceSource.MODEL.equals(context.getResourceSource())) {
|
||||
if (generateDatatypes) {
|
||||
throw new BuildException("Cannot use \"generateDatatypes\" when resourceSource=model");
|
||||
}
|
||||
if (generateValueSets) {
|
||||
throw new BuildException("Cannot use \"generateValueSets\" when resourceSource=model");
|
||||
}
|
||||
}
|
||||
|
||||
generator.prepare(context);
|
||||
} catch (ExecutionException e) {
|
||||
|
|
|
@ -1,420 +1,489 @@
|
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir</artifactId>
|
||||
<version>3.6.0-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<artifactId>hapi-tinder-test</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>HAPI Tinder Plugin - Test Project</name>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-base</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-structures-dstu2</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<!-- Because Tinder is a part of the HAPI FHIR build process (it generates a bunch of the actual HAPI structure code), but also uses HAPI FHIR in order to run (e.g. to load ValueSet resources), we keep
|
||||
the dependencies for the structures a version behind the main library. This is weird, but it works. -->
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-structures-dstu2.1</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-base</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-structures-dstu3</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-structures-hl7org-dstu2</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-validation-resources-dstu2</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-validation-resources-dstu3</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<!-- <plugin> <groupId>ca.uhn.hapi.fhir</groupId> <artifactId>hapi-tinder-plugin</artifactId> <version>1.0-SNAPSHOT</version> <executions> <execution> <id>structs</id> <goals> <goal>generate-structures</goal>
|
||||
</goals> <configuration> <package>ca.uhn.tindertest</package> <baseResourceNames> <baseResourceName>patient</baseResourceName> <baseResourceName>valueset</baseResourceName> <baseResourceName>organization</baseResourceName>
|
||||
<baseResourceName>device</baseResourceName> <baseResourceName>location</baseResourceName> <baseResourceName>practitioner</baseResourceName> </baseResourceNames> </configuration> </execution> <execution>
|
||||
<id>client</id> <goals> <goal>generate-client</goal> </goals> <configuration> <clientClassName>ca.uhn.hitest.HiTest</clientClassName> <serverBaseHref>http://fhir.healthintersections.com.au/open</serverBaseHref>
|
||||
<generateSearchForAllParams>true</generateSearchForAllParams> </configuration> </execution> </executions> </plugin> -->
|
||||
|
||||
<plugin>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-tinder-plugin</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-base</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-structures-dstu2</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-structures-dstu2.1</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-base</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-structures-dstu3</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-structures-hl7org-dstu2</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-validation-resources-dstu2</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-validation-resources-dstu3</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<executions>
|
||||
<!--
|
||||
<execution>
|
||||
<id>custom-structs</id>
|
||||
<goals>
|
||||
<goal>generate-structures</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<package>ca.uhn.test.customstructs</package>
|
||||
<profileHttpBase>http://foo</profileHttpBase>
|
||||
<version>dstu</version>
|
||||
<resourceProfileFiles>
|
||||
<resourceProfileFile>
|
||||
<profileFile>${project.basedir}/src/test/resources/profile/patient.xml</profileFile>
|
||||
<profileSourceUrl>http://foo1</profileSourceUrl>
|
||||
</resourceProfileFile>
|
||||
<resourceProfileFile>
|
||||
<profileFile>${project.basedir}/src/test/resources/profile/organization.xml</profileFile>
|
||||
<profileSourceUrl>http://foo1</profileSourceUrl>
|
||||
</resourceProfileFile>
|
||||
</resourceProfileFiles>
|
||||
<resourceValueSetFiles>
|
||||
<resourceValueSetFile>
|
||||
<valueSetFile>${project.basedir}/src/test/resources/valueset/valueset-cgta-patientidpool.xml</valueSetFile>
|
||||
</resourceValueSetFile>
|
||||
<resourceValueSetFile>
|
||||
<valueSetFile>${project.basedir}/src/test/resources/valueset/valueset-cgta-provideridpool.xml</valueSetFile>
|
||||
</resourceValueSetFile>
|
||||
</resourceValueSetFiles>
|
||||
</configuration>
|
||||
</execution>
|
||||
-->
|
||||
<execution>
|
||||
<id>generalstructs</id>
|
||||
<goals>
|
||||
<goal>generate-structures</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<package>ca.uhn.test.realstructs</package>
|
||||
<version>dstu2</version>
|
||||
<baseResourceNames>
|
||||
<baseResourceName>patient</baseResourceName>
|
||||
<baseResourceName>valueset</baseResourceName>
|
||||
<baseResourceName>organization</baseResourceName>
|
||||
<baseResourceName>device</baseResourceName>
|
||||
<baseResourceName>location</baseResourceName>
|
||||
<baseResourceName>practitioner</baseResourceName>
|
||||
<baseResourceName>list</baseResourceName>
|
||||
<baseResourceName>auditevent</baseResourceName>
|
||||
</baseResourceNames>
|
||||
<buildDatatypes>true</buildDatatypes>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>generic_multi</id>
|
||||
<goals>
|
||||
<goal>generate-multi-files</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<version>dstu2</version>
|
||||
<generateResources>true</generateResources>
|
||||
<templateFile>${project.basedir}/src/test/resources/templates/resource_test.vm</templateFile>
|
||||
<targetSourceDirectory>${project.build.directory}/generated-sources/tinder</targetSourceDirectory>
|
||||
<targetPackage>ca.uhn.test.generic.multi</targetPackage>
|
||||
<filenameSuffix>ResourceTest.java</filenameSuffix>
|
||||
<includeResources>
|
||||
<includeResource>patient</includeResource>
|
||||
<includeResource>organization</includeResource>
|
||||
</includeResources>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>generic_multi_json</id>
|
||||
<goals>
|
||||
<goal>generate-multi-files</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<version>dstu2</version>
|
||||
<generateResources>true</generateResources>
|
||||
<templateFile>${project.basedir}/src/test/resources/templates/resource_map.vm</templateFile>
|
||||
<velocityPath>${project.basedir}/src/test/resources/macros</velocityPath>
|
||||
<targetResourceDirectory>${project.build.directory}/generated-resources/tinder</targetResourceDirectory>
|
||||
<targetFolder>maps</targetFolder>
|
||||
<filenameSuffix>_Map.json</filenameSuffix>
|
||||
<includeResources>
|
||||
<includeResource>patient</includeResource>
|
||||
<includeResource>organization</includeResource>
|
||||
<includeResource>bundle</includeResource>
|
||||
<includeResource>composition</includeResource>
|
||||
</includeResources>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>generic_single</id>
|
||||
<goals>
|
||||
<goal>generate-single-file</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<version>dstu2</version>
|
||||
<generateResources>true</generateResources>
|
||||
<templateFile>${project.basedir}/src/test/resources/templates/resource_test_beans_java.vm</templateFile>
|
||||
<targetSourceDirectory>${project.build.directory}/generated-sources/tinder</targetSourceDirectory>
|
||||
<targetPackage>ca.uhn.test.generic.single</targetPackage>
|
||||
<packageBase>ca.uhn.test.generic.multi</packageBase>
|
||||
<targetFile>TestConfigDstu2.java</targetFile>
|
||||
<includeResources>
|
||||
<includeResource>patient</includeResource>
|
||||
<includeResource>organization</includeResource>
|
||||
</includeResources>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>generic_single_json</id>
|
||||
<goals>
|
||||
<goal>generate-single-file</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<version>dstu2</version>
|
||||
<generateDatatypes>true</generateDatatypes>
|
||||
<templateFile>${project.basedir}/src/test/resources/templates/composite_map.vm</templateFile>
|
||||
<velocityPath>${project.basedir}/src/test/resources/macros</velocityPath>
|
||||
<targetResourceDirectory>${project.build.directory}/generated-resources/tinder</targetResourceDirectory>
|
||||
<targetFolder>maps</targetFolder>
|
||||
<targetFile>Datatypes_Dstu2.json</targetFile>
|
||||
<includeResources>
|
||||
<includeResource>patient</includeResource>
|
||||
<includeResource>organization</includeResource>
|
||||
</includeResources>
|
||||
</configuration>
|
||||
</execution>
|
||||
<!-- <execution> <id>client</id> <goals> <goal>generate-client</goal> </goals> <configuration> <clientClassName>ca.uhn.hitest.HiTest</clientClassName> <serverBaseHref>http://fhir.healthintersections.com.au/open</serverBaseHref>
|
||||
<generateSearchForAllParams>true</generateSearchForAllParams> </configuration> </execution> -->
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>testTinderTask</id>
|
||||
<phase>generate-sources</phase>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<target>
|
||||
<taskdef name="hapi-tinder" classname="ca.uhn.fhir.tinder.ant.TinderGeneratorTask" classpathref="maven.plugin.classpath" />
|
||||
|
||||
<hapi-tinder templateFile="${project.basedir}/src/test/resources/templates/resource_test.vm" generateResources="true" targetSourceDirectory="${project.build.directory}/generated-sources/tinder"
|
||||
targetPackage="ca.uhn.test.ant.multi" filenameSuffix="ResourceTest.java" projectHome="${project.basedir}/.." version="dstu2" includeResources="patient,organization" />
|
||||
|
||||
<hapi-tinder templateFile="${project.basedir}/src/test/resources/templates/resource_test_beans_java.vm" generateResources="true" targetSourceDirectory="${project.build.directory}/generated-sources/tinder"
|
||||
targetFile="TestConfigDstu2.java" targetPackage="ca.uhn.test.ant.single" packageBase="ca.uhn.test.ant.multi" projectHome="${project.basedir}/.." version="dstu2" includeResources="patient,organization" />
|
||||
|
||||
</target>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-base</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-structures-dstu2</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-structures-dstu2.1</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-base</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-structures-dstu3</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-structures-hl7org-dstu2</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-validation-resources-dstu2</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-validation-resources-dstu3</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-tinder-plugin</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-deploy-plugin</artifactId>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>build-helper-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>add-source</id>
|
||||
<phase>generate-sources</phase>
|
||||
<goals>
|
||||
<goal>add-source</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<sources>
|
||||
<source>target/generated-sources/tinder</source>
|
||||
</sources>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself. -->
|
||||
<plugin>
|
||||
<groupId>org.eclipse.m2e</groupId>
|
||||
<artifactId>lifecycle-mapping</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<configuration>
|
||||
<lifecycleMappingMetadata>
|
||||
<pluginExecutions>
|
||||
<pluginExecution>
|
||||
<pluginExecutionFilter>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-tinder-plugin</artifactId>
|
||||
<versionRange>[0.4-SNAPSHOT,)</versionRange>
|
||||
<goals>
|
||||
<goal>generate-structures</goal>
|
||||
</goals>
|
||||
</pluginExecutionFilter>
|
||||
<action>
|
||||
<ignore></ignore>
|
||||
</action>
|
||||
</pluginExecution>
|
||||
<pluginExecution>
|
||||
<pluginExecutionFilter>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-tinder-plugin</artifactId>
|
||||
<versionRange>[0.4-SNAPSHOT,)</versionRange>
|
||||
<goals>
|
||||
<goal>generate-multi-files</goal>
|
||||
</goals>
|
||||
</pluginExecutionFilter>
|
||||
<action>
|
||||
<ignore></ignore>
|
||||
</action>
|
||||
</pluginExecution>
|
||||
<pluginExecution>
|
||||
<pluginExecutionFilter>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-tinder-plugin</artifactId>
|
||||
<versionRange>[0.4-SNAPSHOT,)</versionRange>
|
||||
<goals>
|
||||
<goal>generate-single-file</goal>
|
||||
</goals>
|
||||
</pluginExecutionFilter>
|
||||
<action>
|
||||
<ignore></ignore>
|
||||
</action>
|
||||
</pluginExecution>
|
||||
</pluginExecutions>
|
||||
</lifecycleMappingMetadata>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>${basedir}/src/main/resources</directory>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>${basedir}/target/generated-resources/tinder</directory>
|
||||
</resource>
|
||||
</resources>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir</artifactId>
|
||||
<version>3.6.0-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<artifactId>hapi-tinder-test</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>HAPI Tinder Plugin - Test Project</name>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-base</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-structures-dstu2</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<!-- Because Tinder is a part of the HAPI FHIR build process (it generates a bunch of the actual HAPI structure code), but also uses HAPI FHIR in order to run (e.g. to load ValueSet resources), we keep
|
||||
the dependencies for the structures a version behind the main library. This is weird, but it works. -->
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-structures-dstu2.1</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-base</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-structures-dstu3</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-structures-hl7org-dstu2</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-validation-resources-dstu2</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-validation-resources-dstu3</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<!-- <plugin> <groupId>ca.uhn.hapi.fhir</groupId> <artifactId>hapi-tinder-plugin</artifactId> <version>1.0-SNAPSHOT</version> <executions> <execution> <id>structs</id> <goals> <goal>generate-structures</goal>
|
||||
</goals> <configuration> <package>ca.uhn.tindertest</package> <baseResourceNames> <baseResourceName>patient</baseResourceName> <baseResourceName>valueset</baseResourceName> <baseResourceName>organization</baseResourceName>
|
||||
<baseResourceName>device</baseResourceName> <baseResourceName>location</baseResourceName> <baseResourceName>practitioner</baseResourceName> </baseResourceNames> </configuration> </execution> <execution>
|
||||
<id>client</id> <goals> <goal>generate-client</goal> </goals> <configuration> <clientClassName>ca.uhn.hitest.HiTest</clientClassName> <serverBaseHref>http://fhir.healthintersections.com.au/open</serverBaseHref>
|
||||
<generateSearchForAllParams>true</generateSearchForAllParams> </configuration> </execution> </executions> </plugin> -->
|
||||
|
||||
<plugin>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-tinder-plugin</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-base</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-structures-dstu2</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-structures-dstu2.1</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-base</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-structures-dstu3</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-structures-r4</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-structures-hl7org-dstu2</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-validation-resources-dstu2</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-validation-resources-dstu3</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-validation-resources-r4</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<executions>
|
||||
<!--
|
||||
<execution>
|
||||
<id>custom-structs</id>
|
||||
<goals>
|
||||
<goal>generate-structures</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<package>ca.uhn.test.customstructs</package>
|
||||
<profileHttpBase>http://foo</profileHttpBase>
|
||||
<version>dstu</version>
|
||||
<resourceProfileFiles>
|
||||
<resourceProfileFile>
|
||||
<profileFile>${project.basedir}/src/test/resources/profile/patient.xml</profileFile>
|
||||
<profileSourceUrl>http://foo1</profileSourceUrl>
|
||||
</resourceProfileFile>
|
||||
<resourceProfileFile>
|
||||
<profileFile>${project.basedir}/src/test/resources/profile/organization.xml</profileFile>
|
||||
<profileSourceUrl>http://foo1</profileSourceUrl>
|
||||
</resourceProfileFile>
|
||||
</resourceProfileFiles>
|
||||
<resourceValueSetFiles>
|
||||
<resourceValueSetFile>
|
||||
<valueSetFile>${project.basedir}/src/test/resources/valueset/valueset-cgta-patientidpool.xml</valueSetFile>
|
||||
</resourceValueSetFile>
|
||||
<resourceValueSetFile>
|
||||
<valueSetFile>${project.basedir}/src/test/resources/valueset/valueset-cgta-provideridpool.xml</valueSetFile>
|
||||
</resourceValueSetFile>
|
||||
</resourceValueSetFiles>
|
||||
</configuration>
|
||||
</execution>
|
||||
-->
|
||||
<execution>
|
||||
<id>generalstructs</id>
|
||||
<goals>
|
||||
<goal>generate-structures</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<package>ca.uhn.test.realstructs</package>
|
||||
<version>dstu2</version>
|
||||
<baseResourceNames>
|
||||
<baseResourceName>patient</baseResourceName>
|
||||
<baseResourceName>valueset</baseResourceName>
|
||||
<baseResourceName>organization</baseResourceName>
|
||||
<baseResourceName>device</baseResourceName>
|
||||
<baseResourceName>location</baseResourceName>
|
||||
<baseResourceName>practitioner</baseResourceName>
|
||||
<baseResourceName>list</baseResourceName>
|
||||
<baseResourceName>auditevent</baseResourceName>
|
||||
</baseResourceNames>
|
||||
<buildDatatypes>true</buildDatatypes>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>generic_multi_dstu2</id>
|
||||
<goals>
|
||||
<goal>generate-multi-files</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<version>dstu2</version>
|
||||
<generateResources>true</generateResources>
|
||||
<templateFile>${project.basedir}/src/test/resources/templates/resource_test.vm</templateFile>
|
||||
<targetSourceDirectory>${project.build.directory}/generated-sources/tinder</targetSourceDirectory>
|
||||
<targetPackage>ca.uhn.test.generic.multi</targetPackage>
|
||||
<filenameSuffix>ResourceTest.java</filenameSuffix>
|
||||
<includeResources>
|
||||
<includeResource>patient</includeResource>
|
||||
<includeResource>organization</includeResource>
|
||||
</includeResources>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>generic_multi_dstu3</id>
|
||||
<goals>
|
||||
<goal>generate-multi-files</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<version>dstu3</version>
|
||||
<generateResources>true</generateResources>
|
||||
<resourceSource>model</resourceSource>
|
||||
<templateFile>${project.basedir}/src/test/resources/templates/resource_test.vm</templateFile>
|
||||
<targetSourceDirectory>${project.build.directory}/generated-sources/tinder</targetSourceDirectory>
|
||||
<targetPackage>ca.uhn.test.generic.multi.dstu3</targetPackage>
|
||||
<filenameSuffix>ResourceTest.java</filenameSuffix>
|
||||
<includeResources>
|
||||
<includeResource>patient</includeResource>
|
||||
<includeResource>organization</includeResource>
|
||||
</includeResources>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>generic_multi_r4</id>
|
||||
<goals>
|
||||
<goal>generate-multi-files</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<version>r4</version>
|
||||
<generateResources>true</generateResources>
|
||||
<resourceSource>model</resourceSource>
|
||||
<templateFile>${project.basedir}/src/test/resources/templates/resource_test.vm</templateFile>
|
||||
<targetSourceDirectory>${project.build.directory}/generated-sources/tinder</targetSourceDirectory>
|
||||
<targetPackage>ca.uhn.test.generic.multi.r4</targetPackage>
|
||||
<filenameSuffix>ResourceTest.java</filenameSuffix>
|
||||
<includeResources>
|
||||
<includeResource>patient</includeResource>
|
||||
<includeResource>organization</includeResource>
|
||||
</includeResources>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>generic_multi_json</id>
|
||||
<goals>
|
||||
<goal>generate-multi-files</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<version>dstu2</version>
|
||||
<generateResources>true</generateResources>
|
||||
<resourceSource>spreadsheet</resourceSource>
|
||||
<templateFile>${project.basedir}/src/test/resources/templates/resource_map.vm</templateFile>
|
||||
<velocityPath>${project.basedir}/src/test/resources/macros</velocityPath>
|
||||
<targetResourceDirectory>${project.build.directory}/generated-resources/tinder</targetResourceDirectory>
|
||||
<targetFolder>maps</targetFolder>
|
||||
<filenameSuffix>_Map.json</filenameSuffix>
|
||||
<includeResources>
|
||||
<includeResource>patient</includeResource>
|
||||
<includeResource>organization</includeResource>
|
||||
<includeResource>bundle</includeResource>
|
||||
<includeResource>composition</includeResource>
|
||||
</includeResources>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>generic_single_dstu2</id>
|
||||
<goals>
|
||||
<goal>generate-single-file</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<version>dstu2</version>
|
||||
<generateResources>true</generateResources>
|
||||
<templateFile>${project.basedir}/src/test/resources/templates/resource_test_beans_java.vm</templateFile>
|
||||
<targetSourceDirectory>${project.build.directory}/generated-sources/tinder</targetSourceDirectory>
|
||||
<targetPackage>ca.uhn.test.generic.single</targetPackage>
|
||||
<packageBase>ca.uhn.test.generic.multi</packageBase>
|
||||
<targetFile>TestConfigDstu2.java</targetFile>
|
||||
<includeResources>
|
||||
<includeResource>patient</includeResource>
|
||||
<includeResource>organization</includeResource>
|
||||
</includeResources>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>generic_single_r4</id>
|
||||
<goals>
|
||||
<goal>generate-single-file</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<version>r4</version>
|
||||
<generateResources>true</generateResources>
|
||||
<resourceSource>model</resourceSource>
|
||||
<templateFile>${project.basedir}/src/test/resources/templates/resource_test_beans_java.vm</templateFile>
|
||||
<targetSourceDirectory>${project.build.directory}/generated-sources/tinder</targetSourceDirectory>
|
||||
<targetPackage>ca.uhn.test.generic.single.r4</targetPackage>
|
||||
<packageBase>ca.uhn.test.generic.multi.r4</packageBase>
|
||||
<targetFile>TestConfigR4.java</targetFile>
|
||||
<includeResources>
|
||||
<includeResource>patient</includeResource>
|
||||
<includeResource>organization</includeResource>
|
||||
</includeResources>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>generic_single_json</id>
|
||||
<goals>
|
||||
<goal>generate-single-file</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<version>dstu2</version>
|
||||
<generateDatatypes>true</generateDatatypes>
|
||||
<templateFile>${project.basedir}/src/test/resources/templates/composite_map.vm</templateFile>
|
||||
<velocityPath>${project.basedir}/src/test/resources/macros</velocityPath>
|
||||
<targetResourceDirectory>${project.build.directory}/generated-resources/tinder</targetResourceDirectory>
|
||||
<targetFolder>maps</targetFolder>
|
||||
<targetFile>Datatypes_Dstu2.json</targetFile>
|
||||
<includeResources>
|
||||
<includeResource>patient</includeResource>
|
||||
<includeResource>organization</includeResource>
|
||||
</includeResources>
|
||||
</configuration>
|
||||
</execution>
|
||||
<!-- <execution> <id>client</id> <goals> <goal>generate-client</goal> </goals> <configuration> <clientClassName>ca.uhn.hitest.HiTest</clientClassName> <serverBaseHref>http://fhir.healthintersections.com.au/open</serverBaseHref>
|
||||
<generateSearchForAllParams>true</generateSearchForAllParams> </configuration> </execution> -->
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>testTinderTask</id>
|
||||
<phase>generate-sources</phase>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<target>
|
||||
<taskdef name="hapi-tinder" classname="ca.uhn.fhir.tinder.ant.TinderGeneratorTask" classpathref="maven.plugin.classpath" />
|
||||
|
||||
<hapi-tinder templateFile="${project.basedir}/src/test/resources/templates/resource_test.vm" generateResources="true" targetSourceDirectory="${project.build.directory}/generated-sources/tinder"
|
||||
targetPackage="ca.uhn.test.ant.multi" filenameSuffix="ResourceTest.java" projectHome="${project.basedir}/.." version="dstu2" includeResources="patient,organization" />
|
||||
|
||||
<hapi-tinder templateFile="${project.basedir}/src/test/resources/templates/resource_test_beans_java.vm" generateResources="true" targetSourceDirectory="${project.build.directory}/generated-sources/tinder"
|
||||
targetFile="TestConfigDstu2.java" targetPackage="ca.uhn.test.ant.single" packageBase="ca.uhn.test.ant.multi" projectHome="${project.basedir}/.." version="dstu2" includeResources="patient,organization" />
|
||||
|
||||
</target>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-base</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-structures-dstu2</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-structures-dstu2.1</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-base</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-structures-dstu3</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-structures-hl7org-dstu2</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-validation-resources-dstu2</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-validation-resources-dstu3</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-tinder-plugin</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-deploy-plugin</artifactId>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>build-helper-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>add-source</id>
|
||||
<phase>generate-sources</phase>
|
||||
<goals>
|
||||
<goal>add-source</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<sources>
|
||||
<source>target/generated-sources/tinder</source>
|
||||
</sources>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself. -->
|
||||
<plugin>
|
||||
<groupId>org.eclipse.m2e</groupId>
|
||||
<artifactId>lifecycle-mapping</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<configuration>
|
||||
<lifecycleMappingMetadata>
|
||||
<pluginExecutions>
|
||||
<pluginExecution>
|
||||
<pluginExecutionFilter>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-tinder-plugin</artifactId>
|
||||
<versionRange>[0.4-SNAPSHOT,)</versionRange>
|
||||
<goals>
|
||||
<goal>generate-structures</goal>
|
||||
</goals>
|
||||
</pluginExecutionFilter>
|
||||
<action>
|
||||
<ignore></ignore>
|
||||
</action>
|
||||
</pluginExecution>
|
||||
<pluginExecution>
|
||||
<pluginExecutionFilter>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-tinder-plugin</artifactId>
|
||||
<versionRange>[0.4-SNAPSHOT,)</versionRange>
|
||||
<goals>
|
||||
<goal>generate-multi-files</goal>
|
||||
</goals>
|
||||
</pluginExecutionFilter>
|
||||
<action>
|
||||
<ignore></ignore>
|
||||
</action>
|
||||
</pluginExecution>
|
||||
<pluginExecution>
|
||||
<pluginExecutionFilter>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-tinder-plugin</artifactId>
|
||||
<versionRange>[0.4-SNAPSHOT,)</versionRange>
|
||||
<goals>
|
||||
<goal>generate-single-file</goal>
|
||||
</goals>
|
||||
</pluginExecutionFilter>
|
||||
<action>
|
||||
<ignore></ignore>
|
||||
</action>
|
||||
</pluginExecution>
|
||||
</pluginExecutions>
|
||||
</lifecycleMappingMetadata>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>${basedir}/src/main/resources</directory>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>${basedir}/target/generated-resources/tinder</directory>
|
||||
</resource>
|
||||
</resources>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
|
|
Loading…
Reference in New Issue