[英]How to find out what kind of dependencies I can use from local repository in maven?
So I ran mvn clean install
in first project, I find it in my local maven repository.所以我在第一个项目中运行了
mvn clean install
,我在我的本地 maven 存储库中找到了它。 But how am I supposed to know what to type in project two pom.xml
to use the jar I just installed to my maven repository?但是我怎么知道在项目两个
pom.xml
中输入什么来使用我刚刚安装到我的 maven 存储库的 jar?
I need the following but with my installed project values:我需要以下内容,但需要使用我安装的项目值:
<!-- https://mvnrepository.com/artifact/org.springframework/spring-web -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>5.3.4</version>
</dependency>
How to find out how to pull my first project dependency into my second project?如何找出如何将我的第一个项目依赖项拉入我的第二个项目?
In your pom.xml
of the second project enter this inside dependencies
tag.在第二个项目的
pom.xml
中,输入这个内部dependencies
项标签。 so it should be something like this,所以应该是这样的
<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>
you can find all those information from pom.xml
of the first project您可以从第一个项目的
pom.xml
中找到所有这些信息
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.