Ways to exclude script files during JS Lint report generation
-------------------------------------------------------------

                 Key: MOJO-1426
                 URL: http://jira.codehaus.org/browse/MOJO-1426
             Project: Mojo
          Issue Type: Improvement
          Components: javascript-tools
         Environment: "javascript-report-maven-plugin" 
            Reporter: Saravanan Kathiresan


When tried to generate JS Lint report we got null pointer exception for few JS 
files which we really dont want the JS Lint report. We tried to exclude few 
files for JS Lint report but there is no provision to do it. I have modified 
the files as 

org.codehaus.mojo.javascript.AbstractJavascriptReport.java 

protected String[] getScripts( File sourceDirectory, String[] excludes )
    {
        DirectoryScanner scanner = new DirectoryScanner();
        scanner.setBasedir( sourceDirectory );
        if(excludes!=null && excludes.length >0)
        {
                scanner.setExcludes(excludes); 
        }
        else
        {
                scanner.addDefaultExcludes();
        }
        scanner.setIncludes( new String[] { "**/*.js" } );
        scanner.scan();
        return scanner.getIncludedFiles();
    }

org.codehaus.mojo.javascript.JsLintReport.java

String[] scripts = getScripts( sourceDirectory, excludes ); //Where Excludes 
gets the value from the pom.xml

It works well and we have implemented it in our project. It would be better to 
add this to the standard release

Thanks
Sara

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to