You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by sumittyagi <ja...@gmail.com> on 2011/10/01 01:03:21 UTC
Maven javascript plugin (Trying to skip files)
I am trying to use Maven javascript plugin with QUnit, to unit test
javascript files...
Currently I am just trying to setup the environment... and few files are
giving errors when I build the project.
[INFO] Executing QUnit tests
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] : java.lang.RuntimeException:
com.gargoylesoftware.htmlunit.ScriptExcepti
on: TypeError: Cannot call method "request" of undefined
(file:/C:/SVN/CMS/media
library/trunk/target/javascript/src/medialibrary/searchresults.js#1170)
There was a problem executing QUnit tests
com.gargoylesoftware.htmlunit.ScriptException: TypeError: Cannot call method
"re
quest" of undefined
(file:/C:/SVN/CMS/medialibrary/trunk/target/javascript/src/m
edialibrary/searchresults.js#1170)
[INFO]
------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 16 seconds
[INFO] Finished at: Fri Sep 30 15:54:12 MST 2011
[INFO] Final Memory: 29M/71M
[INFO]
------------------------------------------------------------------------
So, I decided to skip these fiiles via my POM file.... and my Plugin looks
like this...
<plugin>
<groupId>edu.apollogrp.javascript</groupId>
<artifactId>javascript-maven-plugin</artifactId>
<version>0.9.9</version>
<executions>
<execution>
<goals>
<goal>sources</goal>
<goal>testSources</goal>
<goal>testResources</goal>
<goal>instrument</goal>
<goal>test</goal>
</goals>
<configuration>
<jsSrcDir>src/main/content/jcr_root/etc/apollogrp/javascripts</jsSrcDir>
<jsTestSrcDir>src/test/javascript</jsTestSrcDir>
<showSuccessMessages>false</showSuccessMessages>
<skipInstrumentation>false</skipInstrumentation>
<doNotInstrument>
<source>/medialibrary/searchresults.js</source>
<source>/medialibrary/mediasearchresults.js</source>
<source>/medialibrary/flowplayer.controls-3.0.2_apollo.js</source>
</doNotInstrument>
<sourcesToSkip>
<source>medialibrary/searchresults.js</source>
<source>medialibrary/mediasearchresults.js</source>
<source>medialibrary/flowplayer.controls-3.0.2_apollo.js</source>
</sourcesToSkip>
<preloadSources>
<source>../../../lib/sinon-1.0.0.js</source>
<source>../../../lib/sinon-qunit-1.0.0.js</source>
<source>../../../lib/jquery-1.5.js</source>
<source>../../../lib/jquery.mockjax.js</source>
<source>medialibrary/jquery.tools.min.js</source>
<source>medialibrary/mcmsutils.js</source>
<source>medialibrary/5mincalls.js</source>
<source>medialibrary/flowplayer-3.2.4.min.js</source>
<source>medialibrary/flowplayermodulewplist.js</source>
<source>medialibrary/flowplayermodulewplist_ada.js</source>
<source>medialibrary/flowplayermodulewplist_details_v3.2.js</source>
<source>medialibrary/flowplayermodulewplist_embd.js</source>
<source>medialibrary/flowplayermodulewplist_embd_ada.js</source>
<source>medialibrary/flowplayermodulewplist_univ100_v3.2.js</source>
<source>medialibrary/flowplayermodulewplist_v3.2.js</source>
<source>medialibrary/flowplayermodulewplist_v3.2.js</source>
<source>medialibrary/flowplayermodulewplist_vd_ada.js</source>
<source>medialibrary/flowplayermodulewplist_vd_ada.js</source>
<source>medialibrary/webcms-medialibrary-all-1.0.0.js</source>
</preloadSources>
</configuration>
</execution>
</executions>
</plugin>
Even after putting the files that I want to skip in <doNotInstrument> and
<sourcesToSkip> section, it is running these files and failing my built. I
dont want to touch the javascript files for right now.... just want to setup
the environment
--
View this message in context: http://maven.40175.n5.nabble.com/Maven-javascript-plugin-Trying-to-skip-files-tp4858668p4858668.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org