maven运用,在eclipse中将maven本地仓库加入,创建maven项目

1、在eclipse中:

选择Windows->Preferences

第一步:点开Maven->选择Installations->add->选择maven所在的根目录-

第二步:选择UserSetting->Browse...->选择maven目录下的conf/setting.xml->Apply->ok

2、完成后,创建maven项目,基本上就可以了

3、设置javaSE:

为了减少每次都要选择javase,我们直接在maven的setting.xml里面添加:

【在profile标签的地方】

    <profile>
      <id>jdk-1.8</id>

      <activation>
        <activeByDefault>true</activeByDefault>
        <jdk>1.7</jdk>
      </activation>

      <properties>
            <maven.compiler.source>1.7</maven.compiler.source>
            <maven.compiler.target>1.7></maven.compiler.target>
            <maven.compiler.compilerVersion>1.7</maven.compiler.compilerVersion>
      </properties>
    </profile>

 

posted @ 2021-12-19 15:55  CiscoLee  阅读(220)  评论(0编辑  收藏  举报