Stream: implementers
Topic: New validator JAR location
Morten Ernebjerg (Feb 01 2019 at 09:46):
(moved here from announcement stream)
I have two questions regarding the new download location for the validator JAR:
1. Is there a way for non-Maven projects to automatically pull the latest release (something we have been doing with Grunt/JS) with this new setup? E.g. is a copy of the latest release also stored with a fixed filename?
2. Downloading the JAR as described from the new location (e.g. this one) and running it gives me the error "no main manifest attribute, in org.hl7.fhir.validator.jar". Might it be because the main class is not defined in the MANIFEST.MF file in the JAR (no Main-Class: classname
entry)?
Grahame Grieve (Feb 01 2019 at 11:45):
@James Agnew I thought this second issue would have been an issue for me if the manifest was missing?
Grahame Grieve (Feb 01 2019 at 11:46):
the first issue, we know that this is a need, and we jaben't yet worked out a way. I don't know if any maven guru (if there is such a thing) knows of a way
Patrick Werner (Feb 01 2019 at 12:36):
@Morten Ernebjerg Nexus has a Service API which allows stable Links to the latest Version:
https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=org.carewebframework&a=org.carewebframework.fhir.validator&v=LATEST&e=jar
Morten Ernebjerg (Feb 01 2019 at 12:44):
Thanks, @Patrick Werner (so there is apparently such a thing as a Maven guru :smiley: )
John Ravan (Feb 04 2019 at 14:51):
I added this to my pom.xml to pull the new .jar
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <executions> <execution> <id>copy</id> <phase>package</phase> <goals> <goal>copy</goal> </goals> <configuration> <artifactItems> <artifactItem> <groupId>ca.uhn.hapi.fhir</groupId> <artifactId>org.hl7.fhir.validation.cli</artifactId> <classifier>standalone</classifier> <version>3.7.3-SNAPSHOT</version> <type>jar</type> <overWrite>true</overWrite> <outputDirectory>target</outputDirectory> <destFileName>org.hl7.fhir.validator.jar</destFileName> </artifactItem> </artifactItems> </configuration> </execution> </executions> </plugin>
Along with a new repository to pull snapshots
<repositories> <repository> <id>oss-snapshot-repository</id> <name>Public online repository for public SNAPSHOTS</name> <url>https://oss.sonatype.org/content/repositories/snapshots</url> </repository> </repositories>
Now the most updated validator .jar will be in the target directory next to my application .jar so that I have access
Morten Ernebjerg (Feb 05 2019 at 09:21):
@Patrick Werner. I am a little confused about the maven repos (not being a maven guru...). In the link to the latest version you gave, the org is "carewebframework". Is that a mirror of the standard HL7 repo (or does one need to craft a new redirect URL)? When I pull the JAR from the latest-link, I seem to get a quite different than when I manually download from the repo listed on the validator wiki page(viz- https://oss.sonatype.org/content/repositories/snapshots/ca/uhn/hapi/fhir/org.hl7.fhir.validation.cli/). E.g. if I try to run the following type of command with the file from the latest-link
Java -jar validator/org.hl7.fhir.validation.jar -version 3.0.1 some-resource.xml
it just prints a man-page
Usage: validate fhir-version encoding-type service-root resource-path Where: fhir-version = DSTU1 | DSTU2 encoding-type = XML | JSON service-base = root URL of FHIR service endpoint. resource-path = path of request resource. (...) HAPI-FHIR version is 1.3
If I run the same command with a version pulled by hand from the link from the wiki, I still get the "no main manifest attribute" error mentioned above.
Patrick Werner (Feb 05 2019 at 09:32):
Uh, i don't know where i got these group and artifacts ids. To get what you actually need this would be the right link: https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=ca.uhn.hapi.fhir&a=org.hl7.fhir.validation.cli&v=LATEST&e=jar
The carewebframework stuff comes from regenstrief and is an outdated FHIR validator from 2016
Morten Ernebjerg (Feb 05 2019 at 09:34):
Thanks! - now it looks like I get the same thing (throws same error...)
Patrick Werner (Feb 05 2019 at 10:16):
i built it locally - works fine, pushing to sonatype in the build process seems not to work currently.
Patrick Werner (Feb 05 2019 at 10:16):
(deleted)
Patrick Werner (Feb 05 2019 at 10:36):
https://www.dropbox.com/s/3s2zkq5bmyl3793/org.hl7.fhir.validation.cli-3.7.3-SNAPSHOT.jar?dl=0
Morten Ernebjerg (Feb 05 2019 at 12:32):
@Patrick Werner Ooh, a present - thank you very much, runs like a charm!
Patrick Werner (Feb 05 2019 at 14:31):
fyi @James Agnew @Grahame Grieve
if you need support with the new repo and/or build process i volunteer to help
Morten Ernebjerg (Feb 12 2019 at 11:55):
Latest downloads are working again, thanks for fixing :tada:
Grahame Grieve (Feb 12 2019 at 13:58):
great
Last updated: Apr 12 2022 at 19:14 UTC