[精讚] [會員登入]
500

回應

修正pom.xml,

分享此文連結 //n.sfs.tw/11603

分享連結 回應@外行中的外行
(文章歡迎轉載,務必尊重版權註明連結來源)
2018-10-26 12:01:16 最後編修
2017-08-11 19:04:10 By jung
 

1. before you start to download dependencies for maven project, you should add settings.xml to your username's ".m2"folder, in order to download private packages
according to: http://www.codedata.com.tw/java/understanding-gradle-2-maven/
透過『宣告』相依性的方法在替專案增加相依函式庫,將專案原始碼與函式庫分開處理,方便了版本控制系統的使用。編譯成果會被放在 target 目錄下,除了 target 目錄的內容,其他都是需要進版本控制系統的『資料』。而函式庫會由 Maven 透過 repostiory server 下載,並 cache 在使用者目錄下的 /.m2 目錄

written those texts into your "settings.xml",and save to your user home directory's ".m2" folder

########################以下為新增內容#################

<?xml version="1.0" encoding="UTF-8"?>
<settings xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd";;;;;;; xmlns="http://maven.apache.org/SETTINGS/1.1.0"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <servers>
   <server>
     <username>attention!!must insert your own user name on JFrog Artifactory</username>
     <password>and your own password here!!</password>
     <id>oidcrs-release</id>
   </server>
 </servers>
 <!--
 <profiles>
   <profile>
     <repositories>
       <repository>
         <snapshots>
           <enabled>false</enabled>
         </snapshots>
         <id>central</id>
         <name>libs-release</name>
         <url>https://oidcrs.tanet.edu.tw/artifactory/libs-release</url>
       </repository>
     </repositories>
     <id>artifactory</id>
   </profile>
 </profiles>
 <activeProfiles>
   <activeProfile>artifactory</activeProfile>
 </activeProfiles>
 -->
</settings>

###########################################################################

then restart your netbeans.

 

2. maven java application project's pom.xml revised as followng:

如 "http://n.sfs.tw/content/index/11551
提到的,在新增maven專案後,到該專案的pom.xml修改如下:

<?xml version="1.0" encoding="UTF-8"?>
<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>rest</groupId>
    <artifactId>IDP001</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>jar</packaging>
###以下為新增的部分#####################   

<dependencies>
        <dependency>
            <groupId>tc.edu</groupId>
            <artifactId>cnclibs</artifactId>
            <version>0.0.1</version>
        </dependency>
</dependencies>
<repositories>
    <repository>
        <id>oidcrs-release</id>
        <url>https://oidcrs.tanet.edu.tw/artifactory/libs-release</url>
    </repository>
</repositories>

#####以上是新增的部分##################

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
</properties>    
</project>

============================================================

then, after you saved pom.xml in netbeans, you can right click on your netbeans project name, and choose to reload POM,

after doing that, right click on your project's dependencies folder, choose to "download declared dependencies"

 

3. doing the same thing from here五、建立Other Source

END

你可能感興趣的文章

更新程式環境到wildfly18+openjdk11-phase1: upgrade mongodb server 更新程式環境到wildfly18+openjdk11-phase1: upgrade mongodb server to version 3.6

更新程式環境到wildfly18+openjdk11-phase4: 認證程式更新 認證程式更新

縣市端IdP新增自訂首頁內容功能 合併本部主程式,手動於mongo內新增管理使用者資料

solution for selinux issue while installing zabbix agent on centos7 install zabbix agent as service will raise selinux issue on some centos 7.3.1611

新增IDP程式使用google防機器人的驗證功能 身份認證程式新增google防機器人v2

回應 修正pom.xml,

我有話要說

>>

限制:留言最高字數1000字。 限制:未登入訪客,每則留言間隔需超過10分鐘,每日最多5則留言。

訪客留言

[無留言]

隨機好文

縣市IDP新增API功能 修改IDP程式增加API介面

在ubuntu18.04桌面版安裝中文注音輸入法 如何在ubuntu桌面使用新酷音注音輸入法

縣市端新增syncdata spi功能 為了讓部裡主機可以透過OAUTH2流程,呼叫縣市同步SYNCDATA 的API

how to resolve memory allocation issue on proxmox when creating vm, sometimes the log shows fail message of Cannot_allocate_memory

how to add physical disks into HP smart array through esxi interface 如何在磁碟陣列卡上加入新的硬碟-未完待續