yegor256 / qulice

Quality Police for Java projects: aggregator of Checkstyle and PMD
https://www.qulice.com
Other
301 stars 111 forks source link

NPE charsetName on jslint #416

Open piotrkot opened 9 years ago

piotrkot commented 9 years ago

For given qulice configuration

<plugin>
                        <groupId>com.qulice</groupId>
                        <artifactId>qulice-maven-plugin</artifactId>
                        <version>0.12.1</version>
                        <configuration>
                            <license>file:${basedir}/LICENSE.txt</license>
                            <excludes>
                                <exclude>checkstyle:/src/main/resources/assets/*.*</exclude>
                                <exclude>findbugs:.*</exclude>
                                <exclude>duplicatefinder:.*</exclude>
                                <exclude>dependencies:.*</exclude>
                            </excludes>
                        </configuration>
                        <executions>
                            <execution>
                                <phase>compile</phase>
                                <goals>
                                    <goal>check</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

And given shop.js script

/*global $, document*/
$(document).ready(function () {
    "use strict";
    $("#buy").click(function () {
        var links = "/shop/";
        $("#buying").find("input").each(function () {
            links = links + $(this).attr("id") + "=" + $(this).val() + "&";
        });
        $("#buying-form").attr("action", links);
        $(this).closest("form").validate();
        $(this).closest("form").submit();
    });
});

Here is what I get after mvn -X clean compile -Pqulice:

[INFO] Calling org.codehaus.mojo:jslint-maven-plugin:1.0.1:jslint...
[INFO] Parsing: resources/assets/shop/shop.js
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 20.879 s
[INFO] Finished at: 2015-03-27T16:39:03+01:00
[INFO] Final Memory: 29M/207M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.qulice:qulice-maven-plugin:0.12.1:check (default) on project shop: Execution default of goal com.qulice:qulice-maven-plugin:0.12.1:check failed: charsetName -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.qulice:qulice-maven-plugin:0.12.1:check (default) on project shop: Execution default of goal com.qulice:qulice-maven-plugin:0.12.1:check failed: charsetName
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:224)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
        at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:582)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default of goal com.qulice:qulice-maven-plugin:0.12.1:check failed: charsetName
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:143)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
        ... 19 more
Caused by: java.lang.NullPointerException: charsetName
        at java.io.InputStreamReader.<init>(InputStreamReader.java:99)
        at org.codehaus.mojo.jslint.AbstractJSLintMojo.checkFileForIssues(AbstractJSLintMojo.java:341)
        at org.codehaus.mojo.jslint.AbstractJSLintMojo.execute(AbstractJSLintMojo.java:383)
        at com.qulice.maven.MojoExecutor.execute(MojoExecutor.java:134)
        at com.qulice.maven.JslintValidator.validate(JslintValidator.java:52)
        at com.qulice.maven.CheckMojo.run(CheckMojo.java:86)
        at com.qulice.maven.CheckMojo.doExecute(CheckMojo.java:59)
        at com.qulice.maven.AbstractQuliceMojo.execute(AbstractQuliceMojo.java:175)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
        ... 20 more
[ERROR] 
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
davvd commented 9 years ago

@yegor256 dispatch this issue please

krzyk commented 9 years ago

@davvd this is postponed

davvd commented 9 years ago

@davvd this is postponed

@krzyk thanks, I added "postponed" label

davvd commented 9 years ago

@davvd this is postponed

@krzyk no problem, I will try to find somebody else