You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
XSLTRenderer doesn't close the report file, which prevents the unit tests from cleaning up the temporary directory. This leads to build failures under Windows, as open files cannot be deleted under Windows and then the non-empty temp directory can't be deleted as well.
Following the instructions in the developer's page,
using cmd via admin mode, i did mvnw.cmd clean verify on win 7 machine (64 bit)
I had following error message in summary
[ERROR] Run 2: XSLTRendererTest.testDefaultStylesheet » IO Failed to delete te
mp directory C:\Users\\AppData\Local\Temp\junit14495521605294488784. The fo
llowing paths could not be deleted (see suppressed exceptions for details):
[INFO]
[ERROR] net.sourceforge.pmd.renderers.XSLTRendererTest.testError
[ERROR] Run 1: XSLTRendererTest.testError » IO Failed to delete temp directory
C:\Users\\AppData\Local\Temp\junit10257306551755822722. The following path
s could not be deleted (see suppressed exceptions for details):
[ERROR] Run 2: XSLTRendererTest.testError » IO Failed to delete temp directory
C:\Users\\AppData\Local\Temp\junit16044074426319694003. The following path
s could not be deleted (see suppressed exceptions for details):
[INFO]
[ERROR] net.sourceforge.pmd.renderers.XSLTRendererTest.testErrorWithoutMessage
[ERROR] Run 1: XSLTRendererTest.testErrorWithoutMessage » IO Failed to delete
temp directory C:\Users\\AppData\Local\Temp\junit11521840142252753766. The
following paths could not be deleted (see suppressed exceptions for details):
[ERROR] Run 2: XSLTRendererTest.testErrorWithoutMessage » IO Failed to delete
temp directory C:\Users\\AppData\Local\Temp\junit12967148665186850175. The
following paths could not be deleted (see suppressed exceptions for details):
[INFO]
[ERROR] net.sourceforge.pmd.renderers.XSLTRendererTest.testRenderer
[ERROR] Run 1: XSLTRendererTest.testRenderer » IO Failed to delete temp direct
ory C:\Users\\AppData\Local\Temp\junit11720722216919540461. The following p
aths could not be deleted (see suppressed exceptions for details):
[ERROR] Run 2: XSLTRendererTest.testRenderer » IO Failed to delete temp direct
ory C:\Users\\AppData\Local\Temp\junit14603017966787468484. The following p
aths could not be deleted (see suppressed exceptions for details):
[INFO]
[ERROR] net.sourceforge.pmd.renderers.XSLTRendererTest.testRendererEmpty
[ERROR] Run 1: XSLTRendererTest.testRendererEmpty » IO Failed to delete temp d
irectory C:\Users\\AppData\Local\Temp\junit5020011460332647318. The followi
ng paths could not be deleted (see suppressed exceptions for details):
[ERROR] Run 2: XSLTRendererTest.testRendererEmpty » IO Failed to delete temp d
irectory C:\Users\\AppData\Local\Temp\junit18232623828735664686. The follow
ing paths could not be deleted (see suppressed exceptions for details):
[INFO]
[ERROR] net.sourceforge.pmd.renderers.XSLTRendererTest.testRendererMultiple
[ERROR] Run 1: XSLTRendererTest.testRendererMultiple » IO Failed to delete tem
p directory C:\Users\\AppData\Local\Temp\junit4939904030562435150. The foll
owing paths could not be deleted (see suppressed exceptions for details):
[ERROR] Run 2: XSLTRendererTest.testRendererMultiple » IO Failed to delete tem
p directory C:\Users\AppData\Local\Temp\junit13794596762499707786. The fol
lowing paths could not be deleted (see suppressed exceptions for details):
[INFO]
[ERROR] net.sourceforge.pmd.renderers.XSLTRendererTest.testRuleWithProperties
[ERROR] Run 1: XSLTRendererTest.testRuleWithProperties » IO Failed to delete t
emp directory C:\Users\\AppData\Local\Temp\junit1315627261428627138. The fo
llowing paths could not be deleted (see suppressed exceptions for details):
[ERROR] Run 2: XSLTRendererTest.testRuleWithProperties » IO Failed to delete t
emp directory C:\Users\\AppData\Local\Temp\junit10937939455588777716. The f
ollowing paths could not be deleted (see suppressed exceptions for details):
[INFO]
[INFO]
[ERROR] Tests run: 9151, Failures: 2, Errors: 8, Skipped: 2549
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for PMD 7.0.0-SNAPSHOT:
[INFO]
[INFO] PMD ................................................ SUCCESS [08:33 min]
[INFO] PMD Apex Jorje Parser Library ...................... SUCCESS [ 26.477 s]
[INFO] PMD Core ........................................... FAILURE [08:16 min]
[INFO] PMD Test Schema .................................... SKIPPED
[INFO] PMD Ant Integration ................................ SKIPPED
[INFO] PMD Test Framework ................................. SKIPPED
[INFO] PMD language module testing utilities .............. SKIPPED
[INFO] PMD Apex ........................................... SKIPPED
[INFO] PMD Coco ........................................... SKIPPED
[INFO] PMD C++ ............................................ SKIPPED
[INFO] PMD C# ............................................. SKIPPED
[INFO] PMD Dart ........................................... SKIPPED
[INFO] PMD Fortran ........................................ SKIPPED
[INFO] PMD Gherkin ........................................ SKIPPED
[INFO] PMD Go ............................................. SKIPPED
[INFO] PMD Groovy ......................................... SKIPPED
[INFO] PMD HTML ........................................... SKIPPED
[INFO] PMD Java ........................................... SKIPPED
[INFO] PMD JavaScript ..................................... SKIPPED
[INFO] PMD JSP ............................................ SKIPPED
[INFO] PMD Julia .......................................... SKIPPED
[INFO] PMD Kotlin ......................................... SKIPPED
[INFO] PMD Lua ............................................ SKIPPED
[INFO] PMD Matlab ......................................... SKIPPED
[INFO] PMD Modelica ....................................... SKIPPED
[INFO] PMD Objective-C .................................... SKIPPED
[INFO] PMD Perl ........................................... SKIPPED
[INFO] PMD PHP ............................................ SKIPPED
[INFO] PMD PL/SQL ......................................... SKIPPED
[INFO] PMD Python ......................................... SKIPPED
[INFO] PMD Ruby ........................................... SKIPPED
[INFO] PMD Scala Common Source and Settings ............... SKIPPED
[INFO] PMD Scala for Scala 2.13 ........................... SKIPPED
[INFO] PMD Swift .......................................... SKIPPED
[INFO] PMD TSql ........................................... SKIPPED
[INFO] PMD Visualforce .................................... SKIPPED
[INFO] PMD Velocity ....................................... SKIPPED
[INFO] PMD XML and XSL .................................... SKIPPED
[INFO] PMD Languages Dependencies ......................... SKIPPED
[INFO] PMD CLI ............................................ SKIPPED
[INFO] PMD Distribution Packages .......................... SKIPPED
[INFO] PMD Documentation Generator ........................ SKIPPED
[INFO] PMD Scala - Transitional package (deprecated) ...... SKIPPED
[INFO] PMD Scala for Scala 2.12 ........................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 17:41 min
[INFO] Finished at: 2023-10-02T16:16:26+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.
0.0-M8:test (default-test) on project pmd-core: There are test failures.
[ERROR]
[ERROR] Please refer to F:\SCA proj\SCA specific\pmd-master\pmd-master\pmd-core\
target\surefire-reports for the individual test results.
[ERROR] Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].
dump and [date].dumpstream.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureExc
eption
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <args> -rf :pmd-core
Reported by @nakul777
XSLTRenderer doesn't close the report file, which prevents the unit tests from cleaning up the temporary directory. This leads to build failures under Windows, as open files cannot be deleted under Windows and then the non-empty temp directory can't be deleted as well.
Discussed in #4701
Originally posted by nakul777 October 2, 2023
Hi
I have downloaded PMD from this repository.
Following the instructions in the developer's page,
using cmd via admin mode, i did mvnw.cmd clean verify on win 7 machine (64 bit)
I had following error message in summary
Can anyone please help to resolve this problem ?
Prior to this discussion, i have already searched
(https://stackoverflow.com/search?q=%5Bpmd%5D+installation+maven+failing)
https://github.com/pmd/pmd/discussions?discussions_q=Problem+while+installing+PMD+thru+Maven
But to no avail.
Thanking you.
The text was updated successfully, but these errors were encountered: