所以我在第一个项目中运行了mvn clean install,我在本地的maven存储库中找到了它。但是,我如何知道在项目2 pom.xml中输入什么才能使用我刚刚安装到maven存储库的jar呢?
我需要以下内容,但使用我已安装的项目值:
<!-- https://mvnrepository.com/artifact/org.springframework/spring-web -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>5.3.4</version>
</dependency>如何找到如何将我的第一个项目依赖项拉入我的第二个项目?
发布于 2021-03-05 04:56:27
在第二个项目的pom.xml中,在dependencies标记中输入以下内容。所以应该是这样的,
<dependencies>
<dependency>
<groupId>group id of first Project</groupId>
<artifactId>Artifact id of first project</artifactId>
<version>version of the first project</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>5.3.4</version>
</dependency>
<dependencies>您可以从第一个项目的pom.xml中找到所有这些信息
https://stackoverflow.com/questions/66482726
复制相似问题