Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 160 lines (153 sloc) 5.402 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159
<?xml version="1.0"?>
<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">
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.spockframework</groupId>
  <artifactId>spock-example</artifactId>
  <version>0.6-groovy-1.7-SNAPSHOT</version>
  <packaging>jar</packaging>
  <name>Spock Framework - Example Project</name>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
  </properties>

  <build>
    <!-- Mandatory plugins for using Spock -->
    <plugins>
      <plugin>
        <groupId>org.codehaus.gmaven</groupId>
        <artifactId>gmaven-plugin</artifactId>
        <version>1.3</version>
        <configuration>
          <providerSelection>1.7</providerSelection>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>compile</goal>
              <goal>testCompile</goal>
            </goals>
          </execution>
        </executions>
        <dependencies>
          <dependency>
            <groupId>org.codehaus.gmaven.runtime</groupId>
            <artifactId>gmaven-runtime-1.7</artifactId>
            <version>1.3</version>
            <exclusions>
              <exclusion>
                <groupId>org.codehaus.groovy</groupId>
                <artifactId>groovy-all</artifactId>
              </exclusion>
            </exclusions>
          </dependency>
          <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-all</artifactId>
            <version>1.7.5</version>
          </dependency>
        </dependencies>
      </plugin>
      <!-- Optional plugins for using Spock -->
      <plugin>
        <!--
Finds all Spock specifications in this project, and configures Maven to run them
If this plugin is removed, Spock specifications will need to adhere to Maven's naming conventions for test classes
-->
        <groupId>org.spockframework</groupId>
        <artifactId>spock-maven</artifactId>
        <version>${project.version}</version>
        <!-- you need to specify a concrete version number here -->
        <executions>
          <execution>
            <goals>
              <goal>find-specs</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <!-- Only required if default Surefire configuration is not satisfactory -->
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.6</version>
        <configuration>
          <useFile>false</useFile>
        </configuration>
      </plugin>
      <!-- Only required for spock-example build -->
      <plugin>
        <artifactId>maven-deploy-plugin</artifactId>
        <version>2.5</version>
        <configuration>
          <skip>true</skip>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <dependencies>
    <!-- Mandatory dependencies for using Spock -->
    <dependency>
      <groupId>org.spockframework</groupId>
      <artifactId>spock-core</artifactId>
      <version>${project.version}</version>
      <!-- you need to specify a concrete version number here -->
      <scope>test</scope>
    </dependency>
    <!-- Optional dependencies for using Spock -->
    <dependency> <!-- enables mocking of classes (in addition to interfaces) -->
      <groupId>cglib</groupId>
      <artifactId>cglib-nodep</artifactId>
      <version>2.2</version>
      <scope>test</scope>
    </dependency>
    <dependency> <!-- enables mocking of classes without default constructor (together with CGLIB) -->
      <groupId>org.objenesis</groupId>
      <artifactId>objenesis</artifactId>
      <version>1.2</version>
      <scope>test</scope>
    </dependency>
    <dependency> <!-- only necessary if Hamcrest matchers are used -->
      <groupId>org.hamcrest</groupId>
      <artifactId>hamcrest-core</artifactId>
      <version>1.2</version>
      <scope>test</scope>
    </dependency>
<!-- Dependencies used by examples in this project (not required for using Spock) -->
    <dependency>
      <groupId>com.h2database</groupId>
      <artifactId>h2</artifactId>
      <version>1.2.147</version>
    </dependency>
  </dependencies>

  <!-- Only required if a snapshot version of Spock is used -->
  <repositories>
    <repository>
      <id>spock-snapshots</id>
      <url>http://m2repo.spockframework.org/snapshots</url>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </repository>
  </repositories>

  <!-- Only required if a snapshot version of Spock's Maven plugin is used -->
  <pluginRepositories>
    <pluginRepository>
      <id>spock-snapshots</id>
      <url>http://m2repo.spockframework.org/snapshots</url>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </pluginRepository>
  </pluginRepositories>

  <!-- Only required for spock-example build -->
  <distributionManagement>
    <repository>
      <id>foo</id>
      <url>file:///fake.repository.to.make.maven.happy</url>
    </repository>
    <snapshotRepository>
      <id>bar</id>
      <url>file:///fake.repository.to.make.maven.happy</url>
    </snapshotRepository>
  </distributionManagement>
</project>
Something went wrong with that request. Please try again.