pom.xml 7.3 KB
Newer Older
1
<?xml version="1.0"?>
K
kohsuke 已提交
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
<!--
The MIT License

Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-->

26
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
27 28 29
  <parent>
    <artifactId>pom</artifactId>
    <groupId>org.jvnet.hudson.main</groupId>
30
    <version>1.335-SNAPSHOT</version>
31 32 33
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.jvnet.hudson.main</groupId>
34 35
  <artifactId>hudson-test-harness</artifactId>
  <name>Test harness for Hudson and plugins</name>
36 37 38
  <description>
    Unit test harness (src/main) and Unit tests for Hudson core (src/test)
  </description>
39 40 41 42 43 44

  <build>
    <plugins>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
45
          <!-- override with -DforkMode=pertest if you have "unable to create thread problems" on Windows -->
46
          <forkMode>once</forkMode>
47
          <!--<reportFormat>plain</reportFormat>-->
48
          <redirectTestOutputToFile>true</redirectTestOutputToFile>
49
          <argLine>-XX:MaxPermSize=128m -Dfile.encoding=UTF-8</argLine>
50
          <systemProperties>
K
kohsuke 已提交
51
            <property>
52
              <!-- use AntClassLoader that supports predictable file handle release -->
K
kohsuke 已提交
53 54 55
              <name>hudson.ClassicPluginStrategy.useAntClassLoader</name>
              <value>true</value>
            </property>
56
          </systemProperties>
57 58
        </configuration>
      </plugin>
59 60 61
      <plugin>
        <groupId>org.codehaus.groovy.maven</groupId>
        <artifactId>gmaven-plugin</artifactId>
A
abayer 已提交
62
        <version>1.0-rc-5</version>
63 64
        <executions>
          <execution>
65
            <id>preset-packager</id>
66 67 68 69 70 71 72 73
            <phase>process-resources</phase>
            <goals>
              <goal>execute</goal>
            </goals>
            <configuration>
              <source>${pom.basedir}/src/main/preset-data/package.groovy</source>
            </configuration>
          </execution>
74 75 76 77 78 79 80 81
          <execution>
            <id>test-in-groovy</id>
            <!-- allow tests written in Groovy -->
            <goals>
              <goal>generateTestStubs</goal>
              <goal>testCompile</goal>
            </goals>
          </execution>
82 83 84
        </executions>
        <dependencies>
          <dependency>
85
            <groupId>ant</groupId>
86
            <artifactId>ant</artifactId>
87
            <version>1.6.5</version>
88 89 90
          </dependency>
        </dependencies>
      </plugin>
91 92
    </plugins>
  </build>
93 94 95
  
  <dependencies>
    <dependency>
96 97 98 99
      <!--
        put hudson.war in the classpath. we can't pull in the war artifact directly
        because Maven excludes all wars from classpath automatically. so we need a jar artifact.
      -->
100
      <groupId>${project.groupId}</groupId>
101
      <artifactId>hudson-war</artifactId>
102
      <version>${project.version}</version>
103
      <classifier>war-for-test</classifier>
104
    </dependency>
105 106 107 108 109
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>maven-plugin</artifactId>
      <version>${project.version}</version>
    </dependency>
110 111 112 113 114
    <dependency>
      <groupId>org.jvnet.hudson.plugins</groupId>
      <artifactId>subversion</artifactId>
      <version>1.7</version>
    </dependency>
115 116 117 118 119
    <dependency>
      <groupId>org.mortbay.jetty</groupId>
      <artifactId>jetty</artifactId>
      <version>6.1.11</version>
    </dependency>
120 121 122 123 124
    <dependency>
      <groupId>org.jvnet.mock-javamail</groupId>
      <artifactId>mock-javamail</artifactId>
      <version>1.7</version>
    </dependency>
125
    <!--dependency>
K
kohsuke 已提交
126 127 128
      <groupId>org.openqa.selenium.client-drivers</groupId>
      <artifactId>selenium-java-client-driver</artifactId>
      <version>1.0-beta-1</version>
129
    </dependency-->
130
    <dependency>
131
      <groupId>org.jvnet.hudson</groupId>
132
      <artifactId>htmlunit</artifactId>
133
      <version>2.2-hudson-10</version>
134 135 136 137 138 139 140
      <exclusions>
      	<exclusion>
	      	<!--  hides JDK DOM classes in Eclipse -->
      		<groupId>xml-apis</groupId>
      		<artifactId>xml-apis</artifactId>
      	</exclusion>
      </exclusions>
141
    </dependency>
K
kohsuke 已提交
142 143 144 145 146 147

    <dependency><!-- temporary, until we bump to new htmlunit -->
      <groupId>org.jvnet.hudson</groupId>
      <artifactId>htmlunit-core-js</artifactId>
      <version>2.2-hudson-2</version>
    </dependency>
148 149 150 151

    <dependency>
      <groupId>org.jvnet.hudson</groupId>
      <artifactId>embedded-rhino-debugger</artifactId>
152
      <version>1.1</version>
153
    </dependency>
154 155 156 157
    <dependency>
      <!-- for testing JNLP launch. -->
      <groupId>org.jvnet.hudson</groupId>
      <artifactId>netx</artifactId>
K
kohsuke 已提交
158
      <version>0.5-hudson-2</version>
159
    </dependency>
160 161 162 163 164
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
    </dependency>
H
huybrechts 已提交
165 166 167 168 169
    <dependency>
      <groupId>org.easymock</groupId>
      <artifactId>easymock</artifactId>
      <version>2.4</version>
    </dependency>
170
  </dependencies>
171 172

  <profiles>
173 174 175 176 177 178
    <profile>
      <id>light-test</id>
      <properties>
	<skipTests>true</skipTests>
      </properties>
    </profile>
179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216
    <profile>
      <!--
        Obtain code coverage report. This is done by running Unit tests on our own and suppressing surefire.
      -->
      <id>cobertura</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.kohsuke.gmaven</groupId>
            <artifactId>gmaven-plugin</artifactId>
            <executions>
              <!-- run unit test -->
              <execution>
                <phase>test</phase>
                <goals>
                  <goal>execute</goal>
                </goals>
                <configuration>
                  <scriptpath>
                    <!-- load helpers from core -->
                    <element>${project.basedir}/../core/src/build-script</element>
                  </scriptpath>
                  <source>${project.basedir}/src/build-script/unitTest.groovy</source>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <!-- unit tests are run by GMaven through Ant. -->
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <skipTests>true</skipTests>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
K
kohsuke 已提交
217
</project>