pom.xml 8.6 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.396-SNAPSHOT</version>
31 32 33
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.jvnet.hudson.main</groupId>
34
  <artifactId>hudson-test-harness</artifactId>
35
  <packaging>stapler-jar</packaging>
36
  <name>Test harness for Hudson and plugins</name>
37 38 39
  <description>
    Unit test harness (src/main) and Unit tests for Hudson core (src/test)
  </description>
40

41 42
  <properties>
    <concurrency>1</concurrency> <!-- -1 means # of processors in the system -->
S
Seiji Sogabe 已提交
43
    <mavenDebug>false</mavenDebug>
44 45
  </properties>

46 47 48 49 50
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
51
          <skip>true</skip><!-- tests now run by maven-junit-plugin -->
52 53
        </configuration>
      </plugin>
54 55 56 57
      <plugin>
        <!-- see http://maven-junit-plugin.kenai.com/ for more info -->
        <groupId>com.sun.maven</groupId>
        <artifactId>maven-junit-plugin</artifactId>
58
        <version>1.5</version>
59 60 61 62 63 64 65
        <executions>
          <execution>
            <goals>
              <goal>test</goal>
            </goals>
            <configuration>
              <fork>true</fork>
66
              <concurrency>${concurrency}</concurrency>
67
              <argLine>-XX:MaxPermSize=192m -Xmx256m -Dfile.encoding=UTF-8</argLine>
68 69 70 71 72 73
              <systemProperties>
                <property>
                  <!-- use AntClassLoader that supports predictable file handle release -->
                  <name>hudson.ClassicPluginStrategy.useAntClassLoader</name>
                  <value>true</value>
                </property>
S
Seiji Sogabe 已提交
74 75 76 77 78 79 80 81 82 83 84 85
                <property>
                  <name>hudson.maven.debug</name>
                  <value>${mavenDebug}</value>
                </property>
                <property>
                  <name>java.io.tmpdir</name>
                  <value>${project.build.directory}</value>
                </property> 
                <property>
                  <name>buildDirectory</name>
                  <value>${project.build.directory}</value>
                </property>                               
86 87 88 89 90
              </systemProperties>
            </configuration>
          </execution>
        </executions>
      </plugin>
91
      <plugin>
92
        <groupId>org.kohsuke.gmaven</groupId>
93
        <artifactId>gmaven-plugin</artifactId>
94
        <version>1.0-rc-5-patch-2</version>
95 96
        <executions>
          <execution>
97
            <id>preset-packager</id>
98 99 100 101 102 103 104 105
            <phase>process-resources</phase>
            <goals>
              <goal>execute</goal>
            </goals>
            <configuration>
              <source>${pom.basedir}/src/main/preset-data/package.groovy</source>
            </configuration>
          </execution>
106 107 108 109 110 111 112
          <execution>
            <id>test-in-groovy</id>
            <!-- allow tests written in Groovy -->
            <goals>
              <goal>testCompile</goal>
            </goals>
          </execution>
113 114 115
        </executions>
        <dependencies>
          <dependency>
M
manuel_carrasco 已提交
116
            <groupId>org.apache.ant</groupId>
117
            <artifactId>ant</artifactId>
118
            <version>1.8.0</version>
119 120 121
          </dependency>
        </dependencies>
      </plugin>
122 123 124
      <plugin>
        <groupId>org.kohsuke.stapler</groupId>
        <artifactId>maven-stapler-plugin</artifactId>
125
        <version>1.15</version>
126 127
        <extensions>true</extensions>
      </plugin>
128 129
    </plugins>
  </build>
130 131 132
  
  <dependencies>
    <dependency>
133 134 135 136
      <!--
        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.
      -->
137
      <groupId>${project.groupId}</groupId>
138
      <artifactId>hudson-war</artifactId>
139
      <version>${project.version}</version>
140
      <classifier>war-for-test</classifier>
141
    </dependency>
142 143 144 145 146
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>maven-plugin</artifactId>
      <version>${project.version}</version>
    </dependency>
147 148 149
    <dependency>
      <groupId>org.jvnet.hudson.plugins</groupId>
      <artifactId>subversion</artifactId>
150
      <version>1.11</version>
151
    </dependency>
152 153 154 155 156
    <dependency>
      <groupId>org.mortbay.jetty</groupId>
      <artifactId>jetty</artifactId>
      <version>6.1.11</version>
    </dependency>
157 158 159 160 161
    <dependency>
      <groupId>org.jvnet.mock-javamail</groupId>
      <artifactId>mock-javamail</artifactId>
      <version>1.7</version>
    </dependency>
162
    <!--dependency>
K
kohsuke 已提交
163 164 165
      <groupId>org.openqa.selenium.client-drivers</groupId>
      <artifactId>selenium-java-client-driver</artifactId>
      <version>1.0-beta-1</version>
166
    </dependency-->
167
    <dependency>
168
      <groupId>org.jvnet.hudson</groupId>
169
      <artifactId>htmlunit</artifactId>
170
      <version>2.6-hudson-2</version>
171 172 173 174 175 176 177
      <exclusions>
      	<exclusion>
	      	<!--  hides JDK DOM classes in Eclipse -->
      		<groupId>xml-apis</groupId>
      		<artifactId>xml-apis</artifactId>
      	</exclusion>
      </exclusions>
178
    </dependency>
K
kohsuke 已提交
179

180 181 182
    <dependency>
      <groupId>org.jvnet.hudson</groupId>
      <artifactId>embedded-rhino-debugger</artifactId>
183
      <version>1.2</version>
184
    </dependency>
185 186 187 188
    <dependency>
      <!-- for testing JNLP launch. -->
      <groupId>org.jvnet.hudson</groupId>
      <artifactId>netx</artifactId>
K
kohsuke 已提交
189
      <version>0.5-hudson-2</version>
190
    </dependency>
191 192 193 194 195
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
    </dependency>
H
huybrechts 已提交
196 197 198 199 200
    <dependency>
      <groupId>org.easymock</groupId>
      <artifactId>easymock</artifactId>
      <version>2.4</version>
    </dependency>
201 202 203 204 205 206
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <version>1.8.5</version>
      <scope>test</scope>
    </dependency>
207
  </dependencies>
208 209

  <profiles>
210 211 212
    <profile>
      <id>light-test</id>
      <properties>
213
        <skipTests>true</skipTests>
214 215
      </properties>
    </profile>
216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234
    <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>
K
kohsuke 已提交
235
                    <!-- load helpers from hg core -->
236 237 238 239 240 241 242 243 244
                    <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. -->
245 246
            <groupId>com.sun.maven</groupId>
            <artifactId>maven-junit-plugin</artifactId>
247 248 249 250 251 252 253 254
            <configuration>
              <skipTests>true</skipTests>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
K
kohsuke 已提交
255
</project>