我正在使用 SpringSource Tool Suite 开发一个 Java Maven 项目。我有标准的 Maven 目录结构
src
-> main
-> java
-> resources
-> test
-> java
-> resources
该结构在 .pom 文件中定义:
<build>
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**</include>
</includes>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
<testResources>
<testResource>
<directory>src/test/java</directory>
<includes>
<include>**</include>
</includes>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</testResource>
<testResource>
<directory>src/test/resources</directory>
</testResource>
</testResources>
</build>
STS 首先显示测试分支中的源文件夹,然后显示主分支中的源文件夹。所以我得到这样的东西:
src/test/java
src/test/resources
src/main/java
src/main/resources
但是,我想先从主分支获取文件夹。关于如何改变这一点的任何想法?