geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r439704 - /geronimo/server/trunk/maven-plugins/selenium-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/selenium/StartServerMojo.java
Date Sun, 03 Sep 2006 02:34:24 GMT
Author: jdillon
Date: Sat Sep  2 19:34:24 2006
New Revision: 439704

URL: http://svn.apache.org/viewvc?rev=439704&view=rev
Log:
Don't delete generated .js on exit, reuse

Modified:
    geronimo/server/trunk/maven-plugins/selenium-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/selenium/StartServerMojo.java

Modified: geronimo/server/trunk/maven-plugins/selenium-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/selenium/StartServerMojo.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/maven-plugins/selenium-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/selenium/StartServerMojo.java?rev=439704&r1=439703&r2=439704&view=diff
==============================================================================
--- geronimo/server/trunk/maven-plugins/selenium-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/selenium/StartServerMojo.java
(original)
+++ geronimo/server/trunk/maven-plugins/selenium-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/selenium/StartServerMojo.java
Sat Sep  2 19:34:24 2006
@@ -228,7 +228,7 @@
 
         File userExtentionsFile = getUserExtentionsFile();
         if (userExtentionsFile != null) {
-            log.info("Using user extensions: " + userExtentionsFile);
+            log.info("User extensions: " + userExtentionsFile);
 
             java.createArg().setValue("-userExtensions");
             java.createArg().setFile(userExtentionsFile);
@@ -318,9 +318,11 @@
 
         // File needs to be named 'user-extensions.js' or Selenium server will puke
         File file = new File(workingDirectory, "user-extensions.js");
-        file.mkdirs();
-        file.delete();
-        file.deleteOnExit();
+        if (file.exists()) {
+            log.debug("Reusing previously generated file: " + file);
+
+            return file;
+        }
 
         PrintWriter writer = new PrintWriter(new BufferedWriter(new FileWriter(file)));
 



Mime
View raw message