Hi Davide, > On 13 Sep 2016, at 14:57, Davide Giannella <[email protected]> wrote: > > Sorry if it's redundant but I didn't have the time yet to check the commits. > > Here's, from another project I worked on, how to enforce a specific java > version at compile time. > > The build will fail if it's not compiled with the appropriate java version
I think the enforcer plugin allows to enforce given version of javac - eg. in order to compile Oak 1.0, 1.2 or 1.4 code you have to have JDK 1.6 installed on your machine. If you try to compile the code with a newer javac version (eg. you have only 1.8 installed locally), it’ll break. On the other hand, the animal-sniffer plugin analyses the source code and makes sure it doesn’t use any API introduced in newer JDKs than configured in pom.xml. You can use it with any JDK you have. You don’t need to have JDK 1.6 installed locally to compile to the historic Oak branch. Both plugins will break the build if someone uses new, unsupported API. However, the enforcer requires the developer to install the old JDK, while animal-sniffer doesn’t, so I think the latter is a better option. Marcel has already enabled the animal-sniffer on all the branches, so I think we shouldn’t run into similar issues in the future. Regards, Tomek -- Tomek Rękawek | Adobe Research | www.adobe.com [email protected]
smime.p7s
Description: S/MIME cryptographic signature
