Maven ojdbc jar dependency error: package oracle.jdbc does not exist

后端 未结 5 1634
孤城傲影
孤城傲影 2021-01-17 16:29

Heading

Am trying to use jdbc connection in my Java EE6 application(class name VisualizerRepository.java), i have the jdbc driver in nexus repository

The c

5条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-17 17:08

    The maven command that resides in answer

    (meanwhile it was taken from http://www.mkyong.com/maven/how-to-add-oracle-jdbc-driver-in-your-maven-local-repository/) did not work for me. But after removing {} characters, everything is fine:

    mvn install:install-file -Dfile=Path/to/your/ojdbc.jar -DgroupId=com.oracle 
    -DartifactId=ojdbc6 -Dversion=11.2.0 -Dpackaging=jar
    

    Also don't forget to add version number to the name of jar file like ojdb6-11.2.0.jar

提交回复
热议问题