These are chat archives for fiji/fiji

12th
Feb 2018
Varun Kapoor
@kapoorlab
Feb 12 2018 07:56
Ok I know why it is acting like this, to fix this I need to know this: If my maven based main java project depends on other local maven based java projects, how do I generate the jars of those to be compiled when generating the main jar file? This would fix the issue I had with Fiji quitting on opening after following the wiki instructions above, plus including the libraries on the java build path of the main project did not help.
Jan Eglinger
@imagejan
Feb 12 2018 08:59
@kapoorlab mvn -Dimagej.app.directory=/path/to/your/Fiji.app should take care of copying all dependencies of your maven project, no?
Stefan Helfrich
@stelfrich
Feb 12 2018 09:07
@imagejan @kapoorlab I might be wrong here, but that doesn't actually trigger a build of an artifact but "only" retrieves an artifact from your local Maven repository
Varun Kapoor
@kapoorlab
Feb 12 2018 13:58
@stelfrich @imagejan Yeah this does not goes in to build a jar for the referenced dependent project, it would be nice to build a jar for the master project which triggers the compilation of dependent maven projects and includes those jars in the Fiji.app/plugins/jars folder and the jar for the main plugin in Fiji.app/plugins folder , is that possible somehow?
Curtis Rueden
@ctrueden
Feb 12 2018 16:26
@kapoorlab Does your project depend on snapshot versions of other libraries? Ideally it should not. If it does not, then it does not matter whether you rebuild, or fetch the existing dependency from the Maven repository. That's a major advantage of reproducible builds: modularity of builds.
If you do depend on snapshot versions of other libraries, then things become a lot more complicated. It is your responsibility to generate the JARs from the "bottom up" of your dependency tree. The imagej-maven-plugin does not (and probably will never) support this use case.
Varun Kapoor
@kapoorlab
Feb 12 2018 16:56
@ctrueden Ok i get it, i am working with three snapshot versions of slave projects that the master needs and right now I do physically put them in the plugins/jar, when they become non-snapshots then I will try again by putting them in the java build path of the master.
Curtis Rueden
@ctrueden
Feb 12 2018 17:00
@kapoorlab One thing I like to do to ease development in that scenario is to use symlinks from the target/foo-x.y.z.jar file to the Fiji.app installation. Then, while you still need to rebuild each with mvn package, at least you do not need to copy them every time.
This assumes you need to test in a full-blown Fiji.app installation, though. Do you really need to do that?
Varun Kapoor
@kapoorlab
Feb 12 2018 17:03
@ctrueden Do not need this so urgently, just wanted to know if i am missing some automated way of doing it in the wiki imageJ way of doing things. But I can live with moving jars to their correct location for now, thanks for letting me know about this.
Curtis Rueden
@ctrueden
Feb 12 2018 17:13
@kapoorlab If you do not need a full-blown Fiji.app installation for testing, then the much simpler thing to do is to run your code via a main method from inside the IDE.
amirffff
@amirffff
Feb 12 2018 21:57
@amirffff
Hi guys
can I ask a general question?
How do you work with imageJ in order to write scripts (Jython, Macro, Java) and why?
thanks in advance
Ellen T Arena
@etarena
Feb 12 2018 22:15
@amirffff posted on the forum this same question - so all responses can be addressed there. ^^^ The link is pasted here for others to follow.
amirffff
@amirffff
Feb 12 2018 22:32
@etarena Thnaks I have already done it
Ellen T Arena
@etarena
Feb 12 2018 22:36
:thumbsup: