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

后端 未结 5 1636
孤城傲影
孤城傲影 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:15

    The ojdbc jar is not in public maven repositories. You can add the jar to local repository manually.

    Download the jar from:

    • oracle site
    • copy from your oracle database server ( {ORACLE_HOME}\jdbc\lib\ojdbc6.jar )

    Install in your repository

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

    Use in your pom

       
            com.oracle
            ojdbc6
            11.2.0
       
    

提交回复
热议问题