issue with spock-example project with maven under intellij

68 views
Skip to first unread message

Alain Kr

unread,
May 22, 2017, 7:29:19 PM5/22/17
to Spock Framework - User
Hello

I'm having difficulties running the spock example project as an maven project in intellij 2017.1

When I run the maven test goal with tests run fine.

When I import spock-example in intellij idea as a maven project the groovy test folder in not picked up.


I have to either :

add the groovy folder as a Test Source Folder in the project structure or
add specifically the goovy folder in the pom.xml

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <version>1.12</version>
        <executions>
          <execution>
            <id>add-source</id>
            <phase>process-sources</phase>
            <goals>
              <goal>add-source</goal>
            </goals>
            <configuration>
              <sources>
                <source>src/main/groovy</source>
              </sources>
            </configuration>
          </execution>
          <execution>
            <id>add-test-source</id>
            <phase>generate-test-sources</phase>
            <goals>
              <goal>add-test-source</goal>
            </goals>
            <configuration>
              <sources>
                <source>src/test/groovy</source>
              </sources>
            </configuration>
          </execution>
        </executions>
      </plugin>



am I missing something here ? Is this an intellij Issue ?

Thanks

Alain

  

Reply all
Reply to author
Forward
0 new messages