Maven 配置

文章目录

  • Maven in IntelliJ
  • Footnotes

一只 Java 小白记录配置 IntelliJ 并编写 Java 的一些不会的东西(其实真的啥也不会。

Maven in IntelliJ

python 有 pip / conda 来做包管理,而 Java 有 maven。

在 IntelliJ 中配置 maven,打开 preference

{% %}

preference->Build, Execution, Deployment->Build Tools->Maven 找到 ~/.m2/setting.xml 在 setting 里输入脚注[1]里的内容。

在 Importing 里 ☑️ automatically download: sources


Footnotes

[1]


<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">
    
    <pluginGroups />
    <proxies />
    <servers />
    
    <localRepository>D:/server/maven/repositorylocalRepository>
    
    <mirrors>
        <mirror>
            <id>alimavenid>
            <mirrorOf>centralmirrorOf>
            <name>aliyun mavenname>
            <url>http://maven.aliyun.com/nexus/content/repositories/central/url>
        mirror>
        <mirror>
            <id>alimavenid>
            <name>aliyun mavenname>
            <url>http://maven.aliyun.com/nexus/content/groups/public/url>
            <mirrorOf>centralmirrorOf>
        mirror>
        <mirror>
            <id>centralid>
            <name>Maven Repository Switchboardname>
            <url>http://repo1.maven.org/maven2/url>
            <mirrorOf>centralmirrorOf>
        mirror>
        <mirror>
            <id>repo2id>
            <mirrorOf>centralmirrorOf>
            <name>Human Readable Name for this Mirror.name>
            <url>http://repo2.maven.org/maven2/url>
        mirror>
        <mirror>
            <id>ibiblioid>
            <mirrorOf>centralmirrorOf>
            <name>Human Readable Name for this Mirror.name>
            <url>http://mirrors.ibiblio.org/pub/mirrors/maven2/url>
        mirror>
        <mirror>
            <id>jboss-public-repository-groupid>
            <mirrorOf>centralmirrorOf>
            <name>JBoss Public Repository Groupname>
            <url>http://repository.jboss.org/nexus/content/groups/publicurl>
        mirror>
        <mirror>
            <id>google-maven-centralid>
            <name>Google Maven Centralname>
            <url>https://maven-central.storage.googleapis.com
            url>
            <mirrorOf>centralmirrorOf>
        mirror>
        
        <mirror>
            <id>maven.net.cnid>
            <name>oneof the central mirrors in chinaname>
            <url>http://maven.net.cn/content/groups/public/url>
            <mirrorOf>centralmirrorOf>
        mirror>
    mirrors>
    
settings>

你可能感兴趣的:(Tools,工程)