maven Multiple sourceDirectory外掛

comeontony發表於2011-11-08

轉自: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>
 

 

相關文章