[ImageJ-devel] Netbeans and Maven

Polder, Gerrit gerrit.polder at wur.nl
Wed Jan 16 10:07:38 CST 2013


Johannes, Curtis,

thanks a lot for your help.

On 15 Jan 2013, at 23:49, Johannes Schindelin <Johannes.Schindelin at gmx.de<mailto:Johannes.Schindelin at gmx.de>> wrote:

Hi Gerrit,

following Curtis' mail, we decided it'd be a good idea to add a Wiki page
about this:

http://fiji.sc/Maven_-_Frequently_Asked_Questions

I will suggest some changes:
for the build number plugin, this needs to be placed in the <build> section,
and I found setting <doUpdate> to true valuable.
Furthermore you need a scm section in the pom.

   <scm>
        <connection>scm:svn:http://myhost/myrepository</connection>
        <developerConnection>scm:svn:http://myhost/myrepository</developerConnection>
    </scm>

    <build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>buildnumber-maven-plugin</artifactId>
                <configuration>
                    <doUpdate>true</doUpdate>
                </configuration>
            </plugin>
        </plugins>
    </build>

Since maven is used for Fiji projects you better change :
mvn -Dimagej.app.directory=/Applications/ImageJ.app
to
mvn -Dimagej.app.directory=/Applications/Fiji.app

But I preferred to set it in the pom:
    <properties>
        <imagej.app.directory>/Applications/Fiji.app/</imagej.app.directory>
    </properties>

and for the code example I preferred to use:
        Manifest mf = Manifest.getManifest(this.getClass());
and you have to check for mf being null, which is the case when you run the class from the debugger, since in that case it isn't packaged in a jar file.


As Curtis suggested, you probably should make an update site.

Yes, thats the way I want to go!

If you do not want to provide an update site (for which you should
definitely use Fiji, to avoid doing exactly the same thing as the Fiji
updater again, unless, that is, you want to spend time reinventing the
wheel ;-)), you can always use the Fiji Package Maker:

http://fiji.sc/Make_Fiji_Package

Nice to have this available, some users in the lab are not connected to the internet.

I seriously do not know how to make things more convenient than that, but
if you do, I would be very thankful for your insights.
This is very convenient, I was not very familiar with Fiji, so I'm learning a lot now ;)
Hopefully this is also a good way for going into ImageJ2.

I am sure that Gabriel would appreciate help Mavenizing the incredibly
large plugin collection of his!

Today I made a maven project for all Gabriels Morphology java functions (not the macros).
Can I upload it to somewhere?

kindly,
Gerrit.


--------------------------------------------------
dr. ing. G (Gerrit) Polder
Wageningen UR, Biometris
P.O.Box 100, 6700 AC Wageningen, the Netherlands
http://www.wageningenur.nl/en/Persons/dr.ing.-G-Gerrit-Polder.htm
email: gerrit.polder at wur.nl<x-msg://3/gerrit.polder@wur.nl>
phone: +31.317.480751










More information about the ImageJ-devel mailing list