This is an example Maven project implementing an ImageJ2 command.
For an example Maven project implementing an original ImageJ plugin, see: https://github.com/imagej/example-legacy-plugin
It is intended as an ideal starting point to develop new ImageJ2 commands in an IDE of your choice. You can even collaborate with developers using a different IDE than you.
In Eclipse, for example, it is as simple as File › Import... › Existing Maven Project.
In NetBeans, it is even simpler: File › Open Project.
The same works in IntelliJ.
Die-hard command-line developers can use Maven directly by calling
in the project root.
However you build the project, in the end you will have the
(called artifact in Maven speak) in the
To copy the artifact into the correct place, you can call
This will not only copy your artifact, but also all the dependencies.
Developing code in an IDE is convenient, especially for debugging.
To that end, this project contains a
main method which launches ImageJ2,
loads an image and runs the command.
Since this project is intended as a starting point for your own developments, it is in the public domain.
How to use this project as a starting point
Visit this link to create a new repository in your space using this one as a template.
pom.xmlfile, fixing all the lines labeled
GaussFiltering.javafile and add your own
src/main/java/<package>/(if you need supporting files such as icons in the resulting
.jarfile, put them into
Replace the contents of
README.mdwith information about your project.
Eclipse: To ensure that Maven copies the command to your ImageJ2 folder
- Go to Run Configurations...
- Choose Maven Build
- Add the following parameter:
This ensures that the final
.jar file will also be copied
into your ImageJ2 folder everytime you run the Maven build.