Closed rimadoma closed 6 years ago
Just had a check, and this is not caused by the POM exclusions introduced in #86
Environment tested:
@rimadoma You cannot install SciView naively using the imagej-maven-plugin, because it has some native JARs that are not put into the correct places. You need to use the populate-fiji.sh script. I do want to improve the imagej-maven-plugin to fix all the edge cases involved, but it is rather far down the totem pole of priorities right now. Until the imagej-maven-plugin is improved, unfortunately, downstream components such as BoneJ2 that depend on SciView will thus transitively have the same installation issues.
@ctrueden Thanks for the tip! How would this affect installing BoneJ with SciView from the update site? Would a user also have to run the script?
Nope, the populate-fiji.sh
script is for you as developer, to create a Fiji.app from which the JARs can be uploaded to the BoneJ update site. See also sciview_deploy.sh
in the SciView repository, which takes the generated Fiji.app and actually uploads everything to the SciView update site. You could copy and paste these scripts—for now—into the BoneJ repository and use them to keep the BoneJ update site automatically up-to-date. Make sure you tweak them to enable the SciView update site for the generated Fiji.app, so that only the BoneJ-specific files get uploaded to BoneJ.
On the user side, they will then simply enable the SciView and BoneJ update sites, and get everything they need in the right places.
Is there anything else to using the script than calling
./populate-fiji.sh
and then
mvn install -Dimagej.app.directory=Fiji.app -Dmaven.test.skip=true
for my stuff?
Everything installs nicely, but calls to SciView just seem to freeze Fiji. @kephale Have you experienced anything similar?
Do not call mvn install -Dimagej.app.directory=Fiji.app -Dmaven.test.skip=true
—the populate-fiji.sh
already does that on line 66. It should take care of everything. If you invoke the imagej-maven-plugin
again afterward, it will put back the native libraries into the wrong places, and there will be two copies of things.
calls to SciView just seem to freeze Fiji.
Does SciView work in a regular Fiji installation on that system with the SciView update site enabled? But freezes in the Fiji.app generated by populate-fiji.sh
? If yes and yes, then you can do a directory diff between the two folders to see what is different.
Is the command on line 66 missing a Maven goal on purpose?
SciView works on the system when Fiji is launched from IntelliJ, I'll have to get back to you on what's different between a regular installation and the one created by the script.
Is the command on line 66 missing a Maven goal on purpose?
The default goal of anything extending pom-scijava
is install
.
I'll have to get back to you on what's different between a regular installation and the one created by the script.
Sounds good, please ping back when you have more info.
Okay, several discoveries: 1) SciView from the update site works on regular Fiji installation 2) This is because the update site hosts newer versions of SciView and its dependencies than declared in POM of version 0.0.1, namely:
mvn install
on pom-bonej2
, probable culprit is the older version of scenery (see attachment for full list of differences.
4) Same thing probably explains why populate_fiji.sh
doesn't work
Difference between what BoneJ installs from dependency on sciview-0.0.1 v. what's on the update site (Java 8 updates appear because this branch still depends on
pom-scijava 17.1.1
)
In the light of this new info I tried hacking my POM with a dependency to the newer scenery
(with exclusions) and graphics.scenery:spirvcrossj
, which did lead to a new NoClassDefFoundError
.
This problem can solved by using the installation script populate-fiji.sh
. In addition to running the script, you have to manually copy the following packages to the Fiji.app/jars/
directory: populate-fiji-hack.txt. You might be able to get around the manual step by adding the necessary (runtime) dependencies to the POM, but I won't investigate this now.
In any case this issue is temporary, because in future the increasing integration between Fiji and SciView should solve these dependency issues, as SciView will work in your Fiji installation out-of-the-box.
Yeah, I certainly want to smarten up the scijava-maven-plugin's copy-jars
goal to do the right thing in more cases, and eliminate the need for complicated Fiji populator scripts. SciView also suffers from this issue right now, and eventually we will go through the edge cases and make them work one by one. And then BoneJ2 should reap the benefits as well.
SciView works when launched from IntelliJ, but when when it's installed into a local copy of Fiji with
mvn -Dimagej.app.directory=/path/ -Ddelete.other.versions=true clean install
then plug-in crashes withwhen it tries to initialize SciView.
Steps to reproduce
git clone
commit a91a706f251b266174fd19c5f3a57771dd4172c8mvn -Dimagej.app.directory=/path/ -Ddelete.other.versions=true clean install