8187782: no ant build artifact should be produced under make/nashorn directory
authorsundar
Thu, 21 Sep 2017 18:00:44 +0530
changeset 47231 8fb3178bef87
parent 47230 9712e5af1645
child 47232 205e4c0dc8a3
8187782: no ant build artifact should be produced under make/nashorn directory Reviewed-by: hannesw, jlaskey
make/nashorn/build-benchmark.xml
make/nashorn/buildtools/nashorntask/build.xml
make/nashorn/buildtools/nashorntask/project.properties
make/nashorn/project.properties
--- a/make/nashorn/build-benchmark.xml	Thu Sep 21 16:21:14 2017 +0530
+++ b/make/nashorn/build-benchmark.xml	Thu Sep 21 18:00:44 2017 +0530
@@ -219,7 +219,8 @@
 
   <target name="-define-nashorn-task">
     <ant dir="${nashorntask.dir}" inheritAll="false"/>
-    <taskdef name="nashorn" classname="jdk.nashorn.ant.NashornTask" classpath="${nashorntask.dir}/dist/nashorntask.jar"/>
+    <taskdef name="nashorn" classname="jdk.nashorn.ant.NashornTask"
+        classpath="${nashorntask.dist.dir}/nashorntask.jar"/>
   </target>
 
   <!--
--- a/make/nashorn/buildtools/nashorntask/build.xml	Thu Sep 21 16:21:14 2017 +0530
+++ b/make/nashorn/buildtools/nashorntask/build.xml	Thu Sep 21 18:00:44 2017 +0530
@@ -27,18 +27,18 @@
   </target>
 
   <target name="prepare" depends="init">
-    <mkdir dir="${build.classes.dir}"/>
-    <mkdir dir="${dist.dir}"/>
+    <mkdir dir="${nashorntask.build.classes.dir}"/>
+    <mkdir dir="${nashorntask.dist.dir}"/>
   </target>
 
   <target name="clean" depends="init">
-    <delete dir="${build.dir}"/>
-    <delete dir="${dist.dir}"/>
+    <delete dir="${nashorntask.build.dir}"/>
+    <delete dir="${nashorntask.dist.dir}"/>
   </target>
 
   <target name="compile" depends="prepare" description="Compiles the nashorn ant tag sources">
     <javac srcdir="${src.dir}"
-           destdir="${build.classes.dir}"
+           destdir="${nashorntask.build.classes.dir}"
            debug="${javac.debug}"
            includeantruntime="true">
       <compilerarg value="-Xlint:unchecked"/>
@@ -47,7 +47,7 @@
   </target>
 
   <target name="jar" depends="compile" description="Creates nashorntask.jar">
-    <jar jarfile="${dist.jar}" basedir="${build.classes.dir}"/>
+    <jar jarfile="${nashorntask.dist.jar}" basedir="${nashorntask.build.classes.dir}"/>
   </target>
 
   <target name="dist" depends="jar"/>
--- a/make/nashorn/buildtools/nashorntask/project.properties	Thu Sep 21 16:21:14 2017 +0530
+++ b/make/nashorn/buildtools/nashorntask/project.properties	Thu Sep 21 18:00:44 2017 +0530
@@ -27,14 +27,14 @@
 javac.source=1.8
 javac.target=1.8
 
-build.classes.dir=${build.dir}/classes
+# This directory is removed when the project is cleaned:
+nashorntask.build.dir=../../../../build/nashorn/nashorntask
+nashorntask.build.classes.dir=${nashorntask.build.dir}/classes
 
 # This directory is removed when the project is cleaned:
-build.dir=build
-# This directory is removed when the project is cleaned:
-dist.dir=dist
-dist.jar=${dist.dir}/nashorntask.jar
-dist.javadoc.dir=${dist.dir}/javadoc
+nashorntask.dist.dir=${nashorntask.build.dir}/dist
+nashorntask.dist.jar=${nashorntask.dist.dir}/nashorntask.jar
+nashorntask.dist.javadoc.dir=${nashorntask.dist.dir}/javadoc
 
 javac.debug=true
 src.dir=src
--- a/make/nashorn/project.properties	Thu Sep 21 16:21:14 2017 +0530
+++ b/make/nashorn/project.properties	Thu Sep 21 18:00:44 2017 +0530
@@ -61,6 +61,7 @@
 
 # project directory of <nashorn> ant task
 nashorntask.dir=${nashorn.make.dir}/buildtools/nashorntask
+nashorntask.dist.dir=${build.dir}/nashorntask/dist
 
 # nashorn Shell tool
 nashorn.shell.tool=jdk.nashorn.tools.Shell