博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
解决Maven项目相互依赖/循环依赖/双向依赖的问题
阅读量:7095 次
发布时间:2019-06-28

本文共 1650 字,大约阅读时间需要 5 分钟。

  • 转自:https://blog.csdn.net/leolu007/article/details/53079875
  • Java代码  
    1. <project xmlns="http://maven.apache.org/POM/4.0.0"  
    2.     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  
    3.     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">  
    4.     <parent>  
    5.         <groupId>org.kuuyee.sample</groupId>  
    6.         <artifactId>sample-parent</artifactId>  
    7.         <version>1.0-SNAPSHOT</version>  
    8.         <relativePath>../../pom.xml</relativePath>  
    9.     </parent>  
    10.     <modelVersion>4.0.0</modelVersion>  
    11.     <groupId>org.kuuyee.sample</groupId>  
    12.     <artifactId>module-D</artifactId>  
    13.     <version>1.0-SNAPSHOT</version>  
    14.     <packaging>jar</packaging>  
    15.     <name>module-D</name>  
    16.     <url>http://maven.apache.org</url>  
    17.     <properties>  
    18.         <project.build.sourceEncoding>  
    19.             UTF-8  
    20.         </project.build.sourceEncoding>  
    21.         <module.a.src>../../module/module-A/src/main/java</module.a.src>  
    22.         <module.b.src>../../module/module-B/src/main/java</module.b.src>  
    23.         <module.c.src>../../module/module-C/src/main/java</module.c.src>  
    24.     </properties>  
    25.     <build>  
    26.         <plugins><!-- 解决模块相互依赖,综合所有相互依赖代码统一编译 -->  
    27.             <plugin>  
    28.                 <groupId>org.codehaus.mojo</groupId>  
    29.                 <artifactId>build-helper-maven-plugin</artifactId>  
    30.                 <executions>  
    31.                     <execution>  
    32.                         <id>add-source</id>  
    33.                         <phase>generate-sources</phase>  
    34.                         <goals>  
    35.                             <goal>add-source</goal>  
    36.                         </goals>  
    37.                         <configuration>  
    38.                             <sources>  
    39.                                 <source>${module.a.src}</source>  
    40.                                 <source>${module.b.src}</source>  
    41.                                 <source>${module.c.src}</source>  
    42.                             </sources>  
    43.                         </configuration>  
    44.                     </execution>  
    45.                 </executions>  
    46.             </plugin>  
    47.         </plugins>  
    48.     </build>  
    49.     <dependencies>  
    50.         <dependency>  
    51.             <groupId>junit</groupId>  
    52.             <artifactId>junit</artifactId>  
    53.             <version>3.8.1</version>  
    54.             <scope>test</scope>  
    55.         </dependency>  
    56.     </dependencies>  
    57. </project>  

转载于:https://www.cnblogs.com/sharpest/p/7843348.html

你可能感兴趣的文章
(转)as3数组的深复制和浅复制
查看>>
Choose a destination with a supported architecture in order to run on this device.
查看>>
HTML5/CSS3系列教程:HTML5 区域(Sectioning)的重要性
查看>>
Spring Batch学习笔记
查看>>
asp.net mvc 如何在执行完某任务后返回原来页面
查看>>
Oracle: listener.ora 、sqlnet.ora 、tnsnames.ora的配置及例子
查看>>
ASP.NET 中 GridView(网格视图)的使用前台绑定
查看>>
Windows的本地时间(LocalTime)、系统时间(SystemTime)、格林威治时间(UTC-Time)、文件时间(FileTime)之间的转换...
查看>>
[转]XBRL应用软件分类
查看>>
C++ 文件的复制、删除、重命名
查看>>
Oracle Patch Set Update and Critical Patch Update April 2011 Released
查看>>
hdu 2189
查看>>
std::map, std::multimap, std::tr1::unordered_map 区别 - 笔记本 - 博客频道 - CSDN.NET
查看>>
/usr/bin/ld: cannot find -lxxx问题总结
查看>>
C 语言 restrict 关键字的使用
查看>>
ASP.NET 自定义成员资格提供程序 Part.4(使用自定义提供程序类)
查看>>
ASP.NET调用V3版本的Google Maps API
查看>>
苹果面试8大难题及答案
查看>>
.NET:动态代理的 “5 + 1” 模式
查看>>
《Java Concurrency》读书笔记,Java并发编程实践基础
查看>>