假设我有一个工件my-project-core
,其中包含与库的某些依赖项:
<artifactId>my-project-core</artifactId>
<name>CORE</name>
...
<dependency>
<groupId>com.bun.puffy</groupId>
<artifactId>just-the-lib</artifactId>
<version>1.0.0</version>
</dependency>
我想在与my-project-core
有依赖性的新项目中使用它
<artifactId>new-project-using-core</artifactId>
<name>NEW PROJECT USING CORE</name>
...
<dependency>
<groupId>com.bun.puffy</groupId>
<artifactId>my-project-core</artifactId>
<version>1.0.0</version>
</dependency>
<!-- should I also add this ?
<dependency>
<groupId>com.bun.puffy</groupId>
<artifactId>just-the-lib</artifactId>
<version>1.0.0</version>
</dependency>
-->
我应该在新项目中添加对just-the-lib
的依赖关系还是应该不这样做,而是依赖于my-project-core
的依赖关系?什么是利弊?