[ImageJ-devel] Migrating an ImageJ1 plugin (Git, Ant etc.) to ImageJ2 (Git, Maven)

Michael Doube michael at doube.net
Sun Jul 29 05:17:51 CDT 2012


Hi,

In a new thread because it's a broad but different issue than the
others: How to move an active ImageJ1 plugin project to an ImageJ2 project?

The scenario:
I have an active ImageJ1 plugin project, which I want to move to Image2.
The old plugin needs to stay active with bugfixes and for archival
reasons. Currently, releases are tracked on the master branch of a Git
repository, the IDE is Eclipse and Ant is the builder. I'd like to keep
the whole project (IJ1 and IJ2 plugins) in the same Git repository.

The plan at the moment is to:
Keep releasing the old plugin on the master branch
Work on the new plugin on a version branch
When the new plugin is stable, send the old plugin to a legacy branch
and merge the new plugin to master

Because the two plugins use different build systems, I've set them up as
two separate Eclipse projects, one with the old style (Ant,
plugins.config) and one with the new style (Maven, annotations). The two
projects work on different branches of the same Git repository, so I can
work on both of them simultaneously in the same instance of Eclipse.

To do that I branched the new plugin off, cloned it locally into a new
Eclipse project (Import...) then 'Mavenized' the new project. The
pom.xml-related chatter from me lately has been a result of this
process. The new branch has the old directory structure:
workspace/src/org/bonej/MyPlugin.java but Maven expects something else
by convention.

The big question is, is this going to work at all or should I start
again in a different way?

I am asking all this because processing of annotations doesn't work in
my setup, so the new plugin's menu items aren't added to ImageJ2
(solution is to use the Ant build.xml and Sun javac to do the release
build, as we developed at the last Fiji Hackathon).

Do you see any disasters looming, or propose another streamlined
approach that will work? Maven is impressive so far, so I'd like to
continue with it, I just have to organise things so that it behaves
correctly.

Michael



More information about the ImageJ-devel mailing list