<div dir="ltr">Hi Gerrit,<div><br></div><div><br></div><div><div>> My users does not have Fiji, they need a very simple approach, so they</div><div>> have standard ImageJ installed and the only thing they need to do is</div>

<div>> to copy the jar file I send them to the plugins folder.</div><div>></div><div>> So I have to think about a new approach to deploy my software to my</div><div>> users.</div><div><br></div><div style>I would suggest setting up an update site:</div>

<div style>    <a href="http://fiji.sc/How_to_set_up_and_populate_an_update_site">http://fiji.sc/How_to_set_up_and_populate_an_update_site</a></div><div style><br></div><div style><div>From a developer perspective, this makes your dependency management safer, because you will not be tempted to bundle potentially incompatible versions of your dependencies within a single "uber-JAR."</div>

<div><br></div></div><div style>From a user perspective, your users can add it to their Fiji installation:</div><div style>    <a href="http://fiji.sc/How_to_follow_a_3rd_party_update_site">http://fiji.sc/How_to_follow_a_3rd_party_update_site</a></div>

<div style><br></div><div style>And they will no longer need to update your JAR file(s) manually. Whenever you release a new version, Fiji will inform them, and they simply click a button to update.</div><div style><br></div>

<div style>Alternately, if you really want to keep supporting ImageJ1 sans Fiji, you can use the maven-assembly-plugin to create an uber-JAR that bundles all your dependencies and code into a single JAR. (E.g., for the Bio-Formats project, we have "loci_tools.jar".) But as mentioned above, you may have dependency version conflicts if you bundle version A of a dependency, and a different uber-JAR bundles version B.</div>

<div style><br></div><div style><br></div><div class="gmail_extra"><div class="gmail_extra">>         //context = ?????????</div><div><br></div><div style>    context = new ImageJ(true); // create an empty context</div>

<div style><br></div><div style>The "empty" context (i.e., with no services) should suffice for your use case. Or if you want to lean on any ImageJ2 services, you can do:</div><div style><br></div><div style>    context = new ImageJ(); // create a full-featured context</div>

<div style><br></div><div style>Or to avoid the ij-core dependency, you can just copy the Manifest parsing code from ImageJ2's Manifest.getManifest method:</div><div style><br></div><div style>    <a href="https://github.com/imagej/imagej/blob/7ffe00ef/core/core/src/main/java/imagej/util/Manifest.java#L133">https://github.com/imagej/imagej/blob/7ffe00ef/core/core/src/main/java/imagej/util/Manifest.java#L133</a></div>

<div style><br></div><div style>HTH,</div><div style>Curtis</div><div style><br></div><br><div class="gmail_quote">On Tue, Jan 15, 2013 at 9:31 AM, Polder, Gerrit <span dir="ltr"><<a href="mailto:gerrit.polder@wur.nl" target="_blank">gerrit.polder@wur.nl</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Johannes,<br>
<br>
thanks a lot, I'm getting progress.<br>
<div class="im"><br>
On 15 Jan 2013, at 01:12, Johannes Schindelin <<a href="mailto:Johannes.Schindelin@gmx.de">Johannes.Schindelin@gmx.de</a>> wrote:<br>
<br>
>> 1- what does the pom version mean, and which version should I use, I<br>
>> found different numbers in the examples.<br>
><br>
> If I understand correctly, you are referring to the version number here:<br>
><br>
</div>I'm referring to the scijave version number, which is 1.25 in my downloaded example project.<br>
<a href="https://github.com/imagej/minimal-ij1-plugin/blob/master/pom.xml#L11" target="_blank">https://github.com/imagej/minimal-ij1-plugin/blob/master/pom.xml#L11</a><br>
<div class="im"><br>
>> 2- how is the imagej version determined<br>
>> (<version>${imagej1.version}</version>) ?<br>
><br>
> It is defined in the SciJava POM, as a version range:<br>
><br>
> <a href="https://github.com/scijava/scijava-common/blob/master/pom-scijava/pom.xml#L21" target="_blank">https://github.com/scijava/scijava-common/blob/master/pom-scijava/pom.xml#L21</a><br>
><br>
> Basically, it says: every version from 1.45s on is good enough for us.<br>
><br>
> If it is actually not good enough for your project, e.g. because you<br>
> require a feature Wayne introduced in, say, 1.47b, you need to override<br>
> that setting in your pom.xml in the properties section:<br>
><br>
>       <properties><br>
>               <imagej1.version>1.47b</imagej1.version><br>
>       </properties><br>
><br>
> You could also decide that a version range [1.47b,) is preferable, of<br>
> course.<br>
><br>
</div>ok, thanks, this makes it clear.<br>
<div class="im"><br>
>> 3- During build I see the following message: Property<br>
>> 'imagej.app.directory' unset; Skipping copy-jars<br>
>> So it must be possible to place the jar into my own imagej installation,<br>
>> how?<br>
><br>
> You can set the property either in the <properties> section of your<br>
> pom.xml as described for imagej1.version above, or via the command-line.<br>
> Probably Netbeans lets you define that, too, but since I am not using<br>
> Netbeans myself, I cannot tell you how, sorry!<br>
><br>
</div>I added it to the pom file and it works ok, that is to say, for Fiji.<br>
I have both Fiji and ImageJ installed.<br>
For Fiji the generated jars are copied to /Application/Fiji.app/jars which is ok.<br>
For ImageJ thay are copied to /Application/ImageJ/jars, but that folder is not used by the ImageJ application.<br>
There the ij.jar is buried somewhere in the package contents.<br>
In my previous ant build.xml I pointed to this files in order to run and debug  IJ from netbeans.<br>
<br>
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.<br>
The plugin is also started from the startup macros.txt and the imagej menu is hidden.<br>
<br>
So I have to think about a new approach to deploy my software to my users.<br>
<div class="im"><br>
><br>
>> 5- The process_pixels application does not quit properly, I have to stop<br>
>> it from netbeans.<br>
><br>
> Sorry, do you have more information about that? I do not understand the<br>
> issue.<br>
<br>
</div>after quitting the application from the file menu or command-Q it froze  and I had to force quit it from netbeans.<br>
But for some unknown reason it works now, maybe the 'imagej.app.directory' setting?<br>
don't bother!<br>
<div class="im"><br>
><br>
>> 6- My software is dependent from other plugins, such as particle8 from<br>
>> Gabriel Landini's Morphology, can/is this incorporated in the imagej<br>
>> maven repository?<br>
><br>
> The easiest way to do that would probably to install it locally for the<br>
> moment. Please see Maven's console log for details how to do that after<br>
> specifying a dependency, e.g.<br>
><br>
>               <dependency><br>
>                       <groupId>uk.ac.bham.dentistry</groupId><br>
>                       <artifactId>Particles8_</artifactId><br>
>                       <version>1.6</version><br>
>               </dependency><br>
><br>
> (I took the version number from the web site, and constructed the groupId<br>
> from the web site, too. Note that you will need to wrap the .class files<br>
> in a .jar file before installing it locally.)<br>
<br>
</div>will have a look at this, does Gabriel have no plans to include Morphology and his other stuff in Fiji?<br>
<div class="im"><br>
><br>
>> 7- In my ant script I'm using a call to svnversion, in order to place<br>
>> the latest build number and date in the about box. Can this be done in<br>
>> maven?<br>
><br>
> The way this is done in Maven is by using the buildnumber plugin. This<br>
> will put the current revision into the MANIFEST.MF under the tag<br>
> 'Implementation-Build'.<br>
><br>
> You probably want to depend on ij-core (groupId net.imagej, version<br>
> 2.0.0-SNAPSHOT for now) to retrieve that:<br>
><br>
> <a href="http://jenkins.imagej.net/job/ImageJ-daily/javadoc/imagej/util/Manifest.html#getManifest(java.lang.Class)" target="_blank">http://jenkins.imagej.net/job/ImageJ-daily/javadoc/imagej/util/Manifest.html#getManifest(java.lang.Class)</a><br>


><br>
> and<br>
><br>
> <a href="http://jenkins.imagej.net/job/ImageJ-daily/javadoc/imagej/util/Manifest.html#getImplementationBuild()" target="_blank">http://jenkins.imagej.net/job/ImageJ-daily/javadoc/imagej/util/Manifest.html#getImplementationBuild()</a><br>


><br>
<br>
</div>can you send me an example, how can I get the context of the jar file? , I have the following<br>
<br>
import imagej.util.Manifest;<br>
…………..<br>
        //context = ?????????<br>
        Manifest mf = context.getManifest();<br>
        String vn = mf.getImplementationBuild();<br>
<br>
thanks for your help,<br>
Gerrit.<br>
<div class=""><div class="h5"><br>
<br>
<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
ImageJ-devel mailing list<br>
<a href="mailto:ImageJ-devel@imagej.net">ImageJ-devel@imagej.net</a><br>
<a href="http://imagej.net/mailman/listinfo/imagej-devel" target="_blank">http://imagej.net/mailman/listinfo/imagej-devel</a><br>
</div></div></blockquote></div><br></div></div></div>