解决IDEA中创建maven工程相关问题

2020-04-06  本文已影响0人  yaco

Maven下载安装及配置

新手上路,被maven的各种问题整的很是烦恼,写一份自己走通的配置方法。

1 Maven的下载安装

2 maven仓库配置和镜像下载地址

<localRepository>D:\maven\repository</localRepository>
  <mirrors>
  
    <mirror>
        <id>aliyunmaven</id>
        <mirrorOf>*</mirrorOf>
        <name>阿里云公共仓库</name>
        <url>https://maven.aliyun.com/repository/public</url>
    </mirror>
        
    <!-- 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>
     -->
  </mirrors>
<profiles>  
    <profile>
        <id>jdk18</id>
        <activation>
            <jdk>1.8</jdk>
            <activeByDefault>true</activeByDefault>
        </activation>
        <properties>
            <maven.compiler.source>1.8</maven.compiler.source>
            <maven.compiler.target>1.8</maven.compiler.target>
            <maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
        </properties>
    </profile>
</profiles> 

3 IDEA的相关配置

上一篇 下一篇

猜你喜欢

热点阅读