nikgoodley-ibboost / jslint4java

Automatically exported from code.google.com/p/jslint4java
Other
0 stars 0 forks source link

Issue with configuration #70

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. configure the pom.xml of your app to use jslint4java maven plugin
2. set <sourceFolders> with a property
3. file this property with a value
4. Open the Maven console (From Eclipse-like IDE)
5. update Javascript code in a file under the folder represented by the 
property.

What is the expected output? What do you see instead?
In the maven console, I've got an error like :
Unable to parse configuration of mojo 
com.googlecode.jslint4java:jslint4java-maven-plugin:2.0.0:lint for parameter 
sourceFolders: Cannot assign configuration entry 'sourceFolders' to 'interface 
java.util.List' from 'a path somewhere', which is of type class java.lang.String

What version of the product are you using? On what operating system?
STS 2.7.2 (Eclipse-like IDE) on Ubuntu 11.04 with java version "1.6.0_26"

Please provide any additional information below.

Here 
<plugin>
  <groupId>com.googlecode.jslint4java</groupId>
  <artifactId>jslint4java-maven-plugin</artifactId>
  <version>2.0.0</version>
  <executions>
    <execution>
      <id>lint</id>
      <phase>process-resources</phase>
        <goals>
          <goal>lint</goal>
        </goals>
        <configuration>
          <failOnError>true</failOnError>
          <sourceFolders>${scripts.folder}</sourceFolders>
          <includes>${include.scripts.pattern.list}</includes>
          <outputDirectory>${jslint.reports.folder}</outputDirectory>
          <options>
            <eqeq>true</eqeq>
            <undef>true</undef>
            <predef>${predef}</predef>
          </options>
        </configuration>
      </execution>
    </executions>
</plugin>

Original issue reported on code.google.com by mathieu....@gmail.com on 4 Oct 2011 at 2:32

GoogleCodeExporter commented 9 years ago
Ditto. Looks like the values in JSLintMojo.setSourceFolders are coming in as a 
List<String>, although the JRE sees it as List<Object> which is allowing it to 
be set to the List<File> class property.  Then at getFilesToProcess() it blows 
up in the for-loop when it attempts to iterate and cast each item to File.

The attached patch (from version 2.0.0) resolves the problem.

Original comment by l...@lonbinder.com on 4 Oct 2011 at 3:24

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks for the report.  I did fix this as issue 64.

https://github.com/happygiraffe/jslint4java/commit/0de26f13ae7fc232c886565ddb8fe
909a02725e0

I just haven't released 2.0.1 yet. :(

Original comment by d...@happygiraffe.net on 5 Oct 2011 at 12:22