Maven 2.x JavaNCSS Plugin

NullPointerException when report are generated on ... Windows

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Blocker Blocker
  • Resolution: Fixed
  • Affects Version/s: 2.0-beta-2
  • Fix Version/s: 2.0-beta-2
  • Component/s: None
  • Labels:
    None
  • Environment:
    WindowsXP
  • Number of attachments :
    0

Description

Strange bug occurs on Windows (works fine on MacOSX)...
If the project which javancss-maven-plugin tries to report is located at the root of a drive (z:/) it works fine...
looks something related to the length of the path ?!?

NPE is within javancss code... not plugin code.
Anyhow this must be solved.

Trace of a mvn javancss:report -X on javancss-maven-plugin :

[DEBUG] Including for parsing : C:\src\javancss-maven-plugin\src\main\java\org\codehaus\mojo\javancss\AbstractNcssReportGenerator.java
[DEBUG] Including for parsing : C:\src\javancss-maven-plugin\src\main\java\org\codehaus\mojo\javancss\ModuleReport.java
[DEBUG] Including for parsing : C:\src\javancss-maven-plugin\src\main\java\org\codehaus\mojo\javancss\NcssAgregateReportGenerator.java
[DEBUG] Including for parsing : C:\src\javancss-maven-plugin\src\main\java\org\codehaus\mojo\javancss\NcssExecuter.java
[DEBUG] Including for parsing : C:\src\javancss-maven-plugin\src\main\java\org\codehaus\mojo\javancss\NcssReportGenerator.java
[DEBUG] Including for parsing : C:\src\javancss-maven-plugin\src\main\java\org\codehaus\mojo\javancss\NcssReportMojo.java
[DEBUG] Including for parsing : C:\src\javancss-maven-plugin\src\main\java\org\codehaus\mojo\javancss\NcssViolationCheckMojo.java
[DEBUG] Including for parsing : C:\src\javancss-maven-plugin\src\main\java\org\codehaus\mojo\javancss\NumericNodeComparator.java
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] An error has occurred in JavaNCSS Report report generation.

[INFO] ------------------------------------------------------------------------
[DEBUG] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: An error has occurred in JavaNCSS Report report generation.
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559)
.../...
Caused by: java.lang.NullPointerException
at java.io.File.<init>(File.java:194)
at javancss.Javancss.<init>(Javancss.java:553)
at org.codehaus.mojo.javancss.NcssExecuter.execute(NcssExecuter.java:79)

Activity

Hide
Jean-Laurent de Morlhon added a comment -

a snapshot containing a probable fix has been deployed on codehaus snapshot repository that should solve the problem.

Show
Jean-Laurent de Morlhon added a comment - a snapshot containing a probable fix has been deployed on codehaus snapshot repository that should solve the problem.
Hide
Jean-Laurent de Morlhon added a comment -

AFAIK the latest snapshot fix the problem.

Show
Jean-Laurent de Morlhon added a comment - AFAIK the latest snapshot fix the problem.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: