Affects PMD Version: 6.1.0
Description:
Original issue: https://issues.apache.org/jira/browse/MPMD-255
While trying to determine the checksum for the auxclasspath, we might encounter a FileNotFoundException
, if one of the directories of the auxclasspath doesn't exist.
I think, we need to take care of this in PMD itself, to make it more safe.
But the m-pmd-p provides the auxclasspath and it obviously provides a "theoretical" classpath, even if the directory doesn't exist.
This might happen if the project really has no src/main/java
(e.g. just tests) or m-pmd-p is executed directly without compiling the project first.
Stacktrace:
Caused by: java.io.FileNotFoundException: my-project\target\classes (The system cannot find the file specified)
at java.io.FileInputStream.open0 (Native Method)
at java.io.FileInputStream.open (FileInputStream.java:195)
at java.io.FileInputStream.<init> (FileInputStream.java:138)
at java.io.FileInputStream.<init> (FileInputStream.java:93)
at sun.net.www.protocol.file.FileURLConnection.connect (FileURLConnection.java:90)
at sun.net.www.protocol.file.FileURLConnection.getInputStream (FileURLConnection.java:188)
at java.net.URL.openStream (URL.java:1045)
at net.sourceforge.pmd.cache.AbstractAnalysisCache.computeClassPathHash (AbstractAnalysisCache.java:182)
at net.sourceforge.pmd.cache.AbstractAnalysisCache.checkValidity (AbstractAnalysisCache.java:113)
at net.sourceforge.pmd.processor.AbstractPMDProcessor.processFiles (AbstractPMDProcessor.java:105)
at net.sourceforge.pmd.PMD.processFiles (PMD.java:311)
at org.apache.maven.plugins.pmd.PmdReport.processFilesWithPMD (PmdReport.java:503)
at org.apache.maven.plugins.pmd.PmdReport.executePmd (PmdReport.java:432)
at org.apache.maven.plugins.pmd.PmdReport.executePmdWithClassloader (PmdReport.java:331)
at org.apache.maven.plugins.pmd.PmdReport.canGenerateReport (PmdReport.java:305)
Running PMD through: Maven
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4