pom.xml 9.1 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
  <parent>
    <artifactId>pom</artifactId>
29
    <groupId>org.jenkins-ci.main</groupId>
30
    <version>1.422-SNAPSHOT</version>
31 32
  </parent>
  <modelVersion>4.0.0</modelVersion>
33
  <groupId>org.jenkins-ci.main</groupId>
K
Kohsuke Kawaguchi 已提交
34
  <artifactId>jenkins-test-harness</artifactId>
35
  <packaging>stapler-jar</packaging>
36
  <name>Test harness for Jenkins and plugins</name>
37
  <description>
38
    Unit test harness (src/main) and Unit tests for Jenkins core (src/test)
39
  </description>
40

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

46 47
  <build>
    <plugins>
48 49 50
      <plugin>
        <groupId>org.kohsuke.stapler</groupId>
        <artifactId>maven-stapler-plugin</artifactId>
51
        <!-- version specified in grandparent pom -->
52 53
        <extensions>true</extensions>
      </plugin>
54 55
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
56
        <!-- version specified in grandparent pom -->
57
        <configuration>
58 59
          <skip>true</skip>
          <!-- tests now run by maven-junit-plugin -->
60 61
        </configuration>
      </plugin>
62
      <plugin>
63
        <groupId>org.kohsuke.gmaven</groupId>
64
        <artifactId>gmaven-plugin</artifactId>
65
        <!-- version specified in grandparent pom -->
66 67
        <executions>
          <execution>
68
            <id>preset-packager</id>
69 70 71 72 73 74 75 76
            <phase>process-resources</phase>
            <goals>
              <goal>execute</goal>
            </goals>
            <configuration>
              <source>${pom.basedir}/src/main/preset-data/package.groovy</source>
            </configuration>
          </execution>
77 78 79 80 81 82 83
          <execution>
            <id>test-in-groovy</id>
            <!-- allow tests written in Groovy -->
            <goals>
              <goal>testCompile</goal>
            </goals>
          </execution>
84 85 86
        </executions>
        <dependencies>
          <dependency>
M
manuel_carrasco 已提交
87
            <groupId>org.apache.ant</groupId>
88
            <artifactId>ant</artifactId>
89
            <version>1.8.0</version>
90 91 92
          </dependency>
        </dependencies>
      </plugin>
93 94
    </plugins>
  </build>
95

96 97
  <dependencies>
    <dependency>
98 99 100 101
      <!--
        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.
      -->
102
      <groupId>${project.groupId}</groupId>
K
Kohsuke Kawaguchi 已提交
103
      <artifactId>jenkins-war</artifactId>
104
      <version>${project.version}</version>
105
      <classifier>war-for-test</classifier>
106
    </dependency>
107 108 109 110 111
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>maven-plugin</artifactId>
      <version>${project.version}</version>
    </dependency>
112
    <dependency>
113
      <groupId>org.jenkins-ci.plugins</groupId>
114
      <artifactId>subversion</artifactId>
115
      <version>1.25</version>
116
    </dependency>
117 118 119
    <dependency>
      <groupId>org.mortbay.jetty</groupId>
      <artifactId>jetty</artifactId>
120
      <version>6.1.26</version>
121
    </dependency>
122 123 124 125
    <dependency>
      <groupId>org.jvnet.hudson</groupId>
      <artifactId>test-annotations</artifactId>
      <version>1.0</version>
126 127
      <scope>compile</scope>
      <!-- in this module we need this as a compile scope, whereas in the parent it's test -->
128
    </dependency>
129 130 131 132 133
    <dependency>
      <groupId>org.jvnet.mock-javamail</groupId>
      <artifactId>mock-javamail</artifactId>
      <version>1.7</version>
    </dependency>
134 135 136 137 138
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.8.2</version>
    </dependency>
139
    <!--dependency>
K
kohsuke 已提交
140 141 142
      <groupId>org.openqa.selenium.client-drivers</groupId>
      <artifactId>selenium-java-client-driver</artifactId>
      <version>1.0-beta-1</version>
143
    </dependency-->
144
    <dependency>
145
      <groupId>org.jenkins-ci</groupId>
146
      <artifactId>htmlunit</artifactId>
K
Kohsuke Kawaguchi 已提交
147
      <version>2.6-jenkins-4</version>
148
      <exclusions>
149 150 151 152 153
        <exclusion>
          <!--  hides JDK DOM classes in Eclipse -->
          <groupId>xml-apis</groupId>
          <artifactId>xml-apis</artifactId>
        </exclusion>
154
      </exclusions>
155
    </dependency>
K
kohsuke 已提交
156

157 158 159
    <dependency>
      <groupId>org.jvnet.hudson</groupId>
      <artifactId>embedded-rhino-debugger</artifactId>
160
      <version>1.2</version>
161
    </dependency>
162 163 164 165
    <dependency>
      <!-- for testing JNLP launch. -->
      <groupId>org.jvnet.hudson</groupId>
      <artifactId>netx</artifactId>
K
kohsuke 已提交
166
      <version>0.5-hudson-2</version>
167
    </dependency>
H
huybrechts 已提交
168 169 170 171 172
    <dependency>
      <groupId>org.easymock</groupId>
      <artifactId>easymock</artifactId>
      <version>2.4</version>
    </dependency>
173 174 175 176 177 178
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <version>1.8.5</version>
      <scope>test</scope>
    </dependency>
179
  </dependencies>
180 181

  <profiles>
182 183 184

    <profile>
      <id>run-test-harness</id>
185 186 187 188 189
      <activation>
        <property>
          <name>!skip-test-harness</name>
        </property>
      </activation>
190 191 192 193 194 195
      <build>
        <plugins>
          <plugin>
            <!-- see http://maven-junit-plugin.kenai.com/ for more info -->
            <groupId>org.kohsuke</groupId>
            <artifactId>maven-junit-plugin</artifactId>
196
            <!-- version specified in grandparent pom -->
197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234
            <executions>
              <execution>
                <goals>
                  <goal>test</goal>
                </goals>
                <configuration>
                  <fork>true</fork>
                  <concurrency>${concurrency}</concurrency>
                  <argLine>-Dfile.encoding=UTF-8</argLine>
                  <timeout>300</timeout>
                  <systemProperties>
                    <property>
                      <!-- use AntClassLoader that supports predictable file handle release -->
                      <name>hudson.ClassicPluginStrategy.useAntClassLoader</name>
                      <value>true</value>
                    </property>
                    <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>
                  </systemProperties>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>

    </profile>

235 236 237
    <profile>
      <id>light-test</id>
      <properties>
238
        <skipTests>true</skipTests>
239 240
      </properties>
    </profile>
241 242 243 244 245 246 247 248 249 250
    <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>
251
            <!-- version specified in grandparent pom -->
252 253 254 255 256 257 258 259 260
            <executions>
              <!-- run unit test -->
              <execution>
                <phase>test</phase>
                <goals>
                  <goal>execute</goal>
                </goals>
                <configuration>
                  <scriptpath>
K
kohsuke 已提交
261
                    <!-- load helpers from hg core -->
262 263 264 265 266 267 268 269 270
                    <element>${project.basedir}/../core/src/build-script</element>
                  </scriptpath>
                  <source>${project.basedir}/src/build-script/unitTest.groovy</source>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
O
Olivier Lamy 已提交
271
    </profile>    
272
  </profiles>
K
kohsuke 已提交
273
</project>