zoukankan      html  css  js  c++  java
  • 【转】Install Oracle Jdbc driver in your Maven local repository

    Install Oracle Jdbc driver in your Maven local repository

    If you are using Oracle, you must first install your Oracle JDBC driver in your local Maven repository.

    Here is how to proceed:

    Step 1 - Download the Oracle JDBC driver

    Please download manually the Oracle JDBC driver from Oracle web site.

    Step 2 - install your Oracle JDBC driver in your local Maven repository

    We follow the instructions from this Maven FAQ I have a jar that I want to put into my local repository. How can I copy it in?

    In this example, we assume that your Oracle JDBC driver is in a file called classes12_g.jar

    Open a console and go to the folder containing the classes12_g.jar file.

    c:oraclejdbc>dir
    23/06/2008  13:02        2 044 594 classes12_g.jar
    

    Let's assume you want to register your driver under the group id 'com.oracle', use 'oracle' as the name of the artifact id and that you want the version to be '10.2.0.2.0'.

    You can now run the following command:

    c:oraclejdbc>mvn install:install-file -Dfile=classes12_g.jar -DgroupId=com.oracle 
    -DartifactId=oracle -Dversion=10.2.0.2.0 -Dpackaging=jar -DgeneratePom=true
    
    [INFO] Scanning for projects...
    [INFO] Searching repository for plugin with prefix: 'install'.
    [INFO] ------------------------------------------------------------------------
    [INFO] Building Maven Default Project
    [INFO]  task-segment: [install:install-file] (aggregator-style)
    [INFO] ------------------------------------------------------------------------
    [INFO] [install:install-file]
    [INFO] Installing c:oraclejdbcclasses12_g.jar to C:UsersNicolas.m2
    epositorycomoracleoracle
    10.2.0.2.0oracle-10.2.0.2.0.jar
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD SUCCESSFUL
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 1 second
    [INFO] Finished at: Tue Feb 03 12:58:23 CET 2009
    [INFO] Final Memory: 3M/5M
    [INFO] ------------------------------------------------------------------------
    

    Step 3 - Ready!

    You can now add the driver dependency in your pom.xml

    <dependency>
        <groupId>com.oracle</groupId>
        <artifactId>oracle</artifactId>
        <version>10.2.0.2.0</version>
    </dependency>
    

    Step 4 - Use SpringFuse to reverse your database and generate a projet...

    原文地址

  • 相关阅读:
    jQuery on注册事件
    前端表格(Table)多条数据可以增加行删除行json封装后Post数据到后台处理
    导出Excel数据
    C#在一个实体类上新加字段并把另外一个实体类的字段值赋给它
    函数(五)-内置函数
    函数(四)-命名空间与作用域
    函数(三)-return与函数的调用
    函数(二)- 参数
    函数(一)-基本格式
    字符串格式化
  • 原文地址:https://www.cnblogs.com/zhuwenjun/p/3665460.html
Copyright © 2011-2022 走看看