Sync docs from 2.1.x to gh-pages
This commit is contained in:
@@ -3674,7 +3674,46 @@ in Maven you will require some additional setup in order to make the tests compi
|
||||
to add Groovy to your project. In GMavenPlus plugin, you will need to explicitly set test sources, including both the
|
||||
path where your base test classes are defined and the path were the generated contract tests are added.
|
||||
Please refer to the example below:</simpara>
|
||||
<programlisting language="xml" linenumbering="unnumbered"></programlisting>
|
||||
<programlisting language="xml" linenumbering="unnumbered"><plugin>
|
||||
<groupId>org.codehaus.gmavenplus</groupId>
|
||||
<artifactId>gmavenplus-plugin</artifactId>
|
||||
<version>1.6.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>compileTests</goal>
|
||||
<goal>addTestSources</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<testSources>
|
||||
<testSource>
|
||||
<directory>${project.basedir}/src/test/groovy</directory>
|
||||
<includes>
|
||||
<include>**/*.groovy</include>
|
||||
</includes>
|
||||
</testSource>
|
||||
<testSource>
|
||||
<directory>
|
||||
${project.basedir}/target/generated-test-sources/contracts/com/example/beer
|
||||
</directory>
|
||||
<includes>
|
||||
<include>**/*.groovy</include>
|
||||
<include>**/*.gvy</include>
|
||||
</includes>
|
||||
</testSource>
|
||||
</testSources>
|
||||
</configuration>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.codehaus.groovy</groupId>
|
||||
<artifactId>groovy-all</artifactId>
|
||||
<version>2.4.15</version>
|
||||
<scope>runtime</scope>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
</dependencies></programlisting>
|
||||
<simpara>If you uphold to the Spock convention of ending the test class names with <literal>Spec</literal>, you will also need to adjust your Maven
|
||||
Surefire plugin setup, like in the following example:</simpara>
|
||||
<programlisting language="xml" linenumbering="unnumbered"></programlisting>
|
||||
|
||||
Reference in New Issue
Block a user