maven本地仓库

引入某一个站点的jar包

    <repositories>
        <repository>
            <id>maven.seasar.org</id>
            <name>The Seasar Foundation Maven Repository</name>
            <url>http://maven.seasar.org/maven2</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>maven-snapshot.seasar.org</id>
            <name>The Seasar Foundation Maven Snapshot Repository</name>
            <url>http://maven.seasar.org/maven2-snapshot</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>always</updatePolicy>
            </snapshots>
        </repository>

        <repository>
            <id>nexus</id>
            <url>http://192.168.0.48:8081/nexus/content/groups/public/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
    </repositories>

 

引入本地仓库的jar包

<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
   | The path to the local repository maven will use to store artifacts.
   |
   | Default: ~/.m2/repository
  -->
  <localRepository>D:/aipo/m2_home/.m2/repository</localRepository>
  ......
</settings>

修改eclipse中关于maven的配置,这样就回去指定的这个repository里面找jar包了。

posted @ 2015-01-30 13:24  VoctrALs  阅读(371)  评论(0编辑  收藏  举报