rename package cache operations for clarity + new release

This commit is contained in:
Grahame Grieve 2019-02-01 06:11:01 +11:00
commit 8a9987b88f
7 changed files with 38 additions and 10 deletions

5
.editorconfig Normal file
View File

@ -0,0 +1,5 @@
[*.java]
charset = utf-8
indent_style = space
indent_size = 2

View File

@ -17,11 +17,11 @@
<!-- HAPI Dependencies -->
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-base</artifactId>
<artifactId>org.hl7.fhir.utilities</artifactId>
</dependency>
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>org.hl7.fhir.utilities</artifactId>
<artifactId>hapi-fhir-base</artifactId>
</dependency>
<!-- UCUM -->

View File

@ -13,6 +13,8 @@ import java.util.Set;
import javax.xml.parsers.ParserConfigurationException;
import org.apache.commons.codec.Charsets;
import org.apache.commons.io.IOUtils;
import org.hl7.fhir.dstu3.conformance.ProfileUtilities;
import org.hl7.fhir.dstu3.context.SimpleWorkerContext;
import org.hl7.fhir.dstu3.formats.IParser.OutputStyle;
@ -195,9 +197,10 @@ public class SnapShotGenerationTests {
private static FHIRPathEngine fp;
@Parameters(name = "{index}: file {0}")
public static Iterable<Object[]> data() throws ParserConfigurationException, IOException, FHIRFormatError {
public static Iterable<Object[]> data() throws IOException, FHIRFormatError {
SnapShotGenerationTestsContext context = new SnapShotGenerationTestsContext();
context.tests = (TestScript) new XmlParser().parse(new FileInputStream(Utilities.path(TestingUtilities.home(), "tests", "resources", "snapshot-generation-tests.xml")));
String contents = readFileFromClasspathAsString("snapshot-generation-tests.xml");
context.tests = (TestScript) new XmlParser().parse(contents);
context.checkTestsDetails();
@ -209,6 +212,10 @@ public class SnapShotGenerationTests {
return objects;
}
private static String readFileFromClasspathAsString(String theClasspath) throws IOException {
return IOUtils.toString(SnapShotGenerationTests.class.getResourceAsStream(theClasspath), Charsets.UTF_8);
}
private final TestScriptTestComponent test;
private final String name;

View File

@ -43,6 +43,9 @@ public class TestingUtilities {
String s = System.getenv("FHIR_HOME");
if (!Utilities.noString(s))
return s;
s = System.getProperty("FHIR_HOME");
if (!Utilities.noString(s))
return s;
s = "C:\\work\\org.hl7.fhir\\build";
if (new File(s).exists())
return s;

View File

@ -17,11 +17,17 @@
<!-- HAPI Dependencies -->
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-base</artifactId>
<artifactId>org.hl7.fhir.utilities</artifactId>
</dependency>
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>org.hl7.fhir.utilities</artifactId>
<artifactId>hapi-fhir-base</artifactId>
<exclusions>
<exclusion>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-utilities</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- UCUM -->

View File

@ -409,7 +409,8 @@ public class PackageCacheManager {
private void analysePackage(String dir, String v, Map<String, String> profiles, Map<String, String> canonicals) throws IOException {
int i = 0;
int c = 11;
for (File f : new File(Utilities.path(dir, "package")).listFiles()) {
File[] packages = new File(Utilities.path(dir, "package")).listFiles();
for (File f : packages) {
i++;
if (progress && i % 20 == 0) {
c++;

View File

@ -74,11 +74,17 @@
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-base</artifactId>
<version>${hapi_fhir_version}</version>
<exclusions>
<exclusion>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-utilities</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>org.hl7.fhir.utilities</artifactId>
<version>${hapi_fhir_version}</version>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>