oschina maven库配置

配置setting.xml文件

添加如下内容

  <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>
      <id>nexus-osc</id>
      <mirrorOf>*</mirrorOf>
      <name>Nexus osc</name>
      <url>http://maven.oschina.net/content/groups/public/</url>
    </mirror>
  </mirrors>
 <profiles>
 <profile>
      <id>jdk-1.7</id>
      <activation>
         <jdk>1.7</jdk>
      </activation>
   <repositories>
	 <repository>
	    <id>nexus</id>
	    <name>local private nexus</name>
	    <url>http://maven.oschina.net/content/groups/public/</url>
	    <releases>
	       <enabled>true</enabled>
	    </releases>
	    <snapshots>
	       <enabled>false</enabled>
	    </snapshots>
	       </repository>
   </repositories>
   <pluginRepositories>
	 <pluginRepository>
	    <id>nexus</id>
	    <name>local private nexus</name>
            <url>http://maven.oschina.net/content/groups/public/</url>
            <releases>
               <enabled>true</enabled>
            </releases>
            <snapshots>
               <enabled>false</enabled>
            </snapshots>
	  </pluginRepository>
    </pluginRepositories>
 </profile>
 </profiles>




转载于:https://my.oschina.net/zyqjustin/blog/390036

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
要在IntelliJ IDEA中下载Maven插件,您可以按照以下步骤进行操作: 1. 打开IDEA,点击菜单栏中的“File”,然后选择“Settings”。 2. 在设置窗口中,找到“Plugins”选项。 3. 在插件界面搜索框中,输入“Maven Helper”并点击搜索按钮。如果已经安装了该插件,则可以直接跳过此步骤。 4. 找到“Maven Helper”插件,并点击右侧的“Install”按钮进行安装。 5. 安装完成后,重新启动IDEA以使插件生效。 此外,您还可以使用其他Maven插件来管理Jar包依赖。例如,您提到的“maven jar 包管理插件”。如果您已经知道该插件的名称,请按照上述步骤中的相同方式进行搜索和安装。 在安装了Maven插件后,您还可以使用Maven配置文件来设置镜像和其他选项。例如,您可以创建一个名为“settings.xml”的文件,其中包含如下内容: ```xml <?xml version="1.0" encoding="UTF-8"?> <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"> <mirrors> <mirror> <id>alimaven</id> <name>aliyun maven</name> <url>http://maven.aliyun.com/nexus/content/groups/public/</url> <mirrorOf>central</mirrorOf> </mirror> <mirror> <id>uk</id> <mirrorOf>central</mirrorOf> <name>Human Readable Name for this Mirror.</name> <url>http://uk.maven.org/maven2/</url> </mirror> <mirror> <id>CN</id> <name>OSChina Central</name> <url>http://maven.oschina.net/content/groups/public/</url> <mirrorOf>central</mirrorOf> </mirror> </mirrors> </settings> ``` 您可以在此文件中定义镜像和其他配置,以加速Maven的依赖下载。 最后,如果您想查看项目中的依赖关系,您可以使用IntelliJ IDEA的Dependency Analyzer工具。切换到Dependency Analyzer试图后,您可以查看冲突、以列表形式查看所有依赖或以树形式查看所有依赖。 希望这些信息对您有所帮助!<span class="em">1</span><span class="em">2</span><span class="em">3</span><span class="em">4</span>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值