Also... I looked further in the groovy file and found the following
references to workingDirectory in the execute method:
... ant.mkdir(dir: workingDirectory)
if (logOutput) {
ant.mkdir(dir: logFile.parentFile)
} ...
...and in the createUserExtensionsFile() method:
// File needs to be named 'user-extensions.js' or Selenium server
will puke
def file = new File(workingDirectory, 'user-extensions.js')
if (file.exists()) {
log.debug("Reusing previously generated file: $file")
return file
} ....
...and nowhere else in the source (other than a help file).
ButlerDE58 wrote:
>
> I was attempting to set the workingDirectory, logOutput and
> userExensions parameters to set up the selenium:start-server goal in a
> pom, like this:
> <plugin>
> <groupId>org.codehaus.mojo</groupId>
> <artifactId>selenium-maven-plugin</artifactId>
> <version>1.0-beta-3</version>
> <executions>
> <execution>
> <id>start-selenium</id>
> <phase>pre-integration-test</phase>
> <goals>
> <goal>start-server</goal>
> </goals>
> <configuration>
> <background>true</background>
> <workingDirectory>${project.build.directory}\myFolderName</workingDirect
> ory>
> <logFile>${project.build.directory}/${project.artifactId}/pages/selenium
> /results/server.log</logFile>
> <logOutput>true</logOutput>
>
> <userExtensions>target/${project.artifactId}/pages/selenium/core/scripts
> /user-extensions.js</userExtensions>
> .
> .
> .
>
> I found that the server seemed to write to the logOutput folder as
> expected, but it seemed to always look for the userExtensions file (not
> mine, the one it creates by concatenating the default and mine together)
> in the ${project.build.directory}\selenium folder. I looked at the
> plugin code (StartServerMojo.groovy) and found the following declaration
>
> /**
> * Working directory where Selenium server will be started from.
> *
> * @parameter expression="${project.build.directory}/selenium"
> * @required
> */
> File workingDirectory
> .
> .
> .
> * The file that Selenium server logs will be written to.
> *
> * @parameter expression="${logFile}"
> default-value="${project.build.directory}/selenium/server.log"
> * @required
> */
> File logFile
>
> I noticed that the logFile parameter has an expression AND a default
> value, while the workingDirectory parameter ONLY has an expression that
> is hard coded to "${project.build.directory}/selenium"
>
> I am wondering if this is intentional or if it is an error. If it is
> intentional, can you explain the reasoning?
>
> Also, it would be good if the documentation for workingDirectory
> explained what the parameter does, in terms of the server's use of the
> parameter. Just saying it is a "working directory" is very vague. For
> example, saying something like "this is the working directory where the
> server puts all files it creates. For example, the user-extensions.js
> file created by concatenating the file, if any, specified by the
> userExtensions parameter with the defaultUserExtensions file."
>
> Thank you,
>
> Dave Butler
>
>
--
View this message in context:
http://www.nabble.com/workingDirectory-in-maven-selenium-plugin-may-have-a-problem--tp18514383p18530422.html
Sent from the mojo - user mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email