gfv5 window 10 build fails with latest maven and jdk 8


Gary Bello
 

mvn version 3.5.2
jdk 1.8.0_152

problem is at line 216 in
C:\Sun\hk2Git\hk2\maven-plugins\hk2-inhabitant-generator\src\main\java\org\jvnet\hk2\generator\internal\GeneratorRunner.java 
on my system.
For some reason the 'default' file cannot be deleted.

snippet:
                    if (!outputFile.delete()) {
                        throw new IOException("Could not delete existing inhabitant file " +
                                outputFile.getAbsolutePath() + " in the noSwap case");

I have debug stepped thru code to where exception is thrown and cannot delete the file from windows either,
windows says JVM has the file open.

Did not experience this issue a few weeks ago - maybe almost 2 months ?

The error happens in the maven plugin, when building the glassfish project,
Glassfish Nucleus HK2 Modules


Could not delete existing inhabitant file C:\Sun\glassfishGit\glassfish\nucleus\hk2\hk2-config\target\classes\META-INF\hk2-locator\default in the noSwap case
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] Glassfish Nucleus HK2 Modules ...................... SUCCESS [  5.132 s]
[INFO] HK2 configuration module ........................... FAILURE [ 13.951 s]
[INFO] HK2 configuration reader generator module .......... SKIPPED
[INFO] HK2 config types ................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 30.775 s
[INFO] Finished at: 2017-12-22T20:06:13-08:00
[INFO] Final Memory: 19M/135M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.glassfish.hk2:hk2-inhabitant-generator:2.5.0-b57:generate-inhabitants (generate-inhabitants) on project hk2-config: Could not generate inhabitants file for C:\Sun\glassfishGit\glassfish\nucleus\hk2\hk2-config\target\classes -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.glassfish.hk2:hk2-inhabitant-generator:2.5.0-b57:generate-inhabitants (generate-inhabitants) on project hk2-config: Could not generate inhabitants file for C:\Sun\glassfishGit\glassfish\nucleus\hk2\hk2-config\target\classes
 



Join glassfish@javaee.groups.io to automatically receive all group messages.