<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">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">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 class="Apple-tab-span" style="white-space:pre">   </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 class="Apple-tab-span" style="white-space:pre">              </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 class="Apple-tab-span" style="white-space:pre">        </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 class="Apple-tab-span" style="white-space:pre">    </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 class="Apple-tab-span" style="white-space:pre">           </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 class="Apple-tab-span" style="white-space:pre">        </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 class="Apple-tab-span" style="white-space:pre">        </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 class="Apple-tab-span" style="white-space:pre">    </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 class="Apple-tab-span" style="white-space:pre">       </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 class="Apple-tab-span" style="white-space:pre">  </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 class="Apple-tab-span" style="white-space:pre">   </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 class="Apple-tab-span" style="white-space:pre">      </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 class="Apple-tab-span" style="white-space:pre">                </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 class="Apple-tab-span" style="white-space:pre">        </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></body></html>