<div dir="ltr"><div><div><div><div><div>Hi all,<br><br>>looks like you can check the install/version of maven that eclipse is using by going to the menu Eclipse > Preferences > Maven > Installations<br><br></div><div>Thanks Jay. To clarify the history here:<br><br>1) We made a custom Maven enforcer rule that ensures no SNAPSHOT dependencies/parents are used, ever.<br>2) We then relaxed this restriction to allow SNAPSHOT couplings between modules in multi-module builds[1].<br>3) Eclipse used to simply ignore Maven enforcer rules - but Curtis made some updates to make this possible.<br>4) Stephan then discovered that our enforcer rule fails in Eclipse because each submodule is built individually, and our rule required building from the aggregator itself.<br></div><div><br></div>Anyway! I pushed a tentative fix to the scijava-maven-plugin to allow building individual submodules, and added a branch to trakEM2[2] with some instructions on how to test this locally. Using this change I'm able to import the trakEM2 projects into Eclipse with no enforcer failures.<br><br></div>This release will probably go into Fiji this week, at which point I can delete the trakEM2 branch. Just wanted to put it out there so interested parties could try it.<br></div><div><br></div>Best,<br></div>Mark<br><br></div>P.S. for a reminder why we're doing this, see [3]<br><div><div><div><div><br>[1] <a href="http://books.sonatype.com/mvnex-book/reference/multimodule.html">http://books.sonatype.com/mvnex-book/reference/multimodule.html</a><br>[2] <a href="https://github.com/trakem2/TrakEM2/tree/test-enforcer">https://github.com/trakem2/TrakEM2/tree/test-enforcer</a><br>[3] <a href="http://imagej.net/Reproducible_builds#Reproducible_builds">http://imagej.net/Reproducible_builds#Reproducible_builds</a><br></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 19, 2015 at 3:51 PM, Jay Warrick <span dir="ltr"><<a href="mailto:warrick@wisc.edu" target="_blank">warrick@wisc.edu</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">Hard for me to follow if you guys have solved this one or now but, Re: the potential of a maven version discrepancy between Eclipse and the CLI, it looks like you can check the install/version of maven that eclipse is using by going to the menu Eclipse > Preferences > Maven > Installations <div><br></div><div>Only now just found this now and I see it is a different install than I use at the command line. Looks like you can point it to a particular install though to make sure they are the same.</div><div><br></div><div>Cheers,</div><div><br></div><div>Jay</div><div><div class="h5"><div><br><div><div><blockquote type="cite"><div>On Mar 19, 2015, at 1:50 PM, Curtis Rueden <<a href="mailto:ctrueden@wisc.edu" target="_blank">ctrueden@wisc.edu</a>> wrote:</div><br><div><div dir="ltr">Hi Stephan,<div><br></div><div>To reword Mark's explanation:</div><div><br></div><div>The current behavior is a bug, which happens when you try to build _only_ the submodule, rather than building at the top level of the multi-module project.</div><div><br></div><div>It is triggered in Eclipse because Eclipse's project configuration runs each submodule's build separately, in some sense.</div><div><br></div><div>Mark said he would change the scijava-maven-plugin's use of the word "dependency" in the case of parent POM linkage, since a parent POM is not a "dependency" in Maven terms. (This is what he meant by "consider it reworded" -- like a genie saying "It's as good as done!")</div><div><br></div><div>We will also be exploring how to solve this bug in general, such that it _does_ become possible to build only a submodule of a multi-module project, without the enforcer throwing a tantrum.</div><div><br></div><div>Regards,</div><div>Curtis</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 19, 2015 at 1:36 PM, Stephan Saalfeld <span dir="ltr"><<a href="mailto:saalfelds@janelia.hhmi.org" target="_blank">saalfelds@janelia.hhmi.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Mark,<br>
<span><br>
> It is fine that mpicbg-trakem2 is a SNAPSHOT. The (P) indicates that a<br>
> SNAPSHOT parent is making things unhappy. If the object was not allowed to<br>
> be a SNAPSHOT you would see a (V). But it is misleading to call it a<br>
> dependency.. consider it reworded.<br>
><br>
<br>
</span>Sorry, I didn't get this.  Could you reword please ;) (I mean,<br>
seriously, I didn't get it)?  A trial:<br>
<br>
The complaint is that pom-trakem2, which is mpicbg-trakem2's parent is<br>
at a SNAPSHOT-version?<br>
<span><br>
> For SNAPSHOT-coupled multi-module builds, the contract is that SNAPSHOTS<br>
> are allowed as long as everything is built from the top-level. If you built<br>
> from a submodule, Maven could resolve the SNAPSHOT parent remotely, which<br>
> would then not be guaranteed to match the parent in your multi-module<br>
> project.<br>
><br>
<br>
</span>I guess I got it.<br>
<span><br>
> Eclipse is problematic because it splits each submodule out to the same<br>
> level as the parent pom, and resolves each individually, thus causing<br>
> RequireReproducibleBuilds to fail.<br>
><br>
<br>
</span>That sounds like a perfect explanation.  But since Eclipse is the<br>
primary development platform, that should definitely work.  I actually<br>
think that it is more important that builds build in Eclipse without red<br>
x-es than that builds are reproducible.  I am reverting to<br>
pom-fiji-7.2.0 in the meantime to give myself peace of mind.<br>
<span><br>
> I will look into ways of obtaining the reactor's parent pom locally[1], so<br>
> that we can build submodules directly.<br>
><br>
<br>
</span>Thanks a lot!<br>
<br>
Best,<br>
Stephan<br>
<div><div><br>
<br>
> [1] <a href="https://github.com/scijava/scijava-maven-plugin/issues/12" target="_blank">https://github.com/scijava/scijava-maven-plugin/issues/12</a><br>
><br>
> On Thu, Mar 19, 2015 at 12:53 PM, Stephan Saalfeld <<br>
> <a href="mailto:saalfelds@janelia.hhmi.org" target="_blank">saalfelds@janelia.hhmi.org</a>> wrote:<br>
><br>
> > Hi Curtis and Jay,<br>
> ><br>
> > I upgraded to Luna with the same effect.  7.2.0 works, 8.0.0 triggers<br>
> > the unspecific complaint as show in the OP.<br>
> ><br>
> > Run As > Maven build... + Debug Output<br>
> ><br>
> > says:<br>
> ><br>
> > [INFO] Property 'imagej.app.directory' unset; Skipping copy-jars<br>
> > [INFO]<br>
> > ------------------------------------------------------------------------<br>
> > [INFO] Reactor Summary:<br>
> > [INFO]<br>
> > [INFO] Aggregator project for Albert Cardona's TrakEM2 software suite<br>
> > SUCCESS [  5.098 s]<br>
> > [INFO] jars/VectorString.jar ............................. SUCCESS [<br>
> > 8.813 s]<br>
> > [INFO] mpicbg-trakem2 .................................... SUCCESS [<br>
> > 8.074 s]<br>
> > [INFO] plugins/TrakEM2_.jar .............................. SUCCESS<br>
> > [ 28.727 s]<br>
> > [INFO] jars/T2-NIT.jar ................................... SUCCESS<br>
> > [ 14.724 s]<br>
> > [INFO] jars/T2-TreelineGraph.jar ......................... SUCCESS<br>
> > [ 13.202 s]<br>
> > [INFO]<br>
> > ------------------------------------------------------------------------<br>
> > [INFO] BUILD SUCCESS<br>
> > [INFO]<br>
> > ------------------------------------------------------------------------<br>
> > [INFO] Total time: 01:19 min<br>
> > [INFO] Finished at: 2015-03-19T13:45:46-05:00<br>
> > [INFO] Final Memory: 250M/3444M<br>
> > [INFO]<br>
> > ------------------------------------------------------------------------<br>
> ><br>
> ><br>
> ><br>
> ><br>
> ><br>
> > But the error mark (red x) persists on all mudules' pom files with the<br>
> > unspecific error message.<br>
> ><br>
> > Next test, running Maven build... in mpicbg-trakem2-1.2.3-SNAPSHOT, or<br>
> > any of the other modules where the error manifests leads to more<br>
> > informative output:<br>
> ><br>
> ><br>
> > The following dependencies either are SNAPSHOT versions (V), contain<br>
> > SNAPSHOT parents (P), or contain SNAPSHOT dependencies (D):<br>
> ><br>
> >  (P)  sc.fiji:mpicbg-trakem2:1.2.3-SNAPSHOT<br>
> ><br>
> > [INFO]<br>
> > ------------------------------------------------------------------------<br>
> > [INFO] BUILD FAILURE<br>
> > [INFO]<br>
> > ------------------------------------------------------------------------<br>
> > [INFO] Total time: 3.043 s<br>
> > [INFO] Finished at: 2015-03-19T13:48:20-05:00<br>
> > [INFO] Final Memory: 33M/1930M<br>
> > [INFO]<br>
> > ------------------------------------------------------------------------<br>
> > [ERROR] Failed to execute goal<br>
> > org.apache.maven.plugins:maven-enforcer-plugin:1.3.1:enforce<br>
> > (enforce-rules) on project mpicbg-trakem2: Some Enforcer rules have<br>
> > failed. Look above for specific messages explaining why the rule failed.<br>
> > -> [Help 1]<br>
> > org.apache.maven.lifecycle.LifecycleExecutionException: Failed to<br>
> > execute goal<br>
> > org.apache.maven.plugins:maven-enforcer-plugin:1.3.1:enforce<br>
> > (enforce-rules) on project mpicbg-trakem2: Some Enforcer rules have<br>
> > failed. Look above for specific messages explaining why the rule failed.<br>
> >         at<br>
> ><br>
> > org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)<br>
> >         at<br>
> ><br>
> > org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)<br>
> >         at<br>
> ><br>
> > org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)<br>
> >         at<br>
> ><br>
> > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:108)<br>
> >         at<br>
> ><br>
> > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:76)<br>
> >         at<br>
> ><br>
> > org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)<br>
> >         at<br>
> ><br>
> > org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:116)<br>
> >         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361)<br>
> >         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)<br>
> >         at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)<br>
> >         at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213)<br>
> >         at org.apache.maven.cli.MavenCli.main(MavenCli.java:157)<br>
> >         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br>
> >         at<br>
> ><br>
> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)<br>
> >         at<br>
> ><br>
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)<br>
> >         at java.lang.reflect.Method.invoke(Method.java:606)<br>
> >         at<br>
> ><br>
> > org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)<br>
> >         at<br>
> > org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)<br>
> >         at<br>
> ><br>
> > org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)<br>
> >         at<br>
> > org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)<br>
> > Caused by: org.apache.maven.plugin.MojoExecutionException: Some Enforcer<br>
> > rules have failed. Look above for specific messages explaining why the<br>
> > rule failed.<br>
> >         at<br>
> > org.apache.maven.plugins.enforcer.EnforceMojo.execute(EnforceMojo.java:209)<br>
> >         at<br>
> ><br>
> > org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133)<br>
> >         at<br>
> ><br>
> > org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)<br>
> >         ... 19 more<br>
> > [ERROR]<br>
> > [ERROR]<br>
> > [ERROR] For more information about the errors and possible solutions,<br>
> > please read the following articles:<br>
> > [ERROR] [Help 1]<br>
> > <a href="http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException" target="_blank">http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException</a><br>
> ><br>
> ><br>
> ><br>
> > Wait, mpicbg-trakem2-1.2.3-SNAPSHOT is the project that I am building,<br>
> > not a dependency thereof---and it is at a SNAPSHOT version---yes,<br>
> > because I am in development cycle---that should work---no?<br>
> ><br>
> > Thanks for your help,<br>
> > Stephan<br>
> ><br>
> ><br>
> ><br>
> > On Thu, 2015-03-19 at 12:18 -0500, Curtis Rueden wrote:<br>
> > > Hi Stephan,<br>
> > ><br>
> > > > Do you know about this [, do you have an idea what it is[<br>
> > ><br>
> > > Probably, this started happening because of this change:<br>
> > ><br>
> > ><br>
> > <a href="https://github.com/scijava/pom-scijava/commit/5e6bddae9fcc965722c0fce1e2996c2e49b60411" target="_blank">https://github.com/scijava/pom-scijava/commit/5e6bddae9fcc965722c0fce1e2996c2e49b60411</a><br>
> > ><br>
> > > Which in general is a _good_ thing because it's better for Eclipse to<br>
> > tell<br>
> > > you than for Jenkins to tell you later after you pushed to master.<br>
> > ><br>
> > > If there are enforcer issues, they should be addressed, or if<br>
> > unaddressable<br>
> > > the enforcer can be squelched so that CLI and Jenkins also do not<br>
> > complain.<br>
> > ><br>
> > > The weird thing here is that your Eclipse is complaining but our CLI is<br>
> > > not. Jay may be on to something about a Maven version discrepancy. Why<br>
> > are<br>
> > > you still on Kepler? You could try upgrading to Luna—I know of at least<br>
> > one<br>
> > > annoying Maven-related bug that was fixed. You could also try using the<br>
> > Run<br>
> > > As > Maven build... and specifying the "Debug Output" option (which<br>
> > passes<br>
> > > the -X flag to Maven), and see if that tells you anything interesting.<br>
> > ><br>
> > > Regards,<br>
> > > Curtis<br>
> > ><br>
> > > On Wed, Mar 18, 2015 at 10:33 PM, Stephan Saalfeld <<br>
> > > <a href="mailto:saalfelds@janelia.hhmi.org" target="_blank">saalfelds@janelia.hhmi.org</a>> wrote:<br>
> > ><br>
> > > > Hi ImageJ developers,<br>
> > > ><br>
> > > > Eclipse complains<br>
> > > ><br>
> > > > Some Enforcer rules have failed. Look above for specific messages<br>
> > > > explaining why the rule failed.<br>
> > > ><br>
> > > ><br>
> > (org.apache.maven.plugins:maven-enforcer-plugin:1.3.1:enforce:enforce-rules:validate)<br>
> > > ><br>
> > > > in my TrakEM2 master for each module.  No further information (neither<br>
> > > > above nor below) is provided.<br>
> > > ><br>
> > > > A terminal `mvn clean install`, however, succeeds without complaints.<br>
> > > > So I assume that this is an Eclipse specific quirk.  I have Kepler<br>
> > > > Service Release 1 installed.<br>
> > > ><br>
> > > > Do you know about this [, do you have an idea what it is[, and do you<br>
> > > > know how to fix it]]]?<br>
> > > ><br>
> > > > Thanks in any case,<br>
> > > > Stephan<br>
> > > ><br>
> > > ><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>
> ><br>
> ><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>
<br>
</div></div></blockquote></div><br></div>
_______________________________________________<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></div></blockquote></div><br></div></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>