Find Oracle JDBC driver in Maven repository

前端 未结 22 1781
你的背包
你的背包 2020-11-22 09:28

I want to add the oracle jdbc driver to my project as dependency (runtime scope) - ojdbc14. In MVNrepository site the dependency to put in the POM is:



        
22条回答
  •  无人共我
    2020-11-22 09:59

    Download the jar and place it in your project src/lib. Now you can use the maven installer plugin.

    
        org.apache.maven.plugins
        maven-install-plugin
        2.3.1
        
            
                install-oracle-jdbc
                
                    install-file
                
                clean
                
                    com.oracle
                    ojdbc6
                    11.2.0
                    jar
                    true
                    true
                    ${project.basedir}/src/lib/ojdbc6.jar
                
            
        
    
    

    Now you only have to execute mvn clean once and the oracle lib is installed in your local maven repository.

提交回复
热议问题