[ImageJ-devel] SimpleITK and maven

Johannes Schindelin Johannes.Schindelin at gmx.de
Wed Apr 2 09:17:21 CDT 2014


Hi Brian,

On Wed, 2 Apr 2014, Brian Northan wrote:

> Does anybody know if there is a maven repository for SimpleITK??
> 
> I've searched around a bit and couldn't find anything.

I am not aware of SimpleITK being available via Maven:

	http://search.maven.org/#search|ga|1|simpleitk

Please note that what you ask for is not *exactly* trivial: SimpleITK is a
Java (and Python) wrapper around a *native* library written in C++.

Therefore you get all the wonderful problems of platform-dependent
development: you need to make sure that you have the correct set of
libraries, compiled for your particular operating system and CPU, working
well with your other libraries (this is a particular problem with
libstdc++ on Linux, where you cannot simply take your ITK libraries to
another version of the same operating system, on the same CPU, and expect
things to work).

You also get the problem that depending on your platform, you need to have
the libraries in a directory that is either in the system library search
path or in a directory referenced by the PATH environment variable and/or
the java.library.path property (that must be set *before* the Java Runtime
Environment is started up, any changes after that will be ignored rather
blatantly).

These native libraries can be attached artifacts to the .jar artifacts on
the Maven repository [*1*], but you will never be truly
platform-independent anymore.

Ciao,
Johannes

Footnote *1*: For the ImageJ launcher, we use the nar-maven-plugin which
allows compiling native libraries as part of the Maven build cycle, and it
attaches those native artifacts in the way I described. It is a finicky
process, though, and you will need to know a little bit about GNU libc
internals to actually make it work (before I myself got aware of those
internals, I was baffled how our launcher would not work on an OMX system
with a particular CentOS version, like, at all).



More information about the ImageJ-devel mailing list