Closed axtimwalde closed 6 years ago
Note that ImageJ2 plugins actually live in jars/
along with everything else. The plugins/
folder is only necessary for ImageJ 1.x plugins.
How would you propose we differentiate if not by underscore? Look for a plugins.config
file? That is also not always enough. But it might be sufficient here.
Thoughts?
How about using the path specification in the name attribute? May be I do not understand enough of this. The pom.xml contains an attribute
<name>plugins/myPlugin.jar</name>
which starts with
plugins/
which is a great hint to move the file to plugins/
instead of jars/
. This path is currently ignored.
For reference, here's the code that does the check
Looks like it already is looking for a plugins.config
? At a glance it's not clear to me if the pom would be readily available or not.
@axtimwalde I actually want to fix the names to be correct title case names for each plugin, rather than the weird filenames they are now, because they will soon be shown in a big table of core Fiji components. (See http://imagej.net/Template:ComponentTable:net.imagej:imagej for an idea of what's to come... but it will be at http://imagej.net/Template:ComponentTable:sc.fiji:fiji for the Fiji components.)
@hinerm Cool, so all we have to do is remove the prior line's check that demands an underscore, and maybe that will be good enough? @axtimwalde Do you always have a plugins.config for your plugins?
If that isn't good enough, the next step would be to check the POM for a special property (e.g., <imagej1.plugin>true</imagej1.plugin>
or similar). @hinerm I do think we can access the POM via SciJava Common's org.scijava.util.POM
class, which can extract it from the JAR file's META-INF/maven
subfolder.
@axtimwalde Do you always have a plugins.config for your plugins?
I do but others may not, e.g. with single class plugins. I think a more robust solution would be to test for _ in the filename OR plugins.config
, but that's still a clumsy surrogate. It would actually have to test for if the class that is named in plugins.config
or the single class in default name space implement ij.plugin.Plugin
or ij.plugin.PluginFilter
.
I think I'll go for the special property OR existence of plugins.config
. In general I'd rather not assume that _
means ImageJ1 plugin. But I may not have time for awhile to address this issue.
I'm just having the same issue now. Is there a solution or workaround in the meantime?
@tpietzsch Any chance you can simply make it implement SciJava Command
instead? Then you don't need the JAR to go to plugins/
anymore, nor do you need a plugins.config
.
@ctrueden to be honest, I'm trying to remember where I actually had the problem... I guess manual copying solved it. I'll try implementing Command
next time I'll run into it.
Closed in favor of scijava/scijava-maven-plugin#18.
for plugins that have a
does not copy the target into
but into
whereas
would be copied into
If I understood @rasband correctly, _ is not required any more to recognize plugins. If that is true, it should not be required by the copy rule either.