Login  Register

AW: AW: AW: AW: How to handle dependencies

Posted by Heerpa on Jan 28, 2014; 9:06am
URL: http://imagej.273.s1.nabble.com/Re-AW-How-to-handle-dependencies-tp5006206p5006310.html

 Hi Johannes
 >
 > > Maven now copies the plugin jar and the needed dpendencies into the
 > > copy of Fiji I usually work with. When I now start Fiji, it tells me
 > > that there are multiple conflicting dependencies and when I update
 > > Fiji, there are CriticalErrors, also about multiple jars.
 > > e.g.
 > > CriticalError: plugins/loci_plugins-4.4.10.jar Multiple
 > > locally-modified versions of plugins/loci_plugins-4.4.10.jar exist:
 > > C:\Users\ne85tib\Desktop\Fiji.app\plugins\loci_plugins-4.4-SNAPSHOT.
 > > ja
 > > r
 > >
 > > Do I understand correctly that I need to use exactly the same
 > > versions in maven as are used in the current Fiji plugin
 > > distribution? I tried to use version 4.4.10 of loci_plugins but Maven
did
 not find that somehow.
 >
 > The problem is that there are multiple versions of the same dependencies.
 > If all of those dependencies are developed according to SemVer
 > (http://semver.org) it is often possible to simply use the newest
 > version (SemVer suggests to indicate via the version number whether it
 > is safe to do
 > so: bug fixes increase the micro version, backwards-compatible
 > enhancements increase the minor version, backwards *incompatible*
 > changes increase the major version).
 >
 > Sadly, SemVer is not used for all of the components in the Fiji
 > universe, most notably for ImgLib2 and ImageJ 1.x itself.
 >
 > Having said that, Bio-Formats seems to be developed according to
 > SemVer, so it should be totally safe to tell the imagej-maven-plugin
 > to delete other versions when copying a dependency: You only need to
 > set the property "delete.other.versions" to "true". Example:
 >
 > mvn -Dimagej.app.directory=$HOME/Desktop/Fiji.app \
 > -Ddelete.other.versions=true
 
 I am using NetBeans, and just select "Clean and Build" when I want to
 compile the code / execute the pom. Therefore I guess command line is not
 suitable. Thus, I included the property
 
         <properties>
 
 <imagej.app.directory>C:\Users\ne85tib\Desktop\Fiji.app</imagej.app.dire
 ctory> <!-- Path to fiji here for testing the plugins and uploading to the
server
 -->
             <delete.other.versions>true</delete.other.versions> <!-- found
on
 http://imagej.1557.x6.nabble.com/Eclipse-Maven-workflow-depencies-
 copied-to-Fiji-app-directory-td5005804.html -->
         </properties>
 
 into my pom.xml (which is taken from  the minimal ij plugin-github
 repository), its parent is
 
  <parent>
  <groupId>org.scijava</groupId>
  <artifactId>pom-scijava</artifactId>
  <version>1.51</version>
  </parent>
 
 However, the other versions are not deleted - the same problem remains.
 NetBeans output tells me about which dependencies it copies during the
 copy-jars task but there is nothing on checking or deleting other versions.
Do
 you have any more suggestions?
 
 Best,
    Heinrich

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html