[ImageJ-devel] Finding classes and importing the right Maven artifacts

Curtis Rueden ctrueden at wisc.edu
Thu Jul 26 15:19:52 CDT 2012


Hi Mike,

Thanks for the feedback. To add to Dscho's comments...


> What was tripping me up was that there are several versions of
> ij-platform, for example. The beta releases (fixed states, right?) and
> the SNAPSHOTS (updating often, right?). So far, so good.


Yep, all correct.


> But, then there are versions 2.0-SNAPSHOT and 2.0.0-SNAPSHOT.


This is my fault; I decided to change to a major.minor.micro versioning
scheme so we could use semantic versioning (http://semver.org/). The
"2.0-SNAPSHOT" builds are obsolete, so I deleted them all. Hopefully that
clears up any confusion there. :-)


> And one with a sources classifier.


This is a standard Maven thing you can do: publish the source code to its
own JAR with "-sources" classifier. Eclipse is smart enough to download it
for you: in Package Explorer, find any JAR under your project's "Maven
Dependencies" list, right-click it and choose "Maven > Download Sources".
After that, you'll have them in your local cache (in ~/.m2) and you can
browse the sources in Eclipse, debug into them, etc. This only works if
that particular Maven project deploys the "-sources" JAR though, like we
are doing.


> And there is also an ij-platform artifact with the group ID imagej,
> version 2.0-SNAPSHOT


This is also my fault. We originally used groupId "imagej" but decided to
change to "net.imagej" because as Dscho said, it is the convention to use
reverse domain name, and it is strongly preferred (maybe even required?) to
do things that way if you want to submit your stuff to the Maven central
repository.

So everything listed under the "imagej" groupId is old/deprecated, and
should not be used.

To clarify this, I deleted all SNAPSHOT builds with groupId of imagej from
the server. However, there are some release builds that it would be best
not to remove, such as ImageJ5D 1.2.1 - 1.2.4. So the "imagej" groupId will
remain, but in the releases subtree only.


> and several others with group ID net.imagej.


Yes, these are the correct ones.


> So, even guessing the right artifact name could point at eight distinct
> actual artifacts.


Hopefully since I deleted a lot of the cruft, it is less confusing now.


> Even more confusing is this recommendation for pom.xml at
> http://fiji.sc/wiki/index.php/Maven


I checked that page, but could not find the block you cited. If you see the
old "imagej" groupId anywhere, please fix it, or let us know and I will do
so.

Regards,
Curtis


On Thu, Jul 26, 2012 at 2:47 AM, Michael Doube <michael at doube.net> wrote:

> >> Mostly, Eclipse has handled that OK. But, now I'm editing my pom.xml and
> >> am missing a couple of dependencies, which are really hard to find.
>
> OK, so I found them by trial and error by searching at
> http://maven.imagej.net:8081/index.html#welcome and editing pom.xml
> until build errors went away.
>
> What was tripping me up was that there are several versions of
> ij-platform, for example. The beta releases (fixed states, right?) and
> the SNAPSHOTS (updating often, right?). So far, so good. But, then there
> are versions 2.0-SNAPSHOT and 2.0.0-SNAPSHOT. And one with a sources
> classifier. And there is also an ij-platform artifact with the group ID
> imagej, version 2.0-SNAPSHOT, and several others with group ID
> net.imagej. So, even guessing the right artifact name could point at
> eight distinct actual artifacts.
>
> Even more confusing is this recommendation for pom.xml at
> http://fiji.sc/wiki/index.php/Maven
>
>                 <dependency>
>                         <groupId>net.imagej</groupId>
>                         <artifactId>ij</artifactId>
>                         <version>1.46j</version>
>                 </dependency>
>                 <dependency>
>                         <groupId>imagej</groupId>
>                         <artifactId>imagej</artifactId>
>                         <version>2.0-SNAPSHOT</version>
>                 </dependency>
>
> Which makes it look like ImageJ1 is under net.imagej and ImageJ2 is
> under imagej.
>
> Guidance, please?
>
> Michael
>
>
>
> _______________________________________________
> ImageJ-devel mailing list
> ImageJ-devel at imagej.net
> http://imagej.net/mailman/listinfo/imagej-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://imagej.net/pipermail/imagej-devel/attachments/20120726/8cf4d1b0/attachment.html>


More information about the ImageJ-devel mailing list