JAL-2905 added additional jvmarg for testng task conditional on the JVM identifying...
authorJim Procter <jprocter@issues.jalview.org>
Tue, 13 Feb 2018 12:49:25 +0000 (12:49 +0000)
committerJim Procter <jprocter@issues.jalview.org>
Tue, 13 Feb 2018 12:49:25 +0000 (12:49 +0000)
build.xml

index a414491..e9e6f6f 100755 (executable)
--- a/build.xml
+++ b/build.xml
@@ -17,7 +17,9 @@
  * You should have received a copy of the GNU General Public License along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
 -->
-<project name="jalviewX" default="usage" basedir=".">
+<project name="jalviewX" default="usage" basedir="."
+ xmlns:if="ant:if"
+    xmlns:unless="ant:unless">
   <target name="help" depends="usage" />
   <target name="usage" depends="init">
     <echo message="~~~Jalview Ant build.xml Usage~~~~" />
 
     <!-- default TestNG groups to run -->
     <property name="testng-groups" value="Functional" />
+    <!-- Java 9 JVM args -->
+    <condition property="java9">
+      <equals arg1="${ant.java.version}" arg2="9"/>
+    </condition>
 
     <!-- Don't change anything below here unless you know what you are doing! -->
     <!-- Url path for WebStart in JNLP file -->
         <pathelement location="${testOutputDir}" />
         <path refid="test.classpath" />
       </classpath>
+      <jvmarg value="--add-modules=java.se.ee" if:set="java9"/>
+      <jvmarg value="--illegal-access=warn" if:set="java9"/>
       <classfileset dir="${testOutputDir}" includes="**/*.class" />
     </testng>
   </target>