Permalink
Browse files

[Issue 3] Change temporary file retention

  • Loading branch information...
1 parent 5aa1c58 commit 9df68d586bca4188f0203c70214016c2aa4bbbbf @lguerin lguerin committed Oct 3, 2010
Showing with 7 additions and 1 deletion.
  1. +7 −1 src/main/java/fr/exanpe/tapestry/tldgen/javadoc/JavadocProcessor.java
@@ -122,7 +122,13 @@ public ComponentsInfoBean runJavadoc(String rootPackage) throws MojoExecutionExc
}
// XML Output file for collect conponents information
- String parametersPath = project.getBuild().getDirectory() + File.separator + "tldgen-components-info.xml";
+ String tempDir = System.getProperty("java.io.tmpdir");
+ // Security check if there is a trailing slash or not
+ if (!(tempDir.endsWith("/") || tempDir.endsWith("\\")))
+ {
+ tempDir = tempDir + File.separator;
+ }
+ String parametersPath = tempDir + "tldgen-components-info.xml";
// Args used by Javadoc tool
String[] arguments =

0 comments on commit 9df68d5

Please sign in to comment.