`

maven仓库

阅读更多
Maven详解之仓库------本地仓库、远程仓库

http://blog.csdn.net/wanghantong/article/details/36427433

#收集的maven仓库
http://maven.wso2.org/nexus/content/groups/public/
http://jcenter.bintray.com/
http://maven.antelink.com/content/repositories/central/
http://nexus.openkoala.org/nexus/content/groups/Koala-release/
http://maven.tmatesoft.com/content/groups/public/
http://mavensync.zkoss.org/maven2/
http://maven.springframework.org/release/


<mirror>
   <id>uk central</id>  
      <name>uk Central Repository</name>  
    <url>http://uk.maven.org/maven2</url>
    <mirrorOf>central</mirrorOf>
</mirror>

<mirror>
    <id>sonatype</id>
    <name>sonatype Central</name>
    <url>http://repository.sonatype.org/content/groups/public/</url>
    <mirrorOf>central</mirrorOf>
</mirror>

<mirror>
    <id>jboss</id>
    <name>JBoss Public Repository Group</name>
    <url>http://repository.jboss.org/nexus/content/groups/public</url>
    <mirrorOf>central</mirrorOf>
</mirror>


阿里云提供Maven私服,setting.xml配置

https://github.com/ae6623/Zebra/blob/master/maven-repo-settings-ali.xml


<?xml version="1.0" encoding="UTF-8"?>

<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.
-->

<!--
 | This is the configuration file for Maven. It can be specified at two levels:
 |
 |  1. User Level. This settings.xml file provides configuration for a single user, 
 |                 and is normally provided in ${user.home}/.m2/settings.xml.
 |
 |                 NOTE: This location can be overridden with the CLI option:
 |
 |                 -s /path/to/user/settings.xml
 |
 |  2. Global Level. This settings.xml file provides configuration for all Maven
 |                 users on a machine (assuming they're all using the same Maven
 |                 installation). It's normally provided in 
 |                 ${maven.home}/conf/settings.xml.
 |
 |                 NOTE: This location can be overridden with the CLI option:
 |
 |                 -gs /path/to/global/settings.xml
 |
 | The sections in this sample file are intended to give you a running start at
 | getting the most out of your Maven installation. Where appropriate, the default
 | values (values used when the setting is not specified) are provided.
 |
 |-->
<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: ${user.home}/.m2/repository
  <localRepository>/path/to/local/repo</localRepository>
  -->
  <localRepository>D:\Repositories\Maven</localRepository>

  <!-- interactiveMode
   | This will determine whether maven prompts you when it needs input. If set to false,
   | maven will use a sensible default value, perhaps based on some other setting, for
   | the parameter in question.
   |
   | Default: true
  <interactiveMode>true</interactiveMode>
  -->

  <!-- offline
   | Determines whether maven should attempt to connect to the network when executing a build.
   | This will have an effect on artifact downloads, artifact deployment, and others.
   |
   | Default: false
  <offline>false</offline>
  -->

  <!-- pluginGroups
   | This is a list of additional group identifiers that will be searched when resolving plugins by their prefix, i.e.
   | when invoking a command line like "mvn prefix:goal". Maven will automatically add the group identifiers
   | "org.apache.maven.plugins" and "org.codehaus.mojo" if these are not already contained in the list.
   |-->
  <pluginGroups>
    <!-- pluginGroup
     | Specifies a further group identifier to use for plugin lookup.
    <pluginGroup>com.your.plugins</pluginGroup>
    -->
    <pluginGroup>org.mortbay.jetty</pluginGroup>
  </pluginGroups>

  <!-- proxies
   | This is a list of proxies which can be used on this machine to connect to the network.
   | Unless otherwise specified (by system property or command-line switch), the first proxy
   | specification in this list marked as active will be used.
   |-->
  <proxies>
    <!-- proxy
     | Specification for one proxy, to be used in connecting to the network.
     |
    <proxy>
      <id>optional</id>
      <active>true</active>
      <protocol>http</protocol>
      <username>proxyuser</username>
      <password>proxypass</password>
      <host>proxy.host.net</host>
      <port>80</port>
      <nonProxyHosts>local.net|some.host.com</nonProxyHosts>
    </proxy>
    -->
  </proxies>

  <!-- servers
   | This is a list of authentication profiles, keyed by the server-id used within the system.
   | Authentication profiles can be used whenever maven must make a connection to a remote server.
   |-->
  <servers>
    <!-- server
     | Specifies the authentication information to use when connecting to a particular server, identified by
     | a unique name within the system (referred to by the 'id' attribute below).
     | 
     | NOTE: You should either specify username/password OR privateKey/passphrase, since these pairings are 
     |       used together.
     |
    <server>
      <id>deploymentRepo</id>
      <username>repouser</username>
      <password>repopwd</password>
    </server>
    -->
    
    <!-- Another sample, using keys to authenticate.
    <server>
      <id>siteServer</id>
      <privateKey>/path/to/private/key</privateKey>
      <passphrase>optional; leave empty if not used.</passphrase>
    </server>
    -->
    <server>
        <id>releases</id>
        <username>ali</username>
        <password>ali</password>
      </server>
      <server>
        <id>Snapshots</id>
        <username>ali</username>
        <password>ali</password>
      </server>
  </servers>

  <!-- mirrors
   | This is a list of mirrors to be used in downloading artifacts from remote repositories.
   | 
   | It works like this: a POM may declare a repository to use in resolving certain artifacts.
   | However, this repository may have problems with heavy traffic at times, so people have mirrored
   | it to several places.
   |
   | That repository definition will have a unique id, so we can create a mirror reference for that
   | repository, to be used as an alternate download site. The mirror site will be the preferred 
   | server for that repository.
   |-->
  <mirrors>
    <!-- mirror
     | Specifies a repository mirror site to use instead of a given repository. The repository that
     | this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used
     | for inheritance and direct lookup purposes, and must be unique across the set of mirrors.
     |
    <mirror>
      <id>mirrorId</id>
      <mirrorOf>repositoryId</mirrorOf>
      <name>Human Readable Name for this Mirror.</name>
      <url>http://my.repository.com/repo/path</url>
    </mirror>
     -->
    <mirror>
      <!--This sends everything else to /public -->
      <id>nexus</id>
      <mirrorOf>*</mirrorOf> 
      <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
    </mirror>
    <mirror>
      <!--This is used to direct the public snapshots repo in the 
          profile below over to a different nexus group -->
      <id>nexus-public-snapshots</id>
      <mirrorOf>public-snapshots</mirrorOf> 
      <url>http://maven.aliyun.com/nexus/content/repositories/snapshots/</url>
    </mirror>
  </mirrors>
  
  <!-- profiles
   | This is a list of profiles which can be activated in a variety of ways, and which can modify
   | the build process. Profiles provided in the settings.xml are intended to provide local machine-
   | specific paths and repository locations which allow the build to work in the local environment.
   |
   | For example, if you have an integration testing plugin - like cactus - that needs to know where
   | your Tomcat instance is installed, you can provide a variable here such that the variable is 
   | dereferenced during the build process to configure the cactus plugin.
   |
   | As noted above, profiles can be activated in a variety of ways. One way - the activeProfiles
   | section of this document (settings.xml) - will be discussed later. Another way essentially
   | relies on the detection of a system property, either matching a particular value for the property,
   | or merely testing its existence. Profiles can also be activated by JDK version prefix, where a 
   | value of '1.4' might activate a profile when the build is executed on a JDK version of '1.4.2_07'.
   | Finally, the list of active profiles can be specified directly from the command line.
   |
   | NOTE: For profiles defined in the settings.xml, you are restricted to specifying only artifact
   |       repositories, plugin repositories, and free-form properties to be used as configuration
   |       variables for plugins in the POM.
   |
   |-->
  <profiles> 
    <profile>
      <id>development</id>
      <repositories>
        <repository>
          <id>central</id>
          <url>http://central</url>
          <releases><enabled>true</enabled><updatePolicy>always</updatePolicy></releases>
          <snapshots><enabled>true</enabled><updatePolicy>always</updatePolicy></snapshots>
        </repository>
      </repositories>
     <pluginRepositories>
        <pluginRepository>
          <id>central</id>
          <url>http://central</url>
          <releases><enabled>true</enabled><updatePolicy>always</updatePolicy></releases>
          <snapshots><enabled>true</enabled><updatePolicy>always</updatePolicy></snapshots>
        </pluginRepository>
      </pluginRepositories>
    </profile>
    <profile>
      <!--this profile will allow snapshots to be searched when activated-->
      <id>public-snapshots</id>
      <repositories>
        <repository>
          <id>public-snapshots</id>
          <url>http://public-snapshots</url>
          <releases><enabled>false</enabled></releases>
          <snapshots><enabled>true</enabled><updatePolicy>always</updatePolicy></snapshots>
        </repository>
      </repositories>
     <pluginRepositories>
        <pluginRepository>
          <id>public-snapshots</id>
          <url>http://public-snapshots</url>
          <releases><enabled>false</enabled></releases>
          <snapshots><enabled>true</enabled><updatePolicy>always</updatePolicy></snapshots>
        </pluginRepository>
      </pluginRepositories>
    </profile>
  </profiles>
 
   <activeProfiles>
    <activeProfile>development</activeProfile>
    <activeProfile>public-snapshots</activeProfile>
   </activeProfiles>
</settings>

分享到:
评论

相关推荐

    Maven很Maven仓库

    【Maven很Maven仓库】这个标题暗示了讨论的核心是关于Maven以及它与Maven仓库的关系。Maven是一个在Java开发中广泛使用的项目管理和综合工具,它通过一个声明式的配置来管理项目的构建、报告和文档。Maven仓库则是...

    超全面搭建Maven仓库

    ### 超全面搭建Maven仓库 Maven是一款强大的项目管理工具,主要用于Java项目的构建、依赖管理和项目信息管理。本文将详细介绍如何搭建Maven环境、配置Maven仓库以及在Eclipse中集成Maven。 #### 一、下载安装Maven...

    maven仓库清理命令

    maven仓库清理命令

    settings.xml,本地maven仓库配置

    settings.xml,本地maven仓库配置,注意:D:\maven\repository为我本地的maven仓库路径,改成你的。 settings.xml,本地maven仓库配置,注意:D:\maven\repository为我本地的maven仓库路径,改成你的。 settings.xml...

    nexus 搭建 maven仓库

    nexus 搭建 maven仓库nexus 搭建 maven仓库nexus 搭建 maven仓库nexus 搭建 maven仓库nexus 搭建 maven仓库

    2024版Maven仓库清除工具

    Maven仓库在Java开发中扮演着至关重要的角色,它是一个存储库,用于管理和构建Java项目,包含各种依赖项如JAR文件、源代码、文档等。然而,随着时间的推移,Maven仓库可能会积累大量不再使用的或者过时的依赖,这...

    一键清除maven仓库中下载失败的jar包的实现方法

    一键清除maven仓库中下载失败的jar包的实现方法 在Maven项目中,下载失败的jar包是一个常见的问题,它们会占用磁盘空间,影响开发效率和心情。因此,清除这些下载失败的jar包变得非常重要。本文将详细介绍如何使用...

    详解如何将本地JAR包添加到本地Maven仓库中

    详解如何将本地JAR包添加到本地Maven仓库中 有些时候,当我们需要在自己的maven工程中添加一个确定的jar而发现Maven中央仓库不存在时,但是我们自己手上有这些需要的jar包,那么我们可以自给自足,把这个jar包添加到...

    maven仓库清理程序

    ** Maven仓库清理程序详解 ** Maven仓库是Java开发者在构建项目时不可或缺的一部分,它存储了项目的依赖库,包括JAR文件和其他构建资源。随着时间的推移,Maven仓库可能会积累大量的缓存文件,这些文件可能包括以"....

    Maven仓库链接下载

    Maven仓库是Java开发中不可或缺的一部分,它是一个中央存储库,包含了大量的开源项目构件(JAR文件),使得开发者能够方便地管理和下载所需的依赖。Maven通过使用一个统一的配置方式,简化了项目的构建、依赖管理和...

    maven仓库jar包

    Maven仓库是Java开发中至关重要的一个组成部分,它是一个集中存储各种软件构件(如JAR包)的中央仓库,便于开发者获取、管理和分享依赖。Maven通过配置项目构建的POM.xml文件,能够自动从仓库中下载所需的jar包,极...

    清理本地和远程maven仓库repository中的无效或者垃圾版本文件lastUpdated、_remote等

    1、工具作用:清理本地和远程maven仓库repository中的无效或者垃圾版本文件lastUpdated、_maven.repositories*、_remote.repositories; 2、使用方法1:在本地仓库repository文件夹中右键,打开Git Bahs Here命令...

    JxBrowser开发maven仓库jar包

    由于JxBrowser在maven仓库中可能不再可用,对于需要使用此库的开发者来说,直接下载jar包并将其部署到本地或私有Maven仓库是必要的步骤。 首先,我们需要理解Maven仓库的概念。Maven仓库是存储项目依赖的地方,分为...

    maven仓库 jar包

    在Java开发中,Maven仓库是一个至关重要的组成部分,它存储了大量的jar包,这些包包含了各种预编译的类和库,使得开发者无需从零开始构建项目。Maven仓库分为本地仓库、中央仓库和远程仓库,其中"maven-repository...

    maven仓库中org下的springframework

    标题中的“maven仓库中org下的springframework”指的是在Maven的本地或远程仓库中,位于`org`组织下的`springframework`项目。Spring Framework是Java开发中的一个核心框架,由Pivotal Software公司维护,它为构建...

    Maven仓库管理-Nexus

    Maven仓库管理-Nexus Maven仓库管理是Maven的核心概念之一,它解决了使用 Ant 时期的 jar 包管理问题。Maven 仓库的初衷是为了解决版本管理的问题,通过 Group Id, Artifact Id, version 来管理 jar 包,实现了依赖...

    设置Maven仓库-Artifactory

    设置Maven仓库-Artifactory Maven 是 Java 开发者中流行的构建工具,可以帮助减少构建应用程序时所依赖的软件构件的副本。Maven 建议的方法是将所有软件构件存储于一个叫做 repository 的远程仓库中。设置内部 ...

    maven仓库清除工具.rar

    然而,在实际操作中,由于网络问题或依赖冲突,Maven仓库可能会出现下载不完整或者失败的资源,这将导致构建过程受阻。"maven仓库清除工具"正是为了解决这类问题而设计的。 该工具主要用于清理Maven本地仓库中的...

    将本地jar上传到maven仓库

    将本地jar包上传到maven仓库,刷新仓库后即可使用

    maven仓库清理脚本.zip

    Maven仓库是Maven存储依赖项、插件和其他构建资源的地方。随着时间的推移,这个仓库可能会积累许多不再需要或者下载不完整的文件,这些文件可能会占用大量磁盘空间,甚至可能导致构建问题。"maven仓库清理脚本.zip...

Global site tag (gtag.js) - Google Analytics