本文共 1598 字,大约阅读时间需要 5 分钟。
- 转自:https://blog.csdn.net/leolu007/article/details/53079875
-
- <project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <parent>
- <groupId>org.kuuyee.sample</groupId>
- <artifactId>sample-parent</artifactId>
- <version>1.0-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.kuuyee.sample</groupId>
- <artifactId>module-D</artifactId>
- <version>1.0-SNAPSHOT</version>
- <packaging>jar</packaging>
- <name>module-D</name>
- <url>http:
- <properties>
- <project.build.sourceEncoding>
- UTF-8
- </project.build.sourceEncoding>
- <module.a.src>../../module/module-A/src/main/java</module.a.src>
- <module.b.src>../../module/module-B/src/main/java</module.b.src>
- <module.c.src>../../module/module-C/src/main/java</module.c.src>
- </properties>
- <build>
- <plugins><!-- 解决模块相互依赖,综合所有相互依赖代码统一编译 -->
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>add-source</id>
- <phase>generate-sources</phase>
- <goals>
- <goal>add-source</goal>
- </goals>
- <configuration>
- <sources>
- <source>${module.a.src}</source>
- <source>${module.b.src}</source>
- <source>${module.c.src}</source>
- </sources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- <dependencies>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>3.8.1</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
- </project>