<div dir="ltr">Hi everyone,<div><br></div><div>Earlier this month, LOCI hosted an ImgLib2 hackathon in Madison, with the goal of finally getting the ImgLib2 core library out of beta. We have been working through the ramifications of that release for the past week and a half, but some issues have arisen that complicate matters.</div><div><br></div><div>So, this mail is a quick status update on where we are at, and a question for the community. An official release announcement for ImgLib2 will come soon, as soon as the issues in question have been fully resolved.</div><div><br></div><div>Release status:</div><div>- Can always be seen at <a href="http://status.imagej.net/">http://status.imagej.net/</a></div><div>- See the P.S. below for a complete rundown as of this writing.</div><div><br></div><div>On to the question. It is technical and Maven-centric, so if you don't care about that, then feel free to stop reading here.</div><div><br></div><div>Background: when preparing for the ImgLib2 release, we decided to restructure the dependency hierarchy of a couple of components. In particular, the imglib2-meta component moved into imagej-common. This is elegant:</div><div><br></div><div>* ImgLib2 now represents the N-dimensional core</div><div>* ImageJ (specifically: imagej-common) provides metadata-rich extensions to that core, built on the SciJava Common plugin framework</div><div>* The SCIFIO library provides I/O capabilities also driven by SciJava Common, built on the metadata-rich image structures of ImageJ.</div><div><br></div><div>More details at the newly minted page: <a href="http://imagej.net/Architecture">http://imagej.net/Architecture</a></div><div><br></div><div>This restructuring exacerbated an already-known problem: the hierarchy of organizational parent POMs does not, and cannot, match the core library dependency hierarchy above. Or to put another way: the imagej, imglib2 and scifio organizations (on GitHub) each have projects that utilize components from the other two organizations; e.g.:</div><div><br></div><div>* <a href="https://github.com/imagej/imagej">https://github.com/imagej/imagej</a>, which provides the top-level ImageJ application itself depending on both ImgLib2 and SCIFIO libraries</div><div>* <a href="https://github.com/imglib/imglib2-tutorials">https://github.com/imglib/imglib2-tutorials</a>, which uses SCIFIO for image I/O and ImageJ1 for displaying images</div><div>* <a href="https://github.com/scifio/scifio">https://github.com/scifio/scifio</a>, which utilizes data structures from ImgLib2 and ImageJ Common.</div><div><br></div><div>Hence, these three organizations are fundamentally interdependent.</div><div><br></div><div>One function of the pom-scijava parent (<a href="https://github.com/scijava/pom-scijava">https://github.com/scijava/pom-scijava</a>) has been to act as a "Bill of Materials" defining all the component versions which are intended to be used together. Recently, we factored out a separate Bill of Materials for each of the three organizations. But then we realized that due to the interdependence explained above, each of the three parent POMs (pom-imagej, pom-imglib2 and pom-scifio) needed to inherit the BOMs of all three organizations.</div><div><br></div><div>Like Java, Maven POMs support only single inheritance. But they do support a limited form of composition via an "import scope" which allows you to import the managed dependency versions from a non-parent POM. We tried to do this, creating three new artifacts -- bom-imagej, bom-imagej and bom-scifio -- and having each of the three POM parents import all three of the bom artifacts. But I am sorry to say that after trying it in anger, it has been a failed experiment. The import scope _only_ supports managed versions, not properties and not profiles. So we lost access to the version properties (which are occasionally extremely useful) as well as the dev profiles (which make it easier to couple the latest versions of multiple components together for local development). It also locks out the possibility of any other shared configuration between the projects of the three affected organizations.</div><div><br></div><div>Yesterday and today, we (dscho, hinerm and myself) discussed three potential solutions to the problem; see the chatlogs [1] for some gory details.</div><div><br></div><div>The solution we converged upon is to put the shared configuration of pom-imagej, pom-imglib2 and pom-scifio into pom-imagej, and have pom-imglib2 and pom-scifio now extend pom-imagej instead of pom-scijava directly. (pom-imagej would still extend pom-scijava, of course.)</div><div><br></div><div>We like it because it isolates the version management of those three "core SciJava orgs" into its own place (rather than "polluting" pom-scijava directly), but without the need to create yet another potentially confusing parent POM ("pom-imagej-imglib2-scifio-shared-configuration-and-bom").</div><div><br></div><div>The question for the community -- especially Tobias, Stephan P. & Stephan S. -- is: do you agree? Or do you have any better ideas?</div><div><br></div><div>If everyone is OK with it, I will push ahead and complete this work. Current topic branches are at:</div><div><br></div><div>* <a href="https://github.com/imagej/pom-imagej/compare/imagej-is-da-bom">https://github.com/imagej/pom-imagej/compare/imagej-is-da-bom</a></div><div>* <a href="https://github.com/imglib/pom-imglib2/compare/imagej-is-da-bom">https://github.com/imglib/pom-imglib2/compare/imagej-is-da-bom</a></div><div>* <a href="https://github.com/scifio/pom-scifio/compare/imagej-is-da-bom">https://github.com/scifio/pom-scifio/compare/imagej-is-da-bom</a><br></div><div><br></div><div>Regards,</div><div>Curtis</div><div><br></div><div>[1] <a href="http://code.imagej.net/chatlogs/imagejdev?times=prefix&start-date=2014-10-28&start-time=0400&end-date=2014-10-28&end-time=1500">http://code.imagej.net/chatlogs/imagejdev?times=prefix&start-date=2014-10-28&start-time=0400&end-date=2014-10-28&end-time=1500</a></div><div><br></div><div>P.S. Here is the complete rundown of components:</div><div><br></div><div><div style="font-family:arial,sans-serif;font-size:13px">The following components are released:</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">* imglib2 2.0.1</div><div style="font-family:arial,sans-serif;font-size:13px">* imglib2-algorithm 0.1.0<br></div><div style="font-family:arial,sans-serif;font-size:13px">* imglib2-algorithm-fft 0.1.0</div><div style="font-family:arial,sans-serif;font-size:13px">* imglib2-algorithm-gpl 0.1.0</div><div style="font-family:arial,sans-serif;font-size:13px">* imglib2-ij 2.0.0-beta-27<br></div><div style="font-family:arial,sans-serif;font-size:13px">* imglib2-realtransform 2.0.0-beta-27</div><div style="font-family:arial,sans-serif;font-size:13px">* imagej-common 0.10.0</div><div style="font-family:arial,sans-serif;font-size:13px"><div>* scifio 0.17.0</div><div><br></div></div><div style="font-family:arial,sans-serif;font-size:13px">The following components are not done yet:</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">* imglib2-script 0.1.0</div><div style="font-family:arial,sans-serif;font-size:13px">* imglib2-tests</div><div style="font-family:arial,sans-serif;font-size:13px">* imglib2-tutorials</div><div style="font-family:arial,sans-serif;font-size:13px"><div><br></div><div>(Note that for tests and tutorials, it is just a matter of updating the master branch, since we will never cut Maven release of those.)</div><div><br></div></div><div style="font-family:arial,sans-serif;font-size:13px">* imagej-ops 0.6.0</div><div style="font-family:arial,sans-serif;font-size:13px">* imagej-plugins-commands 0.3.0</div><div style="font-family:arial,sans-serif;font-size:13px">* imagej-ui-swing 0.8.0</div><div style="font-family:arial,sans-serif;font-size:13px">* scifio-ome-xml 0.10.0<br></div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">And probably others that will become obvious as we proceed further along.<br></div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">Lastly, each of the following components has an "imglib2-release" branch which is ostensibly complete but still has build or test failures:</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px"><div>* imglib2-tests</div><div>* imglib2-script</div><div>* imagej-ops</div></div><div style="font-family:arial,sans-serif;font-size:13px"><br></div></div></div>