我有两个模块A和B.Actualy B是A的插件
.B在编译时依赖于A. 不依赖于B.在运行时我想将B添加到类路径中,所以在A的pom.xml中我添加了以下依赖项
pom.xml
<dependency>
<groupId>my_group</groupId>
<artifactId>my_Plugin</artifactId>
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>
Run Code Online (Sandbox Code Playgroud)
Maven进程因循环依赖性错误而失败
[ERROR] The projects in the reactor contain a cyclic reference: Edge between 'Vertex{label='A'}' and 'Vertex{label='B'}' introduces to cycle in the graph B-->A-->B -> [Help 1]
Run Code Online (Sandbox Code Playgroud)
[错误]
为什么运行时依赖会影响编译时