<taskdef resource="testngtasks" classpath="utils/testnglibs/testng.jar" />
<target name="testng" depends="buildTests">
+ <loadfile property="j11modules" srcFile="modules"/>
+ <echo message="j11libDir is '${j11libDir}'" />
+ <echo message="j11modules is '${j11modules}'" />
<testng outputDir="${reportDir}" haltOnFailure="false" groups="${testng-groups}" mode="testng"
verbose="2">
<classpath>
<path refid="test.classpath" />
</classpath>
<jvmarg value="--module-path=${j11libDir}:${java.home}/jmods" if:set="java11"/>
+ <jvmarg value="--add-modules=${j11modules}" if:set="java11"/>
<jvmarg value="--add-modules=java.se.ee" if:set="java9"/>
<jvmarg value="--illegal-access=warn" if:set="java9"/>
<classfileset dir="${testOutputDir}" includes="**/*.class" />
</condition>
<fail unless="propsSpecified" message="class.name property not specified."/>
<echo message="testng-groups is '${testng-groups}'" />
+ <loadfile property="j11modules" srcFile="modules"/>
<testng outputDir="${reportDir}" haltOnFailure="false" groups="${testng-groups}" mode="testng" verbose="2">
<classpath>
<pathelement location="${testOutputDir}" />
<path refid="test.classpath" />
</classpath>
<jvmarg value="--module-path=${j11libDir}:${java.home}/jmods" if:set="java11"/>
+ <jvmarg value="--add-modules=${j11modules}" if:set="java11"/>
<jvmarg value="--add-modules=java.se.ee" if:set="java9"/>
<jvmarg value="--illegal-access=warn" if:set="java9"/>
<classfileset dir="${testOutputDir}" includes="${class.name}" />
-com.sun.istack.runtime,com.sun.xml.bind,com.sun.xml.fastinfoset,com.sun.xml.streambuffer,com.sun.xml.txw2,com.sun.xml.ws.policy,java.activation,java.annotation,java.base,java.compiler,java.datatransfer,java.desktop,java.logging,java.management,java.management.rmi,java.naming,java.prefs,java.rmi,java.scripting,java.security.sasl,java.sql,java.xml,java.xml.bind,java.xml.soap,java.xml.ws,javax.jws,jdk.httpserver,jdk.jsobject,jdk.unsupported,jdk.xml.dom,org.jvnet.mimepull,org.jvnet.staxex
+com.sun.istack.runtime,com.sun.xml.bind,com.sun.xml.fastinfoset,com.sun.xml.streambuffer,com.sun.xml.txw2,com.sun.xml.ws.policy,java.activation,java.annotation,java.base,java.compiler,java.datatransfer,java.desktop,java.logging,java.management,java.management.rmi,java.naming,java.prefs,java.rmi,java.scripting,java.security.sasl,java.sql,java.xml,java.xml.bind,java.xml.soap,java.xml.ws,javax.jws,jdk.httpserver,jdk.jsobject,jdk.unsupported,jdk.xml.dom,org.jvnet.mimepull,org.jvnet.staxex
\ No newline at end of file
# creates file modules.new which is comma-separated list of modules needed, can be used like this in jlink argument
# and a java 11 JRE in j11jre/jre-new
-( for x in lib/*.jar j11lib/*.jar dist/jalview.jar; do echo $x >&2; jdeps --list-deps --module-path j11lib $x | grep -v Warning: | grep -v "JDK removed" | sed -e 's/^ *//;s/\/.*//;s/$/,/;'; done ) | sort -u | perl -p -e 'chomp;' | sed -e 's/,$//;' > modules.new
+( for x in lib/*.jar j11lib/*.jar dist/jalview.jar; do echo $x >&2; jdeps --list-deps --module-path j11lib $x | grep -v Warning: | grep -v "JDK removed" | sed -e 's/^ *//;s/\/.*//;s/$/,/;'; done ) | sort -u | perl -p -e 'chomp;' | perl -p -e 's/,$//;chomp;' > modules.new
if [ x$JAVA_HOME != x ]; then
jlink --no-header-files --no-man-pages --strip-debug --module-path "$JAVA_HOME/jmods:j11lib" --add-modules `cat modules.new` --compress=2 --output j11jre/jre-new
# or if you're in a hurry for a one-liner...
-#jlink --no-header-files --no-man-pages --strip-debug --module-path "$JAVA_HOME/jmods:j11lib" --add-modules ` ( for x in lib/*.jar j11lib/*.jar dist/jalview.jar; do echo $x >&2; jdeps --list-deps --module-path j11mod $x | grep -v "Warning:" | grep -v "JDK removed" | sed -e 's/^ *//;s/\/.*//;s/$/,/;'; done ) | sort -u | perl -p -e 'chomp;' | sed -e 's/,$//;' ` --compress=2 --output j11jre/jre-new
+#jlink --no-header-files --no-man-pages --strip-debug --module-path "$JAVA_HOME/jmods:j11lib" --add-modules ` ( for x in lib/*.jar j11lib/*.jar dist/jalview.jar; do echo $x >&2; jdeps --list-deps --module-path j11mod $x | grep -v "Warning:" | grep -v "JDK removed" | sed -e 's/^ *//;s/\/.*//;s/$/,/;'; done ) | sort -u | perl -p -e 'chomp;' | perl -p -e 's/,$//;chomp;' ` --compress=2 --output j11jre/jre-new