Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

add src/it/java as test folder in intellij when opening project as pom.xml

I have a new test fodler called src/it/java (for integration tests). I added this to my pom.xml (in my simple example app)

<build>
<plugins>
  <plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>build-helper-maven-plugin</artifactId>
    <version>1.7</version>
    <executions>
      <execution>
        <id>add-test-source</id>
        <phase>generate-test-sources</phase>
        <goals>
          <goal>add-test-source</goal>
        </goals>
        <configuration>
          <sources>
            <source>src/it/java</source>
          </sources>
        </configuration>
      </execution>
    </executions>
  </plugin>
</plugins>

However when i open my project (by opening the pom.xml in intellij) in intellij then src/it/java is not regarded by it as a source folder.

what should I put in my pom.xml to have intellij recognize src/it/java as a source folder

thanks

like image 424
Jas Avatar asked Nov 05 '22 15:11

Jas


1 Answers

For the paths that are configured by plug-ins you should run Generate Sources and Update Folders, see the FAQ.

like image 174
CrazyCoder Avatar answered Nov 09 '22 03:11

CrazyCoder