1
<?xml version="1.0" encoding="UTF-8"?>
38
<project name="diags-examples" default="diags-examples" basedir="../..">
39
<import file="build.xml"/>
42
<property name="diags.examples.dir" location="${build.dir}/diag-examples"/>
45
<property name="diags.examples.classes" location="${diags.examples.dir}/classes"/>
48
<property name="diags.examples.report" location="${diags.examples.dir}/report"/>
51
<target name="diags-examples" depends="run-en_US,run-ja,run-zh_CN,run-de"/>
54
<target name="run-en_US" depends="-build-runner,-def-runner">
55
<mkdir dir="${diags.examples.report}"/>
56
<runner lang="en" country="US" outfile="${diags.examples.report}/en_US.html"/>
60
<target name="run-ja" depends="-build-runner,-def-runner">
61
<mkdir dir="${diags.examples.report}"/>
62
<runner lang="ja" outfile="${diags.examples.report}/ja.html"/>
66
<target name="run-zh_CN" depends="-build-runner,-def-runner">
67
<mkdir dir="${diags.examples.report}"/>
68
<runner lang="zh" country="CN" outfile="${diags.examples.report}/zh_CN.html"/>
72
<target name="run-de" depends="-build-runner,-def-runner">
73
<mkdir dir="${diags.examples.report}"/>
74
<runner lang="de" outfile="${diags.examples.report}/de.html"/>
78
<target name="-build-runner" depends="build">
79
<mkdir dir="${diags.examples.classes}"/>
81
executable="${build.bin}/javac"
82
srcdir="test/langtools/tools/javac/diags"
83
destdir="${diags.examples.classes}"
84
includes="ArgTypeCompilerFactory.java,Example.java,FileManager.java,HTMLWriter.java,RunExamples.java,DocCommentProcessor.java"
86
includeAntRuntime="no"
87
debug="${javac.debug}"
88
debuglevel="${javac.debuglevel}">
89
<compilerarg line="--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED"/>
90
<compilerarg line="--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED"/>
91
<compilerarg line="--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED"/>
92
<compilerarg line="--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED"/>
93
<compilerarg line="--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED"/>
94
<compilerarg line="--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED"/>
99
<target name="-def-runner">
100
<macrodef name="runner">
101
<attribute name="lang"/>
102
<attribute name="country" default=""/>
103
<attribute name="outfile"/>
106
jvm="${langtools.jdk.home}/bin/java"
107
dir="test/langtools/tools/javac/diags"
108
classpath="${diags.examples.classes};${dist.lib.dir}/javac.jar;${dist.lib.dir}/javap.jar"
109
classname="RunExamples">
110
<jvmarg value="-Duser.language=@{lang}"/>
111
<jvmarg value="-Duser.country=@{country}"/>
112
<jvmarg value="-Dtest.classes=${diags.examples.classes}"/>
113
<arg value="-examples"/>
114
<arg value="examples"/>
116
<arg file="@{outfile}"/>
117
<arg value="-showFiles"/>
118
<arg value="-title"/>
119
<arg value="Examples of javac diagnostics"/>
120
<jvmarg line="--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED"/>
121
<jvmarg line="--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED"/>
122
<jvmarg line="--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED"/>
123
<jvmarg line="--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED"/>
124
<jvmarg line="--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED"/>
125
<jvmarg line="--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED"/>