转自:http://duooluu.iteye.com/blog/353883
一个工程里存在多个source directory的时候,但mvn eclipse只支持一个source directory,一执行mvn eclipse:eclipse只会保留一个source directory。找到一个插件可以设置多个source directory
http://mojo.codehaus.org/build-helper-maven-plugin/
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.1</version>
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>src/config/java</source>
<source>src/main/java</source>
<source>src/member/java</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>