Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 41 lines (33 sloc) 1.277 kb
5d8bdc1 Christian Meier add pom and Mavenfile and revised readme
authored
1 # -*- mode: ruby -*-
2 properties["jruby.plugins.version"] = '0.25.0'
3
4 jar('junit:junit', '3.8.2').scope 'test'
5
6 jar('org.seleniumhq.selenium.client-drivers:selenium-java-client-driver', '1.0.1').scope 'test'
7
8 plugin('org.mortbay.jetty:jetty-maven-plugin') do |jetty|
9 jetty.with(:stopKey => 'foo', :stopPort => 9999)
10 jetty.in_phase('pre-integration-test').execute_goal('run').with(:daemon => true)
11 jetty.in_phase('post-integration-test').execute_goal('stop')
12 end
13
14 plugin('org.codehaus.mojo:selenium-maven-plugin', '1.1') do |selenium|
15 selenium.in_phase('pre-integration-test').execute_goal("start-server").with(
16 {
17 :background => true,
18 :firefoxProfileTemplate => "${basedir}/src/test/resources/selenium"
19 })
20 end
21
22 plugin('surefire', '2.6') do |surefire|
23 # skip the test dring test phase
24 surefire.with :skip => true
25 # but execute them during integration-test phase
26 surefire.in_phase('integration-test').execute_goal('test').with :skip => false
27 end
28
29 execute_in_phase(:initialize) do
30 require 'fileutils'
31
32 if File.exists? 'pom.xml'
33 pom_xml = File.new "pom.xml"
34 pom = File.new "Gemfile.pom"
35 out_of_date = pom_xml.mtime < pom.mtime
36 else
37 out_of_date = true
38 end
39 FileUtils.cp("Gemfile.pom", "pom.xml") if out_of_date
40 end
Something went wrong with that request. Please try again.