maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Baptiste Gaillard (JIRA)" <>
Subject [jira] (MSHARED-269) File locking problem on the file associated to 'getOutpuName()', even if the report is external
Date Thu, 31 Jan 2013 08:58:13 GMT


Baptiste Gaillard commented on MSHARED-269:

Hi Olivier and sorry for the delay, I had a lot of work... 

When I created this issue I was using Windows 7 and calling Maven using the M2Eclipse plugin
(inside Eclipse 4.2.1).

Now I'm using Windows 8, running 'mvn site' on the sample project 'bug-site-maven' also causes
the error :

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.0:site (default-site)
on project bug-site-project: \ 
 Error during page generation: Error rendering Maven report: Fail to delete the previously
generated 'C:\dev_tools\Sources\workspace\bug-site-project\target\site\bug\index.html' ! ->
[Help 1]
I believe this problem is not due to M2Eclipse because I also encounter it outside Eclipse
(using the command line). 

I tried to update all the dependencies I had in the two sample projects I've provided.

Now in the 'bug-maven-project' I use the following deps: 
 - org.apache.maven:maven-plugin-api:3.1-SNAPSHOT
 - org.apache.maven.reporting:maven-reporting-impl:2.3-SNAPSHOT
 - org.apache.maven.shared:maven-shared-utils:0.3-SNAPSHOT
 - org.apache.maven.doxia:doxia-sink-api:1.4-SNAPSHOT
In the 'bug-site-project' I use the following site plugins : 
 - org.apache.maven.plugins:maven-project-info-reports-plugin:2.7-SNAPSHOT
 - org.apache.maven.plugins:maven-site-plugin:3.3-SNAPSHOT
 - com.gomoob.maven.plugins:bug-maven-plugin:1.0

Is this the right thing to do to use the last doxia snapshot deps ? 

The use of those SNAPSHOT deps has no effect and the file lock is still there... 

If you do not encounter this bug under a UNIX machine I suspect something like a Class Loader
locking problem.
This is common undex Windows Java VM and perhaps the 'index.html' created by the Maven site
plugins is handled by a URLClassloader somewhere ? (

Sadly I do not have much more time to study this problem in details today. 

As I'm not a Maven plugin expert can you provide me guides to help me know how can I retrieve
references to the class loaders which are used during the execution of a 'mvn site' command

I'll try to see which on of the class loaders handles the 'index.html' file...



> File locking problem on the file associated to 'getOutpuName()', even if the report is
> -----------------------------------------------------------------------------------------------
>                 Key: MSHARED-269
>                 URL:
>             Project: Maven Shared Components
>          Issue Type: Bug
>          Components: maven-reporting-impl
>    Affects Versions: maven-reporting-impl-2.2
>         Environment: Windows 7 64 bits
> JDK 1.7.0_29 (64 bits VM)
>            Reporter: Baptiste Gaillard
>         Attachments:
> Creating a Maven Report Mojo which extends the AbstractMavenReport class and returns
'true' in the 'isExternalReport' locks the file associated to the name returned by the 'getOutputName()'
function of the Mojo.
> The locking problems appears inside the 'executeReport(...)' function of the Mojo, I'm
not sure if its normal or not but I have to delete this file to generate a documentation with
JSDuck (Javascript documentation). 
> A full description of the problem is provided here []
> I provide two Maven projects which allow to reproduce the problem : 
>  - bug-maven-plugin : A very simple plugin which only tries to delete the 'index.html'
file, that's to say the name provided by the 'getOutputName()' function. 
>  - bug-site-project : A very simple project which uses the 'bug-maven-plugin' Reporting
Plugin, running 'mvn site' on it allow to show the file locking problem I encounter. 

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message