<div dir="ltr">Hi Michael,<div><br></div><div><div>> The POM for io.scif:scifio:jar:0.17.1 is missing, no dependency</div><div>> information available</div></div><div><br></div><div>Make sure you have the following <repositories> block in your POM:</div><div><br></div><div><div><span class="" style="white-space:pre">  </span><repositories></div><div><span class="" style="white-space:pre">               </span><repository></div><div><span class="" style="white-space:pre">                 </span><id>imagej.public</id></div><div><span class="" style="white-space:pre">                 </span><url><a href="http://maven.imagej.net/content/groups/public">http://maven.imagej.net/content/groups/public</a></url></div><div><span class="" style="white-space:pre">             </span></repository></div><div><span class="" style="white-space:pre">        </span></repositories></div></div><div><br></div><div>Then rebuild with the "-U" flag. I don't know how to do this from NetBeans, but you only need to do it once from the CLI -- then you can return to NetBeans and it should work.</div><div><br></div><div>Regards,</div><div>Curtis</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Dec 5, 2014 at 6:07 AM, Michael Ellis <span dir="ltr"><<a href="mailto:michael.ellis@dsuk.biz" target="_blank">michael.ellis@dsuk.biz</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">I have followed the advice offered by Curtis regarding adding the io.scif: scifio dependency to my POM<div><br></div><div>The dependency part of my POM looks like this:</div><div><br></div><div><div>    <dependencies></div><div>        <dependency></div><div>            <groupId>net.imglib2</groupId></div><div>            <artifactId>imglib2</artifactId></div><div>            <version>2.2.1-SNAPSHOT</version></div><div>            <type>jar</type></div><div>        </dependency></div><span class=""><div>        <dependency></div><div>            <groupId>io.scif</groupId></div><div>            <artifactId>scifio</artifactId></div><div>            <version>0.17.1</version></div></span><div>            <type>jar</type></div><div>        </dependency></div><div>    </dependencies></div></div><div><br></div><div>I am using NetBeans IDE, configured for use with maven project (I am slo using Java 8 and JavaFX)</div><div><br></div><div>However when I attempt to Build (or Build with Dependencies)  within NetBeans, I get the following error message:</div><div>============================================================</div><div><br></div><div><div>cd /Users/michaelellis/Documents/Development/MavenImgLib2FX; JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home "/Applications/NetBeans/NetBeans 8.0.app/Contents/Resources/NetBeans/java/maven/bin/mvn" install</div><div>Scanning for projects...</div><div>                                                                        </div><div>------------------------------------------------------------------------</div><div>Building MavenImgLib2FX 1.0-SNAPSHOT</div><div>------------------------------------------------------------------------</div><div>The POM for io.scif:scifio:jar:0.17.1 is missing, no dependency information available</div><div>------------------------------------------------------------------------</div><div>BUILD FAILURE</div><div>------------------------------------------------------------------------</div><div>Total time: 0.341s</div><div>Finished at: Fri Dec 05 10:34:41 GMT 2014</div><div>Final Memory: 7M/245M</div><div>------------------------------------------------------------------------</div><div>Failed to execute goal on project MavenImgLib2FX: Could not resolve dependencies for project biz.dsuk:MavenImgLib2FX:jar:1.0-SNAPSHOT: Failure to find io.scif:scifio:jar:0.17.1 in <a href="http://repo.maven.apache.org/maven2" target="_blank">http://repo.maven.apache.org/maven2</a> was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]</div><div><br></div><div>To see the full stack trace of the errors, re-run Maven with the -e switch.</div><div>Re-run Maven using the -X switch to enable full debug logging.</div><div><br></div><div>For more information about the errors and possible solutions, please read the following articles:</div><div>[Help 1] <a href="http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException" target="_blank">http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException</a></div><div><br></div><div>============================================================</div><div><br></div><div>If I open a terminal window and cd into the project directory and:</div><div><br></div><div><span style="white-space:pre-wrap">  </span>mvn clean package</div><div><br></div><div>It succeeds.</div><div><br></div><div>However, when I then attempt to run the project with:</div><div><br></div><div><span style="white-space:pre-wrap">      </span><span style="font-family:Monaco;font-size:10px">java -cp MavenImgLib2FX-1.0-SNAPSHOT.jar biz.dsuk.mavenimglib2fx.MainApp</span></div><div><span style="font-family:Monaco;font-size:10px"><br></span></div><div><span style="font-family:Monaco;font-size:10px">The application starts to execute but throws </span><font face="Monaco" size="1">“No compatible service: io.scif.SCIFIOService” exception.</font></div><div><div>============================================================</div></div><div><br></div><div><div style="margin:0px;font-size:10px;font-family:Monaco">img1=CellImg [20x30]</div><div style="margin:0px;font-size:10px;font-family:Monaco">BufferedImage=BufferedImage@3137c585: type = 10 ColorModel: #pixelBits = 8 numComponents = 1 color space = java.awt.color.ICC_ColorSpace@134d9d5f transparency = 1 has alpha = false isAlphaPre = false ByteInterleavedRaster: width = 707 height = 699 #numDataElements 1 dataOff[0] = 0</div><div style="margin:0px;font-size:10px;font-family:Monaco">Loading image...</div><div style="margin:0px;font-size:10px;font-family:Monaco">Exception in Application start method</div><div style="margin:0px;font-size:10px;font-family:Monaco">java.lang.reflect.InvocationTargetException</div><div style="margin:0px;font-size:10px;font-family:Monaco"><span style="white-space:pre-wrap">   </span>at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)</div><div style="margin:0px;font-size:10px;font-family:Monaco"><span style="white-space:pre-wrap">    </span>at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)</div><div style="margin:0px;font-size:10px;font-family:Monaco"><span style="white-space:pre-wrap">  </span>at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)</div><div style="margin:0px;font-size:10px;font-family:Monaco"><span style="white-space:pre-wrap">  </span>at java.lang.reflect.Method.invoke(Method.java:497)</div><div style="margin:0px;font-size:10px;font-family:Monaco"><span style="white-space:pre-wrap">       </span>at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:363)</div><div style="margin:0px;font-size:10px;font-family:Monaco"><span style="white-space:pre-wrap">       </span>at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:303)</div><div style="margin:0px;font-size:10px;font-family:Monaco"><span style="white-space:pre-wrap">       </span>at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)</div><div style="margin:0px;font-size:10px;font-family:Monaco"><span style="white-space:pre-wrap">    </span>at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)</div><div style="margin:0px;font-size:10px;font-family:Monaco"><span style="white-space:pre-wrap">  </span>at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)</div><div style="margin:0px;font-size:10px;font-family:Monaco"><span style="white-space:pre-wrap">  </span>at java.lang.reflect.Method.invoke(Method.java:497)</div><div style="margin:0px;font-size:10px;font-family:Monaco"><span style="white-space:pre-wrap">       </span>at sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:767)</div><div style="margin:0px;font-size:10px;font-family:Monaco">Caused by: java.lang.RuntimeException: Exception in Application start method</div><div style="margin:0px;font-size:10px;font-family:Monaco"><span style="white-space:pre-wrap">   </span>at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:875)</div><div style="margin:0px;font-size:10px;font-family:Monaco"><span style="white-space:pre-wrap">      </span>at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$150(LauncherImpl.java:157)</div><div style="margin:0px;font-size:10px;font-family:Monaco"><span style="white-space:pre-wrap">    </span>at com.sun.javafx.application.LauncherImpl$$Lambda$50/553264065.run(Unknown Source)</div><div style="margin:0px;font-size:10px;font-family:Monaco"><span style="white-space:pre-wrap">       </span>at java.lang.Thread.run(Thread.java:745)</div><div style="margin:0px;font-size:10px;font-family:Monaco">Caused by: java.lang.IllegalArgumentException: No compatible service: io.scif.SCIFIOService</div><div style="margin:0px;font-size:10px;font-family:Monaco"><span style="white-space:pre-wrap"> </span>at org.scijava.service.ServiceHelper.loadService(ServiceHelper.java:243)</div><div style="margin:0px;font-size:10px;font-family:Monaco"><span style="white-space:pre-wrap">  </span>at org.scijava.service.ServiceHelper.loadService(ServiceHelper.java:194)</div><div style="margin:0px;font-size:10px;font-family:Monaco"><span style="white-space:pre-wrap">  </span>at org.scijava.service.ServiceHelper.loadServices(ServiceHelper.java:170)</div><div style="margin:0px;font-size:10px;font-family:Monaco"><span style="white-space:pre-wrap"> </span>at org.scijava.Context.<init>(Context.java:244)</div><div style="margin:0px;font-size:10px;font-family:Monaco"><span style="white-space:pre-wrap">     </span>at org.scijava.Context.<init>(Context.java:203)</div><div style="margin:0px;font-size:10px;font-family:Monaco"><span style="white-space:pre-wrap">     </span>at org.scijava.Context.<init>(Context.java:142)</div><div style="margin:0px;font-size:10px;font-family:Monaco"><span style="white-space:pre-wrap">     </span>at org.scijava.Context.<init>(Context.java:128)</div><div style="margin:0px;font-size:10px;font-family:Monaco"><span style="white-space:pre-wrap">     </span>at io.scif.SCIFIO.<init>(SCIFIO.java:81)</div><div style="margin:0px;font-size:10px;font-family:Monaco"><span style="white-space:pre-wrap">    </span>at biz.dsuk.mavenimglib2fx.MainApp.start(MainApp.java:38)</div><div style="margin:0px;font-size:10px;font-family:Monaco"><span style="white-space:pre-wrap"> </span>at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$156(LauncherImpl.java:821)</div><div style="margin:0px;font-size:10px;font-family:Monaco"><span style="white-space:pre-wrap">   </span>at com.sun.javafx.application.LauncherImpl$$Lambda$53/681110827.run(Unknown Source)</div><div style="margin:0px;font-size:10px;font-family:Monaco"><span style="white-space:pre-wrap">       </span>at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$169(PlatformImpl.java:326)</div><div style="margin:0px;font-size:10px;font-family:Monaco"><span style="white-space:pre-wrap">   </span>at com.sun.javafx.application.PlatformImpl$$Lambda$47/693632176.run(Unknown Source)</div><div style="margin:0px;font-size:10px;font-family:Monaco"><span style="white-space:pre-wrap">       </span>at com.sun.javafx.application.PlatformImpl.lambda$null$167(PlatformImpl.java:295)</div><div style="margin:0px;font-size:10px;font-family:Monaco"><span style="white-space:pre-wrap"> </span>at com.sun.javafx.application.PlatformImpl$$Lambda$49/1260282780.run(Unknown Source)</div><div style="margin:0px;font-size:10px;font-family:Monaco"><span style="white-space:pre-wrap">      </span>at java.security.AccessController.doPrivileged(Native Method)</div><div style="margin:0px;font-size:10px;font-family:Monaco"><span style="white-space:pre-wrap">     </span>at com.sun.javafx.application.PlatformImpl.lambda$runLater$168(PlatformImpl.java:294)</div><div style="margin:0px;font-size:10px;font-family:Monaco"><span style="white-space:pre-wrap">     </span>at com.sun.javafx.application.PlatformImpl$$Lambda$48/1364335809.run(Unknown Source)</div><div style="margin:0px;font-size:10px;font-family:Monaco"><span style="white-space:pre-wrap">      </span>at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)</div><div style="margin:0px;font-size:10px;font-family:Monaco">Exception running application biz.dsuk.mavenimglib2fx.MainApp</div></div><div><div>============================================================</div></div><div><br></div><div>If I remove the calls to the SCIO code and build and run from the command line, all works well.</div><div><br></div><div>The SCIO source code that I am using is lifted/amended from one of the tutorials and is as follows:</div><div><br></div><div><div>============================================================</div><div>            imagePath = "8bit-signed&pixelType=int8&lengths=50,50,3,5,7&axes=X,Y,Z,Channel,Time.fake";</div><div>            System.out.println("Loading image... '" + imagePath + "'");</div><div>            SCIFIO scifio = new SCIFIO();</div><div>            final Reader reader = scifio.initializer().initializeReader(imagePath);</div><div>============================================================</div></div><div><br></div><div>This source code works file in the SCIFIO tutorial.</div><div><br></div><div>Any help gratefully appreciated!!!!!</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>— Michael Ellis</div></font></span><div><div class="h5"><div><br></div><div><br></div><div><br></div><div><br></div><div><div>On 3 Dec 2014, at 19:31, Curtis Rueden <<a href="mailto:ctrueden@WISC.EDU" target="_blank">ctrueden@WISC.EDU</a>> wrote:</div><br><blockquote type="cite"><div dir="ltr">Hi Michael,<div><br></div><div>> <span style="font-family:arial,sans-serif;font-size:13px">How do I establish what Maven projects I need to include? </span></div><div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px">One way to check is using the dependency-maven-plugin like so:</span></div><div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px">    mvn dependency:analyze</span></div><div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px">This will tell you:</span></div><div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px">A) Dependencies you declared but do not actually use; and</span></div><div><span style="font-family:arial,sans-serif;font-size:13px">B) Dependencies you did not declare directly, but actually need.</span></div><div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px">Note that this will only work if your project compiles successfully. In other words, it is easier to start with "too many" dependencies and pare down, rather than trying to "build up" from zero.</span></div><div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px">So in your case, you can start with the ImgLib2 Examples dependencies block, run dependency:analyze, and adjust the POM according to its recommendations.</span></div><div><br></div><div><div>> When I go to my NetBeans project dependence, select Add dependency,</div><div>> then type SCIF to the query text box, I get a huge list of</div><div>> possibilities.</div></div><div><br></div><div>The dependency you probably want is io.scif:scifio (i.e.: a groupId of io.scif, and an artifactId of scifio). Presumably at the latest version. You can search for that here:</div><div><br></div><div>   <a href="http://maven.imagej.net/index.html#nexus-search;gav~io.scif~scifio~~~" target="_blank">http://maven.imagej.net/index.html#nexus-search;gav~io.scif~scifio~~~</a><br></div><div><br></div><div>So your dependency block in this case would be:</div><div><br></div><div><div>    <dependency></div><div>      <groupId>io.scif</groupId></div><div>      <artifactId>scifio</artifactId></div><div>      <version>0.17.1</version></div><div>    </dependency></div></div><div><br></div><div>Note that that block of XML is available for copy-pasting from the link above.</div><div><br></div><div>> <span style="font-family:arial,sans-serif;font-size:13px">I am completely new to maven</span></div><div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div>For more information, see:</div><div>    <a href="http://imagej.net/Maven" target="_blank">http://imagej.net/Maven</a></div><div><br></div><div><span style="font-family:arial,sans-serif;font-size:13px">Regards,</span></div><div><span style="font-family:arial,sans-serif;font-size:13px">Curtis</span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 2, 2014 at 6:05 PM, Michael Ellis <span dir="ltr"><<a href="mailto:michael.ellis@dsuk.biz" target="_blank">michael.ellis@dsuk.biz</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">I am investigating the using ImgLib2 for a project.<div><br></div><div>I am using NetBeans and have managed to create a NetBeans Mavern project and have  added a dependency for ImgLib2 Core Library and that seems to be working OK.</div><div><br></div><div>I now want to add the least possible requirements for the purpose of opening some image files.</div><div><br></div><div>How do I establish what Maven projects I need to include? </div><div><br></div><div>I have cloned  the ImgLib2 Examples project and got that working but that seems to include all manner of things that I suspect I do not need.</div><div><br></div><div>When I go to my NetBeans project dependence, select Add dependency, then type SCIF to the query text box, I get a huge list of possibilities.</div><div><br></div><div>I am completely new to maven and so do not know what I am doing with it!</div><span><font color="#888888"><div><br></div><div>— Michael Ellis</div><div>Digital Scientific UK Ltd.</div><div><span style="border-collapse:separate;font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br></span><br>
</div>
<br></font></span></div><br>_______________________________________________<br>
ImageJ-devel mailing list<br>
<a href="mailto:ImageJ-devel@imagej.net" target="_blank">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>
<br></blockquote></div><br></div>
</blockquote></div><br></div></div></div></div><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>
<br></blockquote></div><br></div>