How Maven Dependency Works

Posted by midhun pottmmal On Monday, 4 August 2014 0 comments
When we are building multiple module projects managing dependencies is a headache.Maven have dependency management mechanism  it will help us to download all required dependencies.


Example

we want to add Oracle JDBC driver to our project, In traditional way we want to follow these steps

  1. download oracle jdbc driver 
  2. copy .jar to class path
  3. include jar to project
note:-in traditional way for jar updates we want to download and add new one 

Maven we don't want to care about these things.. We just want to declare reference to oracle jdbc in pom.xml


<dependencies>
 
  <!-- ORACLE database driver -->
  <dependency>
   <groupId>com.oracle</groupId>
   <artifactId>ojdbc6</artifactId>
   <version>11.2.0</version>
  </dependency>
 
 </dependencies>

0 comments:

Post a Comment

Fashion