Refactor fatjar (#6)
This commit is contained in:
parent
cef1965346
commit
bf8a7aa3d2
|
@ -512,12 +512,12 @@ public class Element extends Base {
|
|||
@SuppressWarnings("unchecked")
|
||||
List<ElementDecoration> decorations = (List<ElementDecoration>) getUserData("fhir.decorations");
|
||||
if (decorations == null) {
|
||||
decorations = new ArrayList<ElementDecoration>();
|
||||
decorations = new ArrayList<>();
|
||||
setUserData("fhir.decorations", decorations);
|
||||
}
|
||||
decorations.add(new ElementDecoration(DecorationType.TYPE, profile.getUserString("path"), definition.getPath()));
|
||||
if (tail(definition.getId()).contains(":")) {
|
||||
String[] details = tail(definition.getId()).split("\\:");
|
||||
if (definition.getId() != null && tail(definition.getId()).contains(":")) {
|
||||
String[] details = tail(definition.getId()).split(":");
|
||||
decorations.add(new ElementDecoration(DecorationType.SLICE, null, details[1]));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -55,28 +55,63 @@
|
|||
|
||||
<build>
|
||||
<plugins>
|
||||
|
||||
<!--
|
||||
Build a fatjar containing all depenedncies
|
||||
-->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-shade-plugin</artifactId>
|
||||
<version>3.2.1</version>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<id>unpack-dependencies</id>
|
||||
<phase>process-classes</phase>
|
||||
<goals>
|
||||
<goal>shade</goal>
|
||||
<goal>unpack-dependencies</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<shadedClassifierName/>
|
||||
<transformers>
|
||||
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
|
||||
<mainClass>org.hl7.fhir.r4.validation.Validator</mainClass>
|
||||
</transformer>
|
||||
</transformers>
|
||||
<shadedArtifactAttached>true</shadedArtifactAttached>
|
||||
<excludes>**/module-info.class</excludes>
|
||||
<outputDirectory>${project.build.directory}/classes</outputDirectory>
|
||||
<overWriteReleases>false</overWriteReleases>
|
||||
<overWriteSnapshots>true</overWriteSnapshots>
|
||||
<excludeScope>test</excludeScope>
|
||||
<includeScope>compile</includeScope>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<configuration>
|
||||
<archive>
|
||||
<manifest>
|
||||
<addClasspath>true</addClasspath>
|
||||
<mainClass>org.hl7.fhir.r4.validation.Validator</mainClass>
|
||||
</manifest>
|
||||
</archive>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<!--
|
||||
These two plugins provide quality checks that don't make sense to perform
|
||||
on a fatjar.
|
||||
-->
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>animal-sniffer-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.basepom.maven</groupId>
|
||||
<artifactId>duplicate-finder-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
|
Loading…
Reference in New Issue