$('#tableId').DataTable()); breaks my build on input mvn install(maven).

$('#tableId').DataTable()); breaks my build on input mvn install(maven).

Adarsh94Adarsh94 Posts: 10Questions: 6Answers: 0

If i remove this

$(document).ready(function() {
$('#tableCol').DataTable();
});

from my javascript file i will be able to install the build successfully. If i use it to implement data table on my existing table i get the following error:

[INFO]
[INFO] --- jasmine-maven-plugin:2.2:test (default) @ jirabatchapp ---
[INFO] jetty-8.2.0.v20160908
[INFO] Started SelectChannelConnector@0.0.0.0:64616
[INFO] Executing Jasmine Specs
Jul 20, 2018 4:31:17 PM org.openqa.selenium.phantomjs.PhantomJSDriverService <init>
INFO: executable: C:\Users\am062514\local\teststable\jira-batch\jirabatchapp\target\phantomjs-maven-plugin\phantomjs-1.9.7-windows\phantomjs.exe
Jul 20, 2018 4:31:17 PM org.openqa.selenium.phantomjs.PhantomJSDriverService <init>
INFO: port: 21752
Jul 20, 2018 4:31:17 PM org.openqa.selenium.phantomjs.PhantomJSDriverService <init>
INFO: arguments: [--webdriver=21752, --webdriver-logfile=C:\Users\am062514\local\teststable\jira-batch\jirabatchapp\phantomjsdriver.log]
Jul 20, 2018 4:31:17 PM org.openqa.selenium.phantomjs.PhantomJSDriverService <init>
INFO: environment: {}
PhantomJS is launching GhostDriver...
[INFO - 2018-07-20T21:31:18.520Z] GhostDriver - Main - running on port 21752
[INFO - 2018-07-20T21:31:18.792Z] Session [3d4d1440-8c64-11e8-a671-37677b44b0fd] - page.settings - {"XSSAuditingEnabled":false,"javascriptCanCloseWindows":true,"javascriptCanOpenWindows":true,"javascriptEnabled":true,"loadImages":true,"localToRemoteUrlAccessEnabled":false,"userAgent":"Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/534.34 (KHTML, like Gecko) PhantomJS/1.9.7 Safari/534.34","webSecurityEnabled":true}
[INFO - 2018-07-20T21:31:18.792Z] Session [3d4d1440-8c64-11e8-a671-37677b44b0fd] - page.customHeaders: - {}
[INFO - 2018-07-20T21:31:18.792Z] Session [3d4d1440-8c64-11e8-a671-37677b44b0fd] - Session.negotiatedCapabilities - {"browserName":"phantomjs","version":"1.9.7","driverName":"ghostdriver","driverVersion":"1.1.0","platform":"windows-8-32bit","javascriptEnabled":true,"takesScreenshot":true,"handlesAlerts":false,"databaseEnabled":false,"locationContextEnabled":false,"applicationCacheEnabled":false,"browserConnectionEnabled":false,"cssSelectorsEnabled":true,"webStorageEnabled":false,"rotatable":false,"acceptSslCerts":false,"nativeEvents":true,"proxy":{"proxyType":"direct"}}
[INFO - 2018-07-20T21:31:18.792Z] SessionManagerReqHand - _postNewSessionCommand - New Session Created: 3d4d1440-8c64-11e8-a671-37677b44b0fd
[ERROR - 2018-07-20T21:31:19.155Z] Session [3d4d1440-8c64-11e8-a671-37677b44b0fd] - page.onError - msg: TypeError: 'undefined' is not a function (evaluating '$('#tableCol').DataTable()')
[ERROR - 2018-07-20T21:31:19.155Z] Session [3d4d1440-8c64-11e8-a671-37677b44b0fd] - page.onError - stack:
(anonymous function) (http://localhost:64616/src/jql-search.js:342)
(anonymous function) (http://localhost:64616/webjars/jquery.js:3099)
(anonymous function) (http://localhost:64616/webjars/jquery.js:3211)
(anonymous function) (http://localhost:64616/webjars/jquery.js:3423)
completed (http://localhost:64616/webjars/jquery.js:3453)
[WARNING] JavaScript Console Errors:

  • TypeError: 'undefined' is not a function (evaluating '$('#tableCol').DataTable()')

[ERROR] Failed to execute goal com.github.searls:jasmine-maven-plugin:2.2:test (default) on project jirabatchapp: The jasmine-maven-plugin encountered an exception:
[ERROR] java.lang.RuntimeException: java.lang.RuntimeException: There were javascript console errors.
[ERROR]
[ERROR] JavaScript Console Errors:
[ERROR]
[ERROR] * TypeError: 'undefined' is not a function (evaluating '$('#tableCol').DataTable()')
[ERROR]
[ERROR]
[ERROR] at com.github.searls.jasmine.runner.SpecRunnerExecutor.execute(SpecRunnerExecutor.java:51)
[ERROR] at com.github.searls.jasmine.mojo.TestMojo.executeSpecs(TestMojo.java:229)
[ERROR] at com.github.searls.jasmine.mojo.TestMojo.run(TestMojo.java:196)
[ERROR] at com.github.searls.jasmine.mojo.AbstractJasmineMojo.execute(AbstractJasmineMojo.java:423)
[ERROR] at com.github.searls.jasmine.mojo.TestMojo.execute(TestMojo.java:183)
[ERROR] at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
[

My maven version is 3.1 and the following scripts:

Answers

This discussion has been closed.