Fix build failures of tutorials when running against Java 7

This commit is contained in:
Jaikiran Pai 2018-07-25 10:16:10 +05:30
parent 55d9cb6595
commit 43ddccb859
1 changed files with 9 additions and 0 deletions

View File

@ -24,6 +24,12 @@
<import file="build.xml"/>
<!-- Java 7 runs into TLS protocol issues when dealing with repositories
that no longer support older protocols -->
<condition property="java.sysprop.https.protocols" value="" else="TLSv1.2">
<javaversion atleast="1.8"/>
</condition>
<macrodef name="run-tutorial">
<attribute name="antfile"/>
<attribute name="output"/>
@ -58,6 +64,9 @@
<sysproperty key="ivy.local.default.root" value="${tutorial.local-repo}"/>
<sysproperty key="ivy.cache.ttl.default" value="1s"/>
<sysproperty key="skip.download" value="true"/>
<!-- We select specific HTTPS protocols, based on the Java version we are running
on -->
<sysproperty key="https.protocols" value="${java.sysprop.https.protocols}"/>
<arg line="-f @{antfile}"/>
<arg line="@{target}"/>
</java>