<div dir="ltr">Hi Yohann,<div><br><div class="gmail_extra"><div class="gmail_quote">2013/6/13 Yohann Martineau <span dir="ltr"><<a href="mailto:yohann.martineau@gmail.com" target="_blank">yohann.martineau@gmail.com</a>></span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr">Hello,<br><br>On a fresh debian-wheezy install, I installed default openjdk and maven packages from standard debian repository and tried to build an already existing maven java project. This project uses java annotations.<br>
I got the following error:<br><br> maven debian generics are not supported in -source 1.3<br><br>As debian maven version is maven-3.0.4-3, I thought default source version would be at least java 1.5.<br>I removed debian maven package and installed apache-maven-3.0.5 from <a href="http://apache.org" target="_blank">apache.org</a>, and had no issue, project built as expected. I kept the default debian java package.<br>
I did not wrote a tiny java project using annotations as a demo for this issue but it should be the same on any project using annotations.</div></blockquote><div><br></div><div style>Maven core delegates all compilation tasks to a plugin, "maven-compiler-plugin". Each version of "maven-compiler-plugin" define its own default source and target version, which you can override in you pom.xml.</div>
<div style><br></div><div style>In this case, upstream (<a href="http://apache.org">apache.org</a>) provide more recent default version of this plugin than Debian package : Debian Wheezy has only 2.0.2 version whereas Maven from <a href="http://apache.org">apache.org</a> provide at least 2.3 (AFAIK). <br>
</div><div style>It's not ideal situation but it's difficult to do otherwise : we support both Maven 3.x and Maven 2.x series inside Debian...</div><div style><br></div><div style>I can give you two advices :</div>
<div style>- Always define your source and target version (otherwise it might depends on installed JDK)</div><div style><a href="http://maven.apache.org/plugins/maven-compiler-plugin/examples/set-compiler-source-and-target.html">http://maven.apache.org/plugins/maven-compiler-plugin/examples/set-compiler-source-and-target.html</a><br>
</div><div style>- It's also recommended to define version of each used plugin (IIRC, Maven 3.x will print a warning if version is not set explicitly in your pom.xml)</div><div style><br></div><div style>I'll keep this bug open for other users to find a quick solution to their issues and for me to find a solution to find a workaround.</div>
</div><div><br></div><div style>Cheers,</div>-- <br><div dir="ltr"><div>Damien - Debian Developper</div><div><a href="http://wiki.debian.org/DamienRaudeMorvan" target="_blank">http://wiki.debian.org/DamienRaudeMorvan</a></div>
</div>
</div></div></div>