What is Transitive Dependency in Maven?
Simply put, there're two types of dependencies in Maven direct and transitive.
Direct dependencies are the ones that are explicitly included in the project. These can be included in the project using <dependency> tags:
1
2
3
4
5
| <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version> 4.12 </version> </dependency> |
Transitive dependencies, on the other hand, are dependencies required by our direct dependencies. Required transitive dependencies are automatically included in our project by Maven.
We can list all dependencies including transitive dependencies in the project using: mvn dependency:tree command.
How to add ojdbc7.jar to the local maven repository.
run comand: mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc7 -Dversion=12.1.0 -Dpackaging=jar -Dfile=G:/Jar/ojdbc7.jar
change the jar name location version to yours
Or
System Path
Alternatively, we can just download the .jar
and tell the project to find the .jar
in the system path like this:
pom.xml
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc</artifactId>
<version>8</version>
<scope>system</scope>
<systemPath>d:/projects/ojdbc8.jar</systemPath>
</dependency>
pom.xml
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc</artifactId>
<version>8</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/ojdbc8.jar</systemPath>
</dependency>
can you explain me maven life cycle phase, goals and plugins in details
https://www.baeldung.com/maven-goals-phases
0 comments :
Post a Comment