Hi Vincent,
Author: vsiveton
Date: Sat Aug 1 11:31:06 2009
New Revision: 799840
URL: http://svn.apache.org/viewvc?rev=799840&view=rev
Log:
o using doxia and doxia sitetools 1.0
o using snapshot linkcheck
o added the invoker as a workaround for the linkcheck goal
Modified:
maven/plugins/trunk/maven-linkcheck-plugin/pom.xml
maven/plugins/trunk/maven-linkcheck-plugin/src/main/java/org/apache/maven/plugins/linkcheck/LinkcheckReport.java
+ private File createTempPomFile( File tmpReportingOutputDirectory )
+ throws IOException
+ {
+ File projectFile = project.getFile();
+ File tmpProjectFile = new File( projectFile.getParentFile(),
"tmppom.xml" );
+ tmpProjectFile.deleteOnExit();
Keep in mind that the JVM might be running much longer than the Maven
build, e.g. when Maven is embedded in an IDE or CI server. Therefore I
suggest to delete the temp file not via a shutdown hook but explicitly
once the mojo is done with it (e.g. when the invoker returned).
Last but not least, if the user happens to maintain a "tmppom.xml" by
himself in the project base directory, the plugin will overwrite it.
Yes, it's an unlikely case but using FileUtils.createTempFile() from
plexus-utils should easily ensure we're better safe than sorry.
Benjamin
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]