Closed ghost closed 11 years ago
Hi,
It may be that this plugin needs some work to support Windows fully - our CI setup is primarily Linux based.
A few questions to diagnose this:
Thanks,
I'm using the latest version and the path exist. I believe the problem is with blanks that are replaced by %20 and Windows can not understand.
Thanks!
Yes, that seems reasonable. Are you in a position where you could write a patch and test it? If not, it might have to wait until I can get a Windows box set up to test on
I'm not be able to write a patch, but I'll wait. Thank you so much!
got a windows box here if you can point me in the right direction..
hmm ok i have changed line105 in \src\main\java\com\boxuk\jenkins\jslint\LintRunner.java from:
String file = res.toString().replaceAll("file:", "")
to:
String file = res.toString().replaceAll("file:", "").replaceAll("%20", " ");
however i have no idea how to compile and test.
Hi Arazmus,
Best thing to do would be to fork this repo and then submit a unit test that exposes the issue. If that's not feasible, you build the plugin using Maven:
mvn
That will build the plugin for you and you can then install it on your own Jenkins server through the "Advanced" tab of the Plugin Manager.
Incidentally, this plugin is now available for install via the Jenkins Plugin manager via their repositories, so you don't need to build it yourself unless you want to make changes to it.
Thanks,
Hi Gavin,
Already forked but and made the change locally but cant test it. not used maven before and have the plugin installed from Jenkins already. is it just a case of going to the Dir and running mvn ?
Just trying to fix this windows bug (although am moving over to ubuntu as we speak on VirtualBox)
You will need to install Apache Maven
You should only need the "mvn" command and that should pull in all dependenices, run tests, and build
is it just a case of going to the Dir and running mvn ?
correct :-)
thanks was already downloading maven :)
now just to add the JAVA_HOME and anything else ive missed...
How did you get on? I can compile it from my end if you're stuck? On 17 Jan 2013 17:38, "Arazmus" notifications@github.com wrote:
thanks was already downloading maven :)
now just to add the JAVA_HOME and anything else ive missed...
— Reply to this email directly or view it on GitHubhttps://github.com/boxuk/jslint-jenkins-plugin/issues/4#issuecomment-12379325.
if you could that would be great! having trouble with setting the JAVA_HOME Var..
is it the JDK you need? (new to java stuff)
You will need the JDK. I'll probably catch flak for this, but go with the Oracle JDK. OpenJDK pretty much always lets me down in some way!
Give this one a go - https://dl.dropbox.com/u/15591232/jslint-scott.hpi
Thanks,
hehe just got it to work! have my JAVA_HOME pointing to /bin rather than the main dir.
I have also had problems with openJDK on ubuntu in the past..
ok that fixed it, but got a violations module error, but atleast the windows jslint bug is fixed :)
full console output:
Started by user anonymous
Building in workspace C:\Program Files (x86)\Jenkins\workspace\Test Project\Code Check
Checkout:Code Check / C:\Program Files (x86)\Jenkins\workspace\Test Project\Code Check - hudson.remoting.LocalChannel@4d0371
Using strategy: Default
Last Built Revision: Revision 695a33796d167cbd916b2208a2f1ac346a224153 (origin/HEAD, origin/master)
Fetching changes from 1 remote Git repository
Fetching upstream changes from C:\Users\Scott.Jones\Google Drive\workspace\testApp
Seen branch in repository origin/HEAD
Seen branch in repository origin/master
Commencing build of Revision 695a33796d167cbd916b2208a2f1ac346a224153 (origin/HEAD, origin/master)
Checking out Revision 695a33796d167cbd916b2208a2f1ac346a224153 (origin/HEAD, origin/master)
Warning : There are multiple branch changesets here
[JSLint] Ready
[JSLint] calling jslint with args[-DxmlOutput=C:\Program Files (x86)\Jenkins\workspace\Test Project\Code Check/build/jslint.xml, C:\Program Files (x86)\Jenkins\workspace\Test Project\Code Check\src\assets\js\all.js, C:\Program Files (x86)\Jenkins\workspace\Test Project\Code Check\src\assets\js\allocation.js, C:\Program Files (x86)\Jenkins\workspace\Test Project\Code Check\src\assets\js\availability.js, C:\Program Files (x86)\Jenkins\workspace\Test Project\Code Check\src\assets\js\booking.js, C:\Program Files (x86)\Jenkins\workspace\Test Project\Code Check\src\assets\js\booking_search.js, C:\Program Files (x86)\Jenkins\workspace\Test Project\Code Check\src\assets\js\brochurerequest.js, C:\Program Files (x86)\Jenkins\workspace\Test Project\Code Check\src\assets\js\cabins.js, C:\Program Files (x86)\Jenkins\workspace\Test Project\Code Check\src\assets\js\client.js, C:\Program Files (x86)\Jenkins\workspace\Test Project\Code Check\src\assets\js\common.js, C:\Program Files (x86)\Jenkins\workspace\Test Project\Code Check\src\assets\js\createbooking.js, C:\Program Files (x86)\Jenkins\workspace\Test Project\Code Check\src\assets\js\db_handler.js, C:\Program Files (x86)\Jenkins\workspace\Test Project\Code Check\src\assets\js\enquiry.js, C:\Program Files (x86)\Jenkins\workspace\Test Project\Code Check\src\assets\js\login.js, C:\Program Files (x86)\Jenkins\workspace\Test Project\Code Check\src\assets\js\misc\accordion.js, C:\Program Files (x86)\Jenkins\workspace\Test Project\Code Check\src\assets\js\not needed\ChartHelper.js, C:\Program Files (x86)\Jenkins\workspace\Test Project\Code Check\src\assets\js\not needed\Layout.js, C:\Program Files (x86)\Jenkins\workspace\Test Project\Code Check\src\assets\js\not needed\Menu.js, C:\Program Files (x86)\Jenkins\workspace\Test Project\Code Check\src\assets\js\not needed\Nav.js, C:\Program Files (x86)\Jenkins\workspace\Test Project\Code Check\src\assets\js\not needed\app.js, C:\Program Files (x86)\Jenkins\workspace\Test Project\Code Check\src\assets\js\page_controller.js, C:\Program Files (x86)\Jenkins\workspace\Test Project\Code Check\src\assets\js\payment.js, C:\Program Files (x86)\Jenkins\workspace\Test Project\Code Check\src\assets\js\plugins\colorpicker.js, C:\Program Files (x86)\Jenkins\workspace\Test Project\Code Check\src\assets\js\plugins\date-en-GB.js, C:\Program Files (x86)\Jenkins\workspace\Test Project\Code Check\src\assets\js\plugins\date.js, C:\Program Files (x86)\Jenkins\workspace\Test Project\Code Check\src\assets\js\plugins\eye.js, C:\Program Files (x86)\Jenkins\workspace\Test Project\Code Check\src\assets\js\plugins\jquery.alert.js, C:\Program Files (x86)\Jenkins\workspace\Test Project\Code Check\src\assets\js\plugins\jquery.blockUI.js, C:\Program Files (x86)\Jenkins\workspace\Test Project\Code Check\src\assets\js\plugins\jquery.cookie.js, C:\Program Files (x86)\Jenkins\workspace\Test Project\Code Check\src\assets\js\plugins\jquery.googlemaps.pack.1.01.js, C:\Program Files (x86)\Jenkins\workspace\Test Project\Code Check\src\assets\js\plugins\jquery.idle-timer.js, C:\Program Files (x86)\Jenkins\workspace\Test Project\Code Check\src\assets\js\plugins\jquery.indexeddb-old.js, C:\Program Files (x86)\Jenkins\workspace\Test Project\Code Check\src\assets\js\plugins\jquery.indexeddb.js, C:\Program Files (x86)\Jenkins\workspace\Test Project\Code Check\src\assets\js\plugins\jquery.modal.js, C:\Program Files (x86)\Jenkins\workspace\Test Project\Code Check\src\assets\js\plugins\jquery.session.js, C:\Program Files (x86)\Jenkins\workspace\Test Project\Code Check\src\assets\js\plugins\jquery.tipsy.js, C:\Program Files (x86)\Jenkins\workspace\Test Project\Code Check\src\assets\js\plugins\jquery.ui.timepicker.js, C:\Program Files (x86)\Jenkins\workspace\Test Project\Code Check\src\assets\js\plugins\jquery.uniform.js, C:\Program Files (x86)\Jenkins\workspace\Test Project\Code Check\src\assets\js\plugins\jquery.validationEngine-en.js, C:\Program Files (x86)\Jenkins\workspace\Test Project\Code Check\src\assets\js\plugins\jquery.validationEngine.js, C:\Program Files (x86)\Jenkins\workspace\Test Project\Code Check\src\assets\js\plugins\jquery.visualize.js, C:\Program Files (x86)\Jenkins\workspace\Test Project\Code Check\src\assets\js\plugins\jquery.visualize.tooltip.js, C:\Program Files (x86)\Jenkins\workspace\Test Project\Code Check\src\assets\js\plugins\widget-tabs.js, C:\Program Files (x86)\Jenkins\workspace\Test Project\Code Check\src\assets\js\send_message.js, C:\Program Files (x86)\Jenkins\workspace\Test Project\Code Check\src\assets\js\tab_controller.js, C:\Program Files (x86)\Jenkins\workspace\Test Project\Code Check\src\assets\js\viewbooking.js, C:\Program Files (x86)\Jenkins\workspace\Test Project\Code Check\src\assets\js\viewclient.js]
[JSLint] Complete
ERROR: Publisher hudson.plugins.violations.ViolationsPublisher aborted due to exception
java.io.IOException: Expecting tag jslint
at hudson.plugins.violations.parse.AbstractParser.expectNextTag(AbstractParser.java:268)
at hudson.plugins.violations.types.jslint.JsLintParser.execute(JsLintParser.java:25)
at hudson.plugins.violations.parse.AbstractTypeParser.parse(AbstractTypeParser.java:57)
at hudson.plugins.violations.ViolationsCollector.doType(ViolationsCollector.java:187)
at hudson.plugins.violations.ViolationsCollector.invoke(ViolationsCollector.java:114)
at hudson.plugins.violations.ViolationsCollector.invoke(ViolationsCollector.java:25)
at hudson.FilePath.act(FilePath.java:852)
at hudson.FilePath.act(FilePath.java:825)
at hudson.plugins.violations.ViolationsPublisher.perform(ViolationsPublisher.java:74)
at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:810)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:785)
at hudson.model.Build$BuildExecution.post2(Build.java:183)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:732)
at hudson.model.Run.execute(Run.java:1568)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:236)
Finished: FAILURE
can send you the jslint if required but it looks fine..
It´s not a good idea to use this code:
String file = res.toString().replaceAll("file:", "").replaceAll("%20", " ");
because there is a hundreds of Url encodes as we can se in http://www.w3schools.com/tags/ref_urlencode.asp
a better solution is use the URLDecoder class:
file = java.net.URLDecoder.decode(file);
OK, thanks - any chance you could submit a PR? If not, might be a while before I get round to making that change, pretty busy at the mo'
Was this fix ever completed? We are running into this exact problem with our jenkins install. JSLint plugin version 0.7.6.
Thanks,
John
the siles i got sent did fix it but i agree that @Tadaok's solution is a more robust one. Could this get added?
as I have said, please feel free to submit a pull request with this patch in it. I'm extremely busy on project work at the moment. Otherwise, it'll have to wait for at least two weeks.
Hi, could you update the plugin?
This has been done. Unfortunately, nobody submitted a PR so I had to do it myself.
I've run the Maven deploy gubbins, hopefully the update will have taken but I'm a bit rusty on Maven so I'll keep an eye on it. Version >=0.7.8 is what you need.
Sorry, my bad. Ment to do that.. On 17 Apr 2013 10:20, "Gavin Davies" notifications@github.com wrote:
This has been done. Unfortunately, nobody submitted a PR so I had to do it myself.
I've run the Maven deploy gubbins, hopefully the update will have taken but I'm a bit rusty on Maven so I'll keep an eye on it. Version >=0.7.8 is what you need.
— Reply to this email directly or view it on GitHubhttps://github.com/boxuk/jslint-jenkins-plugin/issues/4#issuecomment-16495387 .
not to worry! It's done now, version 0.7.7 is available on the update centre :-)
Thank you guys! Just a small issue elapsed (on Windows server 2008R2, if you want I'll provide more detailed info):
[JSLint] Ready [JSLint] calling jslint with args[-DxmlOutput=c:\projectnamegoeshere\ci\trunk\Source/jslint.xml] [JSLint] IO Error java.io.FileNotFoundException: file:\C:\Program Files (x86)\Jenkins\plugins\jslint\WEB-INF\classes\com\boxuk\jenkins\jslint\JSLintBuilder\jslint.js (The filename, directory name, or volume label syntax is incorrect) [JSLint] Complete
..and all .NET developers will say thanks to you!
Hi @mamaximov , please could you open a new ticket for that problem, and I will see what I can do
Thanks,
I have same problem of mamaximov after upgrade version to 0.7.7.
Oh globbits :-( I don't have a Windows test environment to test this, best I can do is to roll it back, unless one of the guys in the office can help.
Thank you for your reply. I'm realllllllllly want to back to the version 0.7.6. Can you send me jslint plugin(ver. 0.7.6) .hpi file? If you can do that, plz send me an email with attached .hpi file.
I've just made a Windows VM and I'm seeing if I can fix it now.
Urrgh :-( I think I have fixed this issue but it won't release.
[INFO] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.6:deploy (default-deploy) on project jslint: Failed to deploy artifacts: Could not transfer artifact org.jenkins-ci.plugins:jslint:hpi:0.7.8 from/to maven.jenkins-ci.org (http://maven.jenkins-ci.org:8081/content/repositories/releases): Failed to transfer file: http://maven.jenkins-ci.org:8081/content/repositories/releases/org/jenkins-ci/plugins/jslint/0.7.8/jslint-0.7.8.hpi. Return code is: 401 -> [Help 1]
Literally no idea what that's about...
OK, I got the deploy to work and version 0.8.0 is released. It'll be on the Jenkins update centre in 6 hours or so but if you can't wait that long take a look at http://repo.jenkins-ci.org/releases/org/jenkins-ci/plugins/jslint/0.8.0/
Thank you for your kindness! I'm really appreciate you. lol
Odd. I'm getting this error after updating to jenkins 1.519
[JSLint] IO Error java.io.FileNotFoundException: jar:/var/lib/jenkins/plugins/jslint/WEB-INF/lib/classes.jar!/com/boxuk/jenkins/jslint/JSLintBuilder/jslint.js (No such file or directory) [JSLint] Complete
thanks Jamie
This issue was resolved is closed, but issue #8 is open to cover subsequent problems with the release of the new Jenkins.
I'm trying to use the JSLint plugin however I'm having the following error:
[JSLint] Ready [JSLint] calling jslint with args[-DxmlOutput=C:\Documents and Settings\gcampos.jenkins\jobs\ens\workspace/jslint_result.xml, C:\Documents and Settings\gcampos.jenkins\jobs\ens\workspace\src\Weg.Applications.ENS.Web\js\combobox\ens.comboBase.js] [JSLint] IO Error java.io.FileNotFoundException: C:\Documents%20and%20Settings\gcampos.jenkins\plugins\jslint\WEB-INF\classes\com\boxuk\jenkins\jslint\JSLintBuilder\jslint.js (system can not find the specified path) [JSLint] Complete Finished: SUCCESS