Problems Getting Dependencies With Maven and Running Plugin Examples

Hi, I’m pretty new to java so I apologize if this question is dumb. I was attempting to develop a plugin that allowed automatic segmentation of vessels but would let you manually select to correct any errors. I was trying to use the automatic segmentation in angiotool (https://github.com/imagejan/angiotool) as a starting point but had problems running it from Java, where the program had many problems importing different libraries.

At that point, I went back to the basics and followed the instructions here to try to run the basic ImageJ build: https://imagej.net/Developing_ImageJ_in_IntelliJ_IDEA. When I tried running the Maven build, I got this warning: “Could not transfer artifact net.imagej:imagej-common:pom:0.28.2 from/to scijava.public (https://maven.scijava.org/content/groups/public): Failed to transfer file https://maven.scijava.org/content/groups/public/net/imagej/imagej-common/0.28.2/imagej-common-0.28.2.pom with status code 503.” When running the main file, I got many errors about packages not being found. They are listed in the attached txt file. It seems like the instructions should be quite straight forward, but I’m not sure why I’m unable to build and run any ImageJ source code (or that of any plugin/example) with Java. Is there something obvious that I’m missing or should read up on? Should I try redownloading java and maven?

Errors.txt (25.2 KB)

Hi and welcome to the forum!

Setting up your environment to do this without problems can be tricky. Here is some more information: https://github.com/haesleinhuepf/NEUBIAS_TS11
Maybe @haesleinhuepf might be able to point you in the right direction :slight_smile:

1 Like

Hey @Ray_Fang,

I’m afraid but the information on the ImageJ wiki regarding IntelliJ is a bit outdated. As @schmiedc pointed out, we usually start by copying a pre-existing project with a pom file that works. You find a nice video online describing the procedure:

It’s about Eclipse, but with IntelliJ it works almost the same.

I hope that helps.

Cheers,
Robert

2 Likes

Some advertisement for imagej-command-archetype which can fill most of the required information based on educated guesses. Requires to use Maven on the command line though (since IntelliJ doesn’t pick up on the required inputs for project creation from the archetype and fails if you don’t provide them)…

1 Like

Thanks for all the help everyone! I never was able to get that tutorial to work, but did get this alternate one (https://github.com/imagej/tutorials/) to. It seems like the issue was downloading the online repositories with Maven given the pom.xml file. I’ll try looking into the imagej-command-archetype mentioned above later and see if I can get it to work, but am going to try to understand Maven and Java better before doing so. I guess I could update the ImageJ wiki regarding IntelliJ if I ever get it to work properly.

2 Likes