配置idea自带的maven,配置maven的阿里云仓库

这篇具有很好参考价值的文章主要介绍了配置idea自带的maven,配置maven的阿里云仓库。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

idea中是有着自带maven的,这种自带的maven对于新手是非常友好的,它屏蔽了挺多的细节,方便新手的使用。但是idea自带maven一般是只能idea自己使用的,而且这个maven数据都是放在c盘。所以建议大家以后还是自己另外安装maven使用。

首先找到File ->settings->Build,Execution,Deployment->Build Tools->Maven.
这个Maven3就是idea自带的maven,下面的C:\Users\faith.m2\settings.xml是maven的配置文件,C:\Users\faith.m2\repository就是maven的仓库。
idea自带maven吗,intellij-idea,maven,阿里云,java
我们需要按照配置文件的路径(C:\Users\faith.m2\settings.xml)找到对应的配置。 大家可以看到这个目录下只有repository文件夹,没有配置文件(可能有些人的是有的),没有的话需要大家自己创建一个settings.xml文件
idea自带maven吗,intellij-idea,maven,阿里云,java
settings.xml(大家注意本地仓库位置,仓库位置可以自定义,建议不要放在c盘,如果c盘大,那就随意了)

<?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">
  <!-- 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:/apache-maven-3.3.9/repository</localRepository>

  
  <pluginGroups>
    <!-- pluginGroup
     | Specifies a further group identifier to use for plugin lookup.
    <pluginGroup>com.your.plugins</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>
    -->
  </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>
      <id>alimaven</id>
      <name>aliyun maven</name>
      <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
	  <mirrorOf>central</mirrorOf>
    </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>
    
</settings>

注意idea中的仓库位置要和settings.xml配置文件中的位置一致
idea自带maven吗,intellij-idea,maven,阿里云,java

致此idea自带的maven配置就完成了。文章来源地址https://www.toymoban.com/news/detail-516275.html

到了这里,关于配置idea自带的maven,配置maven的阿里云仓库的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • 修改IDEA自带的Bundled (Maven 3)的仓库路径(Maven安装及配置)

    目录 一、安装本地Maven 下载Maven: 配置Maven环境变量到Path中: 新建系统变量:MAVEN_HOME 添加到Path中: 测试Maven是否安装成功: 二、配置maven仓库 配置本地仓库:  配置中央仓库 配置jdk版本:  注意:检查JAVA_HOME环境变量, maven本身就是java写的,所以要求必须先安装JDK,检查本

    2024年02月01日
    浏览(67)
  • IntelliJ IDEA 如何修改默认Maven仓库地址

    在使用idea过程中,每次新建或者拉取新的项目后,maven仓库的地址都会变成默认的。如何修改这个默认地址,让其保持不变,我知道的有2中办法。 第一种: 1、打开IDEA,取消自动加载项目  2、点击Customize,在点击All settings...  3、搜索maven,然后在右侧红框中设置为自己的

    2024年02月11日
    浏览(66)
  • Linux 创建 intellij-idea快捷方式

    在 Linux 中,可以通过创建快捷方式的方式方便地打开 IntelliJ IDEA 开发工具。下面是创建 IntelliJ IDEA 快捷方式的详细步骤: 第1步:打开终端窗口 首先,要打开终端窗口。可以通过快捷键 Ctrl + Alt + T 打开终端窗口。也可以在系统菜单栏中选择“应用程序”-“实用工具”-“终端

    2024年02月03日
    浏览(51)
  • Intellij IDEA中怎么配置Maven?

    在IntelliJ IDEA中配置Maven非常简单,以下是详细步骤: 步骤1:安装Maven 首先确保你的计算机上已经安装了Maven。如果没有安装,你可以从Apache Maven官网下载并安装:https://maven.apache.org/download.cgi 步骤2:在IntelliJ IDEA中配置Maven 打开 IntelliJ IDEA,点击顶部菜单栏的 “File”(Window

    2024年02月20日
    浏览(45)
  • 使用IntelliJ IDEA 配置Maven(入门)

    使用IntelliJ IDEA配置Maven时,需要按照以下步骤进行操作。请注意,由于涉及到软件安装和配置,以下步骤可能会因为版本更新而略有变化。 1、下载并安装IntelliJ IDEA 首先,需要下载并安装最新版本的IntelliJ IDEA集成开发环境。你可以从官方网站(https://www.jetbrains.com/idea/)下载

    2024年02月19日
    浏览(40)
  • Java项目使用intellij-IDEA查看依赖包版本是否有冲突(方法及工具)附截图

    编译器及版本 idea-ultimate 依赖管理工具 maven Step1:点击右侧的maven Step2:右键依赖项,点击分析依赖关系 Step3:可以在模块名位置进行切换,左侧三角的标志则表示该包引入了多个版本,有冲突 Step4:可以看到当前这个包被引入了两个版本的 Step5:右键冲突的包名,可以看到

    2024年02月15日
    浏览(74)
  • Maven的配置和IDEA自带Maven的一些探讨

    IDEA有自己自带的Maven,IDEA自带的Maven在IDEA的安装目录下(IntelliJ IDEA 2023.2.5安装路径pluginsmavenlibmaven3),如果打算采用IDEA自带Maven配置过程和用自己下载的maven是一样的流程,也是修改自带Maven下conf文件夹下的setting.xml文件 首先打开IDEA中Setting中的Maven选项,可以看到系统默

    2024年04月27日
    浏览(20)
  • IntelliJ IDEA maven配置,设置pom.xml的配置文件

    IntelliJ IDEA项目,选择  文件  设置,弹窗 构建、执行、部署 构建工具 Maven就可以 maven配置好以后,在pom.xml的配置文件中就可以设置对应的jar包了,这样构建的时候自动需要的jar,在项目中导入即 settings.xml文件apache-maven-3.9.0.rar下载,下载之后解压 到 E:Softapache-maven-3.9.0

    2024年02月11日
    浏览(52)
  • 【IntelliJ IDEA】idea修改设置默认maven,解决每次新建和导入项目都需要重新配置maven

    本文目录 一、开发工具 二、问题描述 三、解决方案 开发工具:IntelliJ IDEA 工具版本:Ultimate 2020.3 使用 idea 开发工具每次打开一个已有项目时,都需要重新配置一下 maven(Maven home path 和 User settings file)。这个问题出现好久了,问题不严重,但是特别烦人。 设置 Maven 路径和

    2024年02月14日
    浏览(48)
  • maven配置阿里云镜像仓库

       

    2024年02月03日
    浏览(38)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包