2016-05-17 12 views
0

私のマシンにローカルリポジトリがあります。私はそれをmavenのsettings.xmlに追加する必要があります。私がオンライン見つけたすべての例は次のようになります。ローカルリポジトリをmaven settings.xmlに追加する

<settings> 
    <profiles> 
    <profile> 
     <id>myprofile</id> 
     <repositories> 
     <repository> 
      <id>androidsupport</id> 
      <name>Android Support</name> 
      <url>http://www.whatever.com/maven2/</url> 
     </repository> 
    </repositories> 
    </profile> 

     <activeProfiles> 
     <activeProfile>myprofile</activeProfile> 
     </activeProfiles> 
    </profiles> 
</settings> 

を私は地元のレポにそれを指すようにする必要があります。どうやってやるの?

答えて

3

私はあなたがsettings.xmlにこの追加を経由してそれを行うことができると思う:あなたはthere見つけることができます

<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 
    http://maven.apache.org/xsd/settings-1.0.0.xsd"> 
     <localRepository>C:/MyLocalRepository</localRepository> 
</settings> 

詳細を。

は、あなたが使用できる複数の内部リポジトリを追加するには:

<project> 
    ... 
    <repositories> 
    <repository> 
     <id>my-internal-site</id> 
     <url>file:///C:/MyLocalRepository</url> 
    </repository> 
    </repositories> 
    ... 
</project> 

詳細あなたがthereを見つけることができます。

+0

これは、パッケージが保存される1つのローカルターゲットリポジトリ用です。私は2番目のソースリポジトリを追加する必要があります – ConditionRacer

+0

あなたが望むものを理解しました。私の記事をもう一度見て、私はそれを編集しました。 – RMachnik

関連する問題