So I ran mvn clean install
in first project, I find it in my local maven repository. 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?
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. 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
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.