Pages

Showing posts with label maven. Show all posts
Showing posts with label maven. Show all posts

Tuesday, February 28, 2017

Oracle driver for maven

To add dependency in maven for oracle driver ojdbc6 and onwards, is not available in central repository.

You have to download the driver from oracle site and then install manually for maven.

 mvn install:install-file -Dfile=C:/workSoftwares/ojdbc6.jar  -DgroupId=com.oracle -DartifactId=ojdbc6 -Dversion=11.2.0 -Dpackaging=jar

and then add dependency in pom.xml



com.oracle
ojdbc6
11.2.0.2.0

Thursday, February 02, 2017

Maven Path Properties list

Following is list of maven path properties from https://cwiki.apache.org/confluence/display/MAVEN/Maven+Properties+Guide

This page extracts a few classical values:
  • ${project.basedir} 
    • This references to the root folder of the module/project (the location where the current pom.xml file is located)
POM properties referencing useful build locations, with default values defined in the Super POM:
  • ${project.build.directory}
    • This represents by default the target folder.
  • ${project.build.outputDirectory}
    • This represents by default the target/classes folder.
  • ${project.build.testOutputDirectory}
    • This represents by default the target/test-classes folder.
  • ${project.build.sourceDirectory}
    • This represents by default the src/main/java folder.
  • ${project.build.testSourceDirectory}
    • This represents by default the src/test/java folder.
You can use further properties like the following:
  • ${project.build.finalName}
    • This is by default defined as ${project.artifactId}-${project.version}.
  • ${project.version}
    • This can be used at locations where you have to write a literal version otherwise, in particular if you are in a multi-modules build for inter modules dependencies.
User Settings
The settings.xml elements could be referenced by using things like this (see also at the Super POM):
  • ${settings.localRepository}
    • which references the location of the local repository. This is by default ${home}/.m2/repository.