A Maven plugin to help development of ImageJ and ImageJ plugins
Java Shell
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.travis
src
.gitignore
.travis.yml
LICENSE.txt
README.md
pom.xml

README.md

ImageJ Maven Plugin

imagej-maven-plugin is a Maven plugin to help with developing ImageJ and ImageJ plugins.

It provides one goal:

  • copy-jars (as part of the install phase of the life cycle): copies the artifact and all its dependencies into an ImageJ.app/ directory structure; ImageJ 1.x plugins (identified by containing a plugins.config file) get copied to the plugins/ subdirectory and all other .jar files to jars/. However, you can override this decision by setting the property imagej.app.subdirectory to a specific subdirectory. It expects the location of the ImageJ.app/ directory to be specified in the property imagej.app.directory (which can be set on the Maven command-line). If said property is not set, the copy-jars goal is skipped.

It is recommended to use it implicitly by making the SciJava POM the parent project:

<project ...>
  <parent>
    <groupId>org.scijava</groupId>
    <artifactId>pom-scijava</artifactId>
    <version>1.162</version>
  </parent>
  ...
</project>

Alternatively, you can include the plugin explicitly in the life cycle:

<project ...>
  <build>
    <plugins>
      <!-- Enable copying the artifacts and dependencies by setting
           the 'imagej.app.directory' property to a valid directory. -->
      <plugin>
        <groupId>net.imagej</groupId>
        <artifactId>imagej-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>copy-jars</id>
            <phase>install</phase>
            <goals>
              <goal>copy-jars</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>