8177667: Langtools ant build has issues with Windows file separators
authormcimadamore
Mon, 03 Apr 2017 12:40:41 +0100
changeset 44461 8e5061e5b34b
parent 44460 9adfc635dd7b
child 44462 32db52c675e7
child 44504 f4ca91b24d47
child 44505 d534f4b43d26
child 44563 01e04897d1e8
8177667: Langtools ant build has issues with Windows file separators Summary: Replace complex, non-portable regex logic for generating --patch-module option with a script mapper Reviewed-by: jjg, ksrini
langtools/make/build.properties
langtools/make/build.xml
langtools/make/intellij/runConfigurations/javadoc.xml
langtools/make/intellij/runConfigurations/jshell.xml
--- a/langtools/make/build.properties	Fri Mar 31 07:38:34 2017 -0700
+++ b/langtools/make/build.properties	Mon Apr 03 12:40:41 2017 +0100
@@ -56,7 +56,7 @@
 tool.javap.main.class=com.sun.tools.javap.Main
 tool.javah.main.class=com.sun.tools.javah.Main
 tool.sjavac.main.class=com.sun.tools.sjavac.Main
-tool.jshell.main.class=jdk.internal.jshell.tool.JShellTool
+tool.jshell.main.class=jdk.internal.jshell.tool.JShellToolProvider
 
 #test configuration:
 jtreg.tests=
--- a/langtools/make/build.xml	Fri Mar 31 07:38:34 2017 -0700
+++ b/langtools/make/build.xml	Mon Apr 03 12:40:41 2017 +0100
@@ -89,16 +89,22 @@
     </pathconvert>
 
     <pathconvert property="xpatch.rest" pathsep=" --patch-module=">
-        <regexpmapper from="/([^$/]+)$"
-                      to='\1="${build.modules}/\1"'
-                      handledirsep="yes"/>
+        <scriptmapper language="javascript">
+            fs = project.getProperty("file.separator");
+            path = project.getProperty("build.modules");
+            mod = source.substr(source.lastIndexOf(fs)+1);
+            self.addMappedName(mod + "=\"" + path + fs + mod + "\"");
+        </scriptmapper>
         <dirset dir="${src.dir}" includes="*.*"/>
     </pathconvert>
 
     <pathconvert property="xpatch.noquotes.rest" pathsep=" --patch-module=">
-        <regexpmapper from="/([^$/]+)$"
-                      to="\1=${build.modules}/\1"
-                      handledirsep="yes"/>
+        <scriptmapper language="javascript">
+            fs = project.getProperty("file.separator");
+            path = project.getProperty("build.modules");
+            mod = source.substr(source.lastIndexOf(fs)+1);
+            self.addMappedName(mod + "=" + path + fs + mod);
+        </scriptmapper>
         <dirset dir="${src.dir}" includes="*.*"/>
     </pathconvert>
 
@@ -341,7 +347,7 @@
             <attribute name="agentvm" default="true"/>
             <attribute name="verbose" default="${default.jtreg.verbose}"/>
             <attribute name="options" default="${other.jtreg.options}"/>
-            <attribute name="keywords" default="-keywords:!ignore"/>
+            <attribute name="ignore" default="-keywords:!ignore -exclude:${test.dir}/ProblemList.txt"/>
             <attribute name="jpda.jvmargs" default=""/>
             <attribute name="extra.jvmargs" default=""/>
             <attribute name="build.modules" default="${build.modules}"/>
@@ -360,7 +366,7 @@
                     failonerror="false" resultproperty="jtreg.@{name}.result"
                     vmoptions="${coverage.options} @{extra.jvmargs} ${xpatch.noquotes.cmd}">
                     <arg value="-debug:@{jpda.jvmargs}"/>
-                    <arg line="@{keywords}"/>
+                    <arg line="@{ignore}"/>
                     <arg line="@{options}"/>
                     <arg line="@{tests}"/>
                 </jtreg>
--- a/langtools/make/intellij/runConfigurations/javadoc.xml	Fri Mar 31 07:38:34 2017 -0700
+++ b/langtools/make/intellij/runConfigurations/javadoc.xml	Mon Apr 03 12:40:41 2017 +0100
@@ -1,8 +1,8 @@
 <component name="ProjectRunConfigurationManager">
   <configuration default="false" name="javadoc" type="Application" factoryName="Application">
     <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
-    <option name="MAIN_CLASS_NAME" value="com.sun.tools.javadoc.Main" />
-    <option name="VM_PARAMETERS" value='@XPATCH@' />
+    <option name="MAIN_CLASS_NAME" value="jdk.javadoc.internal.tool.Main" />
+    <option name="VM_PARAMETERS" value='@XPATCH@ --add-exports=jdk.javadoc/jdk.javadoc.internal.tool=ALL-UNNAMED' />
     <option name="PROGRAM_PARAMETERS" value="" />
     <option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
     <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="true" />
--- a/langtools/make/intellij/runConfigurations/jshell.xml	Fri Mar 31 07:38:34 2017 -0700
+++ b/langtools/make/intellij/runConfigurations/jshell.xml	Mon Apr 03 12:40:41 2017 +0100
@@ -1,7 +1,7 @@
 <component name="ProjectRunConfigurationManager">
   <configuration default="false" name="jshell" type="Application" factoryName="Application">
     <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
-    <option name="MAIN_CLASS_NAME" value="jdk.internal.jshell.tool.JShellTool" />
+    <option name="MAIN_CLASS_NAME" value="jdk.internal.jshell.tool.JShellToolProvider" />
     <option name="VM_PARAMETERS" value='@XPATCH@ --add-exports=jdk.jshell/jdk.internal.jshell.tool=ALL-UNNAMED' />
     <option name="PROGRAM_PARAMETERS" value="" />
     <option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />