[精讚] [會員登入]
581

回應

修正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

回應 修正pom.xml,

更新程式取消google recaptcha改用輸入驗證碼 update cnclibs to 0.0.8.6

更新程式環境到wildfly18+openjdk11-phase3: 伺服器環境升級準備 upgrade jdk and wildfly on server

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

在apache http server停用TLS 1.0/1.1 and SSL 2.0/3.0 How to disable outdated versions of SSL/TLS on Apache

我有話要說

>>

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

訪客留言

[無留言]

隨機好文

bitbucket repository control application setup 安裝完bitbucket服務後,須設定bitbucket.properties

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

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

更新IDP程式以新增及修正本地管理帳號登入 add locallogin page and function with local authorized account

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