<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                在實際開發中,我們可能會遇到有一些JAR包在Maven的公共倉庫中沒有,所以我們要在本地引入 這里也是剛剛嘗試的,分享下 ### 1. systemPath方式引入 參考網址:[http://www.cnblogs.com/richard-jing/archive/2013/01/27/Maven_localjar.html](http://www.cnblogs.com/richard-jing/archive/2013/01/27/Maven_localjar.html) 感謝分享 我們在引入依賴的時候,有一個作用域,可以配置為system 對于依賴可以參考下這篇博客:(哎,看了下,寫的不太好,有時間,重寫下) [Maven深入學習(二)- 依賴?](http://blog.csdn.net/yuguiyang1990/article/details/8866719) 示例: ~~~ <dependency> <groupId>org.postgresql</groupId> <artifactId>postgresql</artifactId> <version>9.3</version> <scope>system</scope> <systemPath>${project.basedir}/lib/postgresql-9.3.jar</systemPath> </dependency> ~~~ 該jar包在項目中的位置: ![](https://box.kancloud.cn/2016-09-06_57ce65005b21f.jpg) 上面參考的網址提醒:使用這種方式引入的JAR包在打包時不會一起打包,所以打包后找不到該JAR包 解決方法: 修改JAR包的位置,將JAR包放在resources目錄下 ![](https://box.kancloud.cn/2016-09-06_57ce650074ea4.jpg) 修改pom.xml ~~~ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>org.ygy</groupId> <artifactId>helloworld</artifactId> <version>0.0.1-SNAPSHOT</version> <packaging>jar</packaging> <name>helloworld</name> <url>http://maven.apache.org</url> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>3.8.1</version> <scope>test</scope> </dependency> <dependency> <groupId>org.postgresql</groupId> <artifactId>postgresql</artifactId> <version>9.3</version> <scope>system</scope> <systemPath>${project.basedir}/src/main/resources/lib/postgresql-9.3.jar</systemPath> </dependency> </dependencies> <build> <resources> <!-- 這種方式可以將JAR包引入,還不清楚原因,待研究 --> <resource> <targetPath>lib/</targetPath> <directory>lib/</directory> <includes> <include>**/postgresql-9.3.jar</include> </includes> </resource> </resources> </build> </project> ~~~ ### 2. 將JAR包安裝到本地倉庫 官方介紹:[http://maven.apache.org/guides/mini/guide-3rd-party-jars-local.html](http://maven.apache.org/guides/mini/guide-3rd-party-jars-local.html) 執行命令: ~~~ D:\WorkSpace\cognos\helloworld\src\main\resources\lib>mvn install:install-file - Dfile=postgresql-9.3.jar -DgroupId=org.postgresql -DartifactId=postgresql -Dvers ion=9.3 -Dpackaging=jar ~~~ ![](https://box.kancloud.cn/2016-09-06_57ce6500888bb.jpg) 執行該命令后,Maven會將該JAR包部署到本地倉庫中,這樣在Maven中就可以正常使用了 ![](https://box.kancloud.cn/2016-09-06_57ce65009e592.jpg) 但是其他的話,也需要執行以下mvn install命令才可以正常使用 ### 3. 將本地lib發布為倉庫 使用repository標簽,這個暫未成功,明天嘗試下。
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看