maven配置本地仓库以及创建项目

  maven配置本地仓库以及创建项目

一:解压maven压缩包

二:配置settings.xml文件

 

三:配置阿里云镜像:

四:打开Eclipse,使用本地maven仓库

window-》preference-》Installations-》add-》maven放的位置

配置仓库:User Settings-》Global Settings-》maven配置文件所放的位置

五:创建maven项目:

 

注意:要点击simple project,否则项目会让你选择配置一些框架属性

  Group Id:代表着域名,格式还是老样子

  Artifical Id:模块名字Ad

 

六:配置settings.xml文件,使得Eclipse创建的项目是jdk1.8版本的

    <profile>
        <id>jdk-1.8</id>
        <activation>
            <activeByDefault>true</activeByDefault>
            <jdk>1.8</jdk>
        </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>

 

 

posted @ 2020-11-04 15:49  焕不涣  阅读(1154)  评论(0编辑  收藏  举报