THRIFT-3825 Javascript test dependency is no longer available
diff --git a/lib/Makefile.am b/lib/Makefile.am
index cb8d290..d8d9b47 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -17,7 +17,7 @@
 # under the License.
 #
 
-SUBDIRS = json xml 
+SUBDIRS = json xml
 PRECROSS_TARGET =
 
 if WITH_CPP
@@ -38,7 +38,7 @@
 PRECROSS_TARGET += precross-java
 # JavaScript unit test depends on java
 # so test only if java, ant & co is available
-SUBDIRS += js/test
+SUBDIRS += js
 endif
 
 if WITH_PYTHON
diff --git a/lib/js/Gruntfile.js b/lib/js/Gruntfile.js
index ae3783b..bff250f 100644
--- a/lib/js/Gruntfile.js
+++ b/lib/js/Gruntfile.js
@@ -44,13 +44,13 @@
         command: 'cd ../..; npm install'
       },
       ThriftGen: {
-        command: 'thrift -gen js -gen js:node -o test ../../test/ThriftTest.thrift'
+        command: '../../compiler/cpp/thrift -gen js -gen js:node -o test ../../test/ThriftTest.thrift'
       },
       ThriftGenJQ: {
-        command: 'thrift -gen js:jquery -gen js:node -o test ../../test/ThriftTest.thrift'
+        command: '../../compiler/cpp/thrift -gen js:jquery -gen js:node -o test ../../test/ThriftTest.thrift'
       },
       ThriftGenDeepConstructor: {
-        command: 'thrift -gen js -o test ../../test/JsDeepConstructorTest.thrift'
+        command: '../../compiler/cpp/thrift -gen js -o test ../../test/JsDeepConstructorTest.thrift'
       }
     },
     external_daemon: {
diff --git a/lib/js/Makefile.am b/lib/js/Makefile.am
new file mode 100644
index 0000000..9a27e9d
--- /dev/null
+++ b/lib/js/Makefile.am
@@ -0,0 +1,27 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+# Make sure this doesn't fail if ant is not configured.
+
+SUBDIRS = test
+
+check-local: all
+	npm install
+	./node_modules/.bin/grunt
+
diff --git a/lib/js/package.json b/lib/js/package.json
index a60c00a..4b693bb 100644
--- a/lib/js/package.json
+++ b/lib/js/package.json
@@ -2,13 +2,14 @@
   "name": "thrift",
   "version": "1.0.0",
   "devDependencies": {
-    "grunt": "~0.4.5",
-    "grunt-contrib-uglify": "~0.2.2",
-    "grunt-contrib-jshint": "~0.6.3",
-    "grunt-contrib-qunit": "~0.2.2",
-    "grunt-contrib-concat": "~0.3.0",
-    "grunt-jsdoc": "^0.6.0",
-    "grunt-external-daemon": "~1.1.0",
-    "grunt-shell": "~0.6.4"
+    "grunt": "^0.4.5",
+    "grunt-cli": "^1.2.0",
+    "grunt-contrib-uglify": "^1.0.1",
+    "grunt-contrib-jshint": "^1.0.0",
+    "grunt-contrib-qunit": "^1.2.0",
+    "grunt-contrib-concat": "^1.0.1",
+    "grunt-jsdoc": "^2.0.0",
+    "grunt-external-daemon": "^1.1.0",
+    "grunt-shell": "^1.3.0"
   }
 }
diff --git a/lib/js/test/build.xml b/lib/js/test/build.xml
index 9be73cf..b3a6b3e 100755
--- a/lib/js/test/build.xml
+++ b/lib/js/test/build.xml
@@ -94,13 +94,8 @@
 
   <target name="jslibs" depends="init, proxy">
     <get src="http://code.jquery.com/jquery-1.11.3.min.js" dest="${build}/js/lib/jquery.js" usetimestamp="true"/>
-    <get src="http://js-test-driver.googlecode.com/svn/trunk/JsTestDriver/contrib/qunit/src/equiv.js" dest="${build}/js/lib/equiv.js" usetimestamp="true"/>
-    <get src="http://js-test-driver.googlecode.com/svn/trunk/JsTestDriver/contrib/qunit/src/QUnitAdapter.js" dest="${build}/js/lib/QUnitAdapter.js" usetimestamp="true"/>
-
     <get src="http://code.jquery.com/qunit/qunit-1.18.0.js" dest="${build}/js/lib/qunit.js" usetimestamp="true"/>
     <get src="http://code.jquery.com/qunit/qunit-1.18.0.css" dest="${build}/js/lib/qunit.css" usetimestamp="true"/>
-    <!-- js-test-driver has issues with relative path...so we need a copy -->
-    <copy file="../src/thrift.js" todir="${build}/js"/>
   </target>
 
   <target name="compile" description="compile the test suite" depends="init, generate, resolve">
@@ -159,44 +154,6 @@
     </parallel>
   </target>
 
-  <target name="jstestdriver-server" description="start the js-test-driver server" depends="init, resolve">
-    <echo>Starting js-test-driver Server...</echo>
-    <java jar="${build}/lib/jstestdriver-1.3.5.jar" dir="." fork="true"
-            failonerror="true" output="${build}/log/jstestdriver-server.log">
-      <arg line="--port 9876"/>
-    </java>
-  </target>
-
-  <target name="jstestdriver" description="do unit tests with js-test-driver" depends="init, jstest, jslibs">
-    <parallel>
-      <java classname="test.Httpd" fork="true" timeout="10000"
-        classpathref="test.classpath" failonerror="false" output="${build}/log/unittest.log">
-        <arg value="../" />
-      </java>
-      <sequential>
-        <sleep seconds="2"/>
-        <echo>Running Unit Tests with js-test-driver</echo>
-          <java jar="${build}/lib/jstestdriver-1.3.5.jar" dir="." fork="true"
-            failonerror="true" output="${build}/log/jstestdriver.log">
-            <arg value="--config" />
-            <arg value="jsTestDriver.conf" />
-
-            <arg value="--reset" />
-            <arg value="--verbose" />
-
-            <arg value="--runnerMode" />
-            <arg value="DEBUG" />
-
-            <arg value="--tests" />
-            <arg value="all" />
-
-            <arg value="--testOutput" />
-            <arg value="${build}/test/log/" />
-        </java>
-      </sequential>
-    </parallel>
-  </target>
-
   <target name="generate">
     <exec executable="${thrift.compiler}" failonerror="true">
       <arg line="--gen java ${thrift.dir}/test/ThriftTest.thrift" />
@@ -257,9 +214,6 @@
       <dependency groupId="org.apache.httpcomponents" artifactId="httpclient" version="4.0.1"/>
       <dependency groupId="com.googlecode.jslint4java" artifactId="jslint4java-ant" version="1.4.6"/>
       <dependency groupId="eu.medsea.mimeutil" artifactId="mime-util" version="2.1.3"/>
-
-      <!-- get jstestdriver.jar via maven-->
-      <dependency groupId="com.googlecode.jstd-maven-plugin" artifactId="jstd-maven-plugin" version="1.3.5.1"/>
     </artifact:dependencies>
 
     <!-- Copy the dependencies to the build/lib dir -->