8243000: javac only build fails after removal of Nashorn

Adjusting langtools ant build and Idea project to Nashorn removal.

Co-authored-by: Maurizio Cimadamore <maurizio.cimadamore@oracle.com>
Reviewed-by: mcimadamore, jlahoda
This commit is contained in:
Jan Lahoda 2020-04-28 10:43:29 +02:00
parent 9cea1a5179
commit 65344142d3
6 changed files with 40 additions and 31 deletions

View File

@ -197,13 +197,15 @@ CP=$ANT_HOME/lib/ant.jar
rm -rf $CLASSES; mkdir $CLASSES
if [ "x$CYGPATH" = "x" ] ; then ## CYGPATH may be set in env.cfg
JAVAC_SOURCE_FILE=$IDEA_OUTPUT/src/idea/JdkIdeaAntLogger.java
JAVAC_SOURCE_FILE=$IDEA_OUTPUT/src/idea/IdeaLoggerWrapper.java
JAVAC_SOURCE_PATH=$IDEA_OUTPUT/src
JAVAC_CLASSES=$CLASSES
JAVAC_CP=$CP
else
JAVAC_SOURCE_FILE=`cygpath -am $IDEA_OUTPUT/src/idea/JdkIdeaAntLogger.java`
JAVAC_SOURCE_FILE=`cygpath -am $IDEA_OUTPUT/src/idea/IdeaLoggerWrapper.java`
JAVAC_SOURCE_PATH=`cygpath -am $IDEA_OUTPUT/src`
JAVAC_CLASSES=`cygpath -am $CLASSES`
JAVAC_CP=`cygpath -am $CP`
fi
$BOOT_JDK/bin/javac -d $JAVAC_CLASSES -cp $JAVAC_CP $JAVAC_SOURCE_FILE
$BOOT_JDK/bin/javac -d $JAVAC_CLASSES -sourcepath $JAVAC_SOURCE_PATH -cp $JAVAC_CP $JAVAC_SOURCE_FILE

View File

@ -1,10 +1,9 @@
<!-- importing.xml -->
<project name="jdk">
<script language="javascript" classpath="${idea.dir}/classes">
var JdkLogger = Java.type("idea.JdkIdeaAntLogger");
new JdkLogger(project)
</script>
<taskdef name="wrapLogger" classname="idea.IdeaLoggerWrapper" classpath="${idea.dir}/classes"/>
<wrapLogger/>
<macrodef name="call-make">
<attribute name="dir"/>

View File

@ -0,0 +1,13 @@
package idea;
import org.apache.tools.ant.Task;
/**
* This class implements a custom Ant task which replaces the standard Intellij IDEA Ant logger
* with a custom one which generates tighter output.
*/
public class IdeaLoggerWrapper extends Task {
public void execute() {
new JdkIdeaAntLogger(getProject());
}
}

View File

@ -88,21 +88,11 @@
<pathconvert pathsep="," property="src.module.dirs" refid="src.module.dirset"/>
<pathconvert property="xpatch.rest" pathsep=" --patch-module=" refid="src.module.dirset">
<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>
<regexpmapper from="^.*(/|\\)([^/\\]*)$" to='\2="${build.modules}\1\2"' />
</pathconvert>
<pathconvert property="xpatch.noquotes.rest" pathsep=" --patch-module=" refid="src.module.dirset">
<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>
<regexpmapper from="^([^/\\]*)(/|\\).*" to="\1=${build.modules}\2\1" />
</pathconvert>
<property name="xpatch.cmd" value="--patch-module=${xpatch.rest}"/>
@ -212,14 +202,7 @@
<target name="build-all-classes" depends="generate-sources">
<pathconvert property="xpatch.src.rest" pathsep=" --patch-module=" refid="src.module.dirset">
<scriptmapper language="javascript">
fs = project.getProperty("file.separator");
path_src = project.getProperty("src.dir");
path_sep = project.getProperty("path.separator");
path_gensrc = project.getProperty("build.gensrc");
mod = source.substr(source.lastIndexOf(fs)+1);
self.addMappedName(mod + "=" + path_src + fs + mod + path_sep + path_gensrc + fs + mod);
</scriptmapper>
<regexpmapper from="^.*(/|\\)([^/\\]*)$" to="\2=${src.dir}\1\2/share/classes${path.separator}${build.gensrc}\1\2" />
</pathconvert>
<property name="xpatch.src.cmd" value="--patch-module=${xpatch.src.rest}"/>
<pathconvert pathsep="," property="gensrc.module.dirs">

View File

@ -1,10 +1,9 @@
<!-- importing.xml -->
<project name="langtools" basedir = "../../..">
<script language="javascript" classpath=".idea/classes">
var LangtoolsLogger = Java.type("idea.LangtoolsIdeaAntLogger");
new LangtoolsLogger(project)
</script>
<taskdef name="wrapLogger" classname="idea.IdeaLoggerWrapper" classpath=".idea/classes"/>
<wrapLogger/>
<import file="../build.xml"/>

View File

@ -0,0 +1,13 @@
package idea;
import org.apache.tools.ant.Task;
/**
* This class implements a custom Ant task which replaces the standard Intellij IDEA Ant logger
* with a custom one which generates tighter output.
*/
public class IdeaLoggerWrapper extends Task {
public void execute() {
new LangtoolsIdeaAntLogger(getProject());
}
}