[ImageJ-devel] Netbeans and Maven

Polder, Gerrit gerrit.polder at wur.nl
Tue Jan 15 09:31:25 CST 2013


Johannes,

thanks a lot, I'm getting progress.

On 15 Jan 2013, at 01:12, Johannes Schindelin <Johannes.Schindelin at gmx.de> wrote:

>> 1- what does the pom version mean, and which version should I use, I
>> found different numbers in the examples.
> 
> If I understand correctly, you are referring to the version number here:
> 
I'm referring to the scijave version number, which is 1.25 in my downloaded example project.
https://github.com/imagej/minimal-ij1-plugin/blob/master/pom.xml#L11

>> 2- how is the imagej version determined
>> (<version>${imagej1.version}</version>) ?
> 
> It is defined in the SciJava POM, as a version range:
> 
> https://github.com/scijava/scijava-common/blob/master/pom-scijava/pom.xml#L21
> 
> Basically, it says: every version from 1.45s on is good enough for us.
> 
> If it is actually not good enough for your project, e.g. because you
> require a feature Wayne introduced in, say, 1.47b, you need to override
> that setting in your pom.xml in the properties section:
> 
> 	<properties>
> 		<imagej1.version>1.47b</imagej1.version>
> 	</properties>
> 
> You could also decide that a version range [1.47b,) is preferable, of
> course.
> 
ok, thanks, this makes it clear.

>> 3- During build I see the following message: Property
>> 'imagej.app.directory' unset; Skipping copy-jars
>> So it must be possible to place the jar into my own imagej installation,
>> how?
> 
> You can set the property either in the <properties> section of your
> pom.xml as described for imagej1.version above, or via the command-line.
> Probably Netbeans lets you define that, too, but since I am not using
> Netbeans myself, I cannot tell you how, sorry!
> 
I added it to the pom file and it works ok, that is to say, for Fiji.
I have both Fiji and ImageJ installed.
For Fiji the generated jars are copied to /Application/Fiji.app/jars which is ok.
For ImageJ thay are copied to /Application/ImageJ/jars, but that folder is not used by the ImageJ application.
There the ij.jar is buried somewhere in the package contents.
In my previous ant build.xml I pointed to this files in order to run and debug  IJ from netbeans.

My users does not have Fiji, they need a very simple approach, so they have standard ImageJ installed and the only thing they need to do is to copy the jar file I send them to the plugins folder.
The plugin is also started from the startup macros.txt and the imagej menu is hidden.

So I have to think about a new approach to deploy my software to my users.

> 
>> 5- The process_pixels application does not quit properly, I have to stop
>> it from netbeans.
> 
> Sorry, do you have more information about that? I do not understand the
> issue.

after quitting the application from the file menu or command-Q it froze  and I had to force quit it from netbeans.
But for some unknown reason it works now, maybe the 'imagej.app.directory' setting?
don't bother!

> 
>> 6- My software is dependent from other plugins, such as particle8 from
>> Gabriel Landini's Morphology, can/is this incorporated in the imagej
>> maven repository?
> 
> The easiest way to do that would probably to install it locally for the
> moment. Please see Maven's console log for details how to do that after
> specifying a dependency, e.g.
> 
> 		<dependency>
> 			<groupId>uk.ac.bham.dentistry</groupId>
> 			<artifactId>Particles8_</artifactId>
> 			<version>1.6</version>
> 		</dependency>
> 
> (I took the version number from the web site, and constructed the groupId
> from the web site, too. Note that you will need to wrap the .class files
> in a .jar file before installing it locally.)

will have a look at this, does Gabriel have no plans to include Morphology and his other stuff in Fiji?

> 
>> 7- In my ant script I'm using a call to svnversion, in order to place
>> the latest build number and date in the about box. Can this be done in
>> maven?
> 
> The way this is done in Maven is by using the buildnumber plugin. This
> will put the current revision into the MANIFEST.MF under the tag
> 'Implementation-Build'.
> 
> You probably want to depend on ij-core (groupId net.imagej, version
> 2.0.0-SNAPSHOT for now) to retrieve that:
> 
> http://jenkins.imagej.net/job/ImageJ-daily/javadoc/imagej/util/Manifest.html#getManifest(java.lang.Class)
> 
> and
> 
> http://jenkins.imagej.net/job/ImageJ-daily/javadoc/imagej/util/Manifest.html#getImplementationBuild()
> 

can you send me an example, how can I get the context of the jar file? , I have the following

import imagej.util.Manifest;
…………..
        //context = ?????????
        Manifest mf = context.getManifest();
        String vn = mf.getImplementationBuild();

thanks for your help,
Gerrit.









More information about the ImageJ-devel mailing list