Skip to content

Commit

Permalink
add maven transformer for n5 compression to trakem2 module (should ha…
Browse files Browse the repository at this point in the history
…ve done this when the problem was fixed for the other modules)
  • Loading branch information
trautmane committed Sep 9, 2024
1 parent d055aa9 commit b714212
Showing 1 changed file with 37 additions and 2 deletions.
39 changes: 37 additions & 2 deletions trakem2-scripts/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,35 @@

<outputFile>target/render-ws_trakem2_plugins-${project.version}.jar</outputFile>

<transformers>

<!--
Compression implementations defined in org.janelia.saalfeldlab:n5,
org.janelia.saalfeldlab:n5-blosc, and org.janelia:n5-zstandard get built/serialized
into META-INF/json/org.janelia.saalfeldlab.n5.Compression$CompressionType files by
https://github.com/scijava/scijava-common/blob/master/src/main/java/org/scijava/annotations/AnnotationCombiner.java
The serializations need to be combined into a single resource for this fat jar
( see https://imagej.net/imagej-wiki-static/Uber-JAR ).
Note that the org.janelia.saalfeldlab:n5-blosc implementation is excluded in the
filters area below because we don't currently need it.
-->
<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer"
combine.children="append">
<resource>META-INF/json/org.janelia.saalfeldlab.n5.Compression$CompressionType</resource>
</transformer>

<!-- copied these transformers from hot-knife pom.xml -->
<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>META-INF/json/org.scijava.plugin.Plugin</resource>
</transformer>
<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>META-INF/json/mpicbg.spim.data.generic.sequence.ImgLoaderIo</resource>
</transformer>

</transformers>

<filters>

<!-- filter out overlapping or irrelevant resources and classes -->
Expand Down Expand Up @@ -67,10 +96,16 @@
<exclude>*.jq</exclude>
</excludes>
</filter>
<!--
Filter out org.janelia.saalfeldlab:n5-blosc compression support because
we don't currently need it.
It produces distracting java.lang.UnsatisfiedLinkError warning messages in
environments where blosc is not independently installed.
-->
<filter>
<artifact>org.janelia.saalfeldlab:n5-*</artifact>
<artifact>org.janelia.saalfeldlab:n5-blosc</artifact>
<excludes>
<exclude>META-INF/json/org.janelia.saalfeldlab.n5.Compression*</exclude>
<exclude>META-INF/json/org.janelia.saalfeldlab.n5.Compression$CompressionType</exclude>
</excludes>
</filter>
</filters>
Expand Down

0 comments on commit b714212

Please sign in to comment.