我们在使用maven管理代码的时候
maven的默认目录有,代码目录:src/main/java,资源目录:src/main/resources
如果我们在开发过程中多人开发一个项目,为了开发好管理,我们会给每个业务建一个文件夹
例如:src/main/order,src/main/log,src/main/login
这时候我们会发现maven只编译了src/main/java目录下的代码,其它没有编译,这是因为其它目录没有被指定为代码资源目录,所以需要配置,这个功能需要使用插件:build-helper-maven-plugin
//pom.xml / project / build / plugins 里面添加
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.8</version>
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
&l