I am developing JAR package with a plugin for ImageJ. I tend to use one LUT (lookup table for coloring grayscale images) file, which is not default part of ImageJ/FIJI instalation. I would like to include the lut file into the jar package so that I don't have to include it to the luts directory of ImageJ after I put jar file with my plugin into plugins directory. Is there a way how to make plugin also to provide LUT?
Related
As part of our efforts to create a bazel-maven transition interop tool (that creates maven sized jars from more granular sized bazel jars),
we have written an aspect that runs on bazel build of the entire bazel repo and writes important information to txt files outputs (e.g.: jar file paths, compile deps targets and runtime deps targets, etc.)
We ran across an issue where the repo's code was changed such that some of the txt file were not written anymore. But the old txt file from previous runs (before the code change) remained!
Is there a way to know that these txt files are no longer relevant?
You should be able to run with --build_event_json_file=file.json and try to locate generated artifacts. For example we use it on ci.bazel.io to locate actual test.xml file that were generated: https://github.com/bazelbuild/continuous-integration/blob/09975cbb487a84a62ca1e43aa43e7c6fe078f058/jenkins/lib/src/build/bazel/ci/BazelUtils.groovy#L218
The definition of the protocol can be found in build_event_stream.proto
I have a clojure project that depends on a Java library, that does not work, when it gets included in an uberjar. (It needs different XML descriptors using the same filename in different JAR files.)
Everything I find on using Docker with leiningen depends on building and packaging a uberjar. That's also how I built all clojure Docker images so far.
Is there any leiningen plugin out there, that understands to package a Docker image using several jar files like io.fabric8/docker-maven-plugin does?
Whenever packaging (uberjar, war) the big file that is created contains .class files and a directory structure. Where are these XML files supposed to be (class)loaded from? You can experiment with packing manually. After all it (whether uberjar, war or jar) is just a zip file.
When you know exactly the layout you need SBT is flexible enough to insure you can package from the many input jar files. Unfortunately lein plugins will do things like always overwrite duplicates, and you can't control the packaging behaviour. I can't remember exactly the inflexibilities, but I couldn't control how the packaging process went, what decisions were made.
For doing it manually I use a Linux something called Archive Manager, which I found to be much better than what I used when on Windows. Doing it manually may be all you need. The downside of SBT of course being that you have to learn it, which includes a bit of Scala.
It needs different XML descriptors using the same filename in different JAR files.
Just thinking about this, is it that you need to append the contents of each file that is in a different jar into the one file that is in the uberjar? You can try it out. If it works and you need to package up often enough that manually creating and renaming a zip file every time becomes a pain, then I believe that SBT will be your best bet.
I have to package my container with the original jar file and then reference this jar in the classpath when starting the application
The classloader loads classes rather than jars. It is the container's job to unpackage all the things you give it, such as .class files, (uber)jars, wars. Any program that dynamically loads from the classpath is loading either classes or resources (things like .xml files). I suppose a .jar file could be a resource, in which case you would put the jar file in the uberjar. So it is still possible to package it up.
I have a Grails application and a custom plugin with separate code included in the main application in BuildConfig.groovy using grails.plugin.location.'my-plugin' = '../my-plugin'. Now I'm looking for a way to customize what artefact directories will be exported in the plugin. I want to place a custom resource file (e.g. SQL script) into src/resources directory of the plugin and I need to see the file on classpath of the main application. I know files in grails-app/conf and other directories get included along with the plugin source, but can the convention of resource directories be altered?
I have a mavem pom project with a set of modules under it.
parent-pom
|---child-module-a
|---child-module-b
|---child-module-c
|---child-module-package
In the child-module-package, I want to create a compressed file consisting of files from other child modules.
the other module target jars
files from src/main/resources of other modules and put to "conf" directory in the final compressed jars.
include dependency jars of other child-modules in the "lib" directory.
create a manifest file.
Is there a plugin(s) that would allow me to do all the above?
Is the maven-assembly-plugin sufficient to do this?
The existing jar that I am trying to wrap with the ant bndwrap task has the classes from another jar included within it. By this I mean the unrolled jar, not an embedded jar.
How can I omit these packages from the export packages declaration of the bundle?
Basically the jar has the packages
org.stuff
and
org.otherstuff
I want to only export the org.stuff package, but bndwrap will include both.
If you use Export-Package in the bnd file, you can define exclusion as well with a "!".
Example from http://www.aqute.biz/Bnd/Bnd:
Export-Package: !com.acme.impl, com.acme.*;version=1.2
Also, if you use wrapping, -exportcontents can be interesting for you: http://www.aqute.biz/Bnd/Wrapping:
"The binaries and sources are not in the final jar but bnd does not yet know what needs to be exported. This can be indicated with the -exportcontents instruction. It has the same syntax as Export-Package but does not copy from the classpath, it only applies the instruction to the content of the final JAR."