开发者

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

开发者 https://www.devze.com 2023-04-02 11:30 出处:网络
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)

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开发者_Python百科 intellij recognize src/it/java as a source folder

thanks


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号