<div dir="ltr">Hi Tobi,<div><br></div><div><div>> [ERROR]</div><div>> /Users/pietzsch/workspace/BigDataViewer/bigdataviewer-server/src/main/java/bdv/server/BigDataServer.java:[248,46]</div><div>> multi-catch statement is not supported in -source 1.5</div></div><div>></div><div>> <span style="font-size:12.8000001907349px">However, shouldn’t this be already automatically done by setting scijava.jvm.version=1.7???</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">Whoa, strange. Especially since it says *1.5*, which is the Maven default...</span></div><div><br></div><div>Furthermore, I cannot reproduce this problem on my system. Building with Java 6, Java 7 or Java 8 (with JAVA_HOME set accordingly), and with only the scijava.jvm.version set to 1.7, I am able to build the project successfully.</div><div><br></div><div>I pushed some changes to master, so that we can see whether Jenkins has a problem with it.</div><div><br></div><div>Regards,</div><div>Curtis</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 11, 2015 at 9:58 AM, Tobias Pietzsch <span dir="ltr"><<a href="mailto:pietzsch@mpi-cbg.de" target="_blank">pietzsch@mpi-cbg.de</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">Hi,<div><br></div><div>maybe one of the maven experts can shed some light on the following behaviour…</div><div><br></div><div>In my bigdataviewer-server pom.xml file (<a href="https://github.com/bigdataviewer/bigdataviewer-server/blob/84b6724ccdefbdcf787f4896a102bc39d415063a/pom.xml" target="_blank">https://github.com/bigdataviewer/bigdataviewer-server/blob/84b6724ccdefbdcf787f4896a102bc39d415063a/pom.xml</a>)</div><div>I want to set source compatibility to 1.7.</div><div>I tried to do this by specifying</div><div><div style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(78,145,146)"><span style="color:#000000"><span style="white-space:pre-wrap"> </span></span><span style="color:#009193"><</span>properties<span style="color:#009193">></span></div><div style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(78,145,146)"><span style="color:#000000"><span style="white-space:pre-wrap"> </span></span><span style="color:#009193"><</span>scijava.jvm.version<span style="color:#009193">></span><span style="color:#000000">1.7</span><span style="color:#009193"></</span>scijava.jvm.version<span style="color:#009193">></span></div><div style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(78,145,146)"><span style="color:#000000"><span style="white-space:pre-wrap"> </span></span><span style="color:#009193"></</span>properties<span style="color:#009193">></span></div></div><div><div>Strangely, this alone does not solve the problem. mvn on the command line says:</div></div><div>...</div><div><div>INFO] -------------------------------------------------------------</div><div>[ERROR] COMPILATION ERROR :</div><div>[INFO] -------------------------------------------------------------</div><div>[ERROR] /Users/pietzsch/workspace/BigDataViewer/bigdataviewer-server/src/main/java/bdv/server/BigDataServer.java:[248,46] multi-catch statement is not supported in -source 1.5</div><div> (use -source 7 or higher to enable multi-catch statement)</div></div><div>…</div><div><br></div><div>I can fix it by additionally putting this snippet:</div><div><div style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(78,145,146)"><span style="color:#000000"> <span style="white-space:pre-wrap"> </span></span><span style="color:#009193"><</span>build<span style="color:#009193">></span></div><div style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(78,145,146)"><span style="color:#000000"><span style="white-space:pre-wrap"> </span></span><span style="color:#009193"><</span>plugins<span style="color:#009193">></span></div><div style="margin:0px;font-size:11px;font-family:Monaco"><span style="white-space:pre-wrap"> </span> <span style="color:#009193"><</span><span style="color:#4e9192">plugin</span><span style="color:#009193">></span></div><div style="margin:0px;font-size:11px;font-family:Monaco"><span style="white-space:pre-wrap"> </span> <span style="color:#009193"><</span><span style="color:#4e9192">artifactId</span><span style="color:#009193">></span><span style="text-decoration:underline">maven</span>-compiler-<span style="text-decoration:underline">plugin</span><span style="color:#009193"></</span><span style="color:#4e9192">artifactId</span><span style="color:#009193">></span></div><div style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(78,145,146)"><span style="color:#000000"><span style="white-space:pre-wrap"> </span> </span><span style="color:#009193"><</span>configuration<span style="color:#009193">></span></div><div style="margin:0px;font-size:11px;font-family:Monaco"><span style="white-space:pre-wrap"> </span> <span style="color:#009193"><</span><span style="color:#4e9192">source</span><span style="color:#009193">></span>1.7<span style="color:#009193"></</span><span style="color:#4e9192">source</span><span style="color:#009193">></span></div><div style="margin:0px;font-size:11px;font-family:Monaco"><span style="white-space:pre-wrap"> </span> <span style="color:#009193"><</span><span style="color:#4e9192">target</span><span style="color:#009193">></span>1.7<span style="color:#009193"></</span><span style="color:#4e9192">target</span><span style="color:#009193">></span></div><div style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(78,145,146)"><span style="color:#000000"><span style="white-space:pre-wrap"> </span> </span><span style="color:#009193"></</span>configuration<span style="color:#009193">></span></div><div style="margin:0px;font-size:11px;font-family:Monaco"><span style="white-space:pre-wrap"> </span> <span style="color:#009193"></</span><span style="color:#4e9192">plugin</span><span style="color:#009193">></span></div><div style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(78,145,146)"><span style="color:#000000"><span style="white-space:pre-wrap"> </span></span><span style="color:#009193"></</span>plugins<span style="color:#009193">></span></div><div style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(78,145,146)"><span style="color:#000000"><span style="white-space:pre-wrap"> </span></span><span style="color:#009193"></</span>build<span style="color:#009193">></span></div></div><div><div>into the pom file.</div><div>However, shouldn’t this be already automatically done by setting scijava.jvm.version=1.7???</div><div>At least Eclipse seems to think so: I fact, the above snippet to configure maven-compiler-plugin I just copied from the “Effective POM” shown in Eclipse (for the pom without explicitly having the snippet of course…)</div><div><br></div><div>Does anyone have an explanation? Is this a maven bug?</div><div><br></div><div>all the best,</div><div>Tobias</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>