美文网首页
JAVA-eclipes-maven安装配置

JAVA-eclipes-maven安装配置

作者: 吃肉666 | 来源:发表于2017-05-18 12:10 被阅读28次
  1. 官网下载eclipse(http://www.eclipse.org/downloads/)
    等待下载完安装.....
  2. 配置maven 官网下载(http://maven.apache.org)
Snip20170518_3.png Snip20170518_4.png Snip20170518_5.png Snip20170518_6.png Snip20170518_9.png

配置apache-maven-3.5.0/conf/settings.xml
镜像
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>

配置仓库地址
<localRepository>自己的目录</localRepository>

更改默认jdk为1.8 (maven默认jdk是1.5)
<profiles>
<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>

        <repositories>

            <repository>

                <id>nexus</id>

                <name>local

private nexus</name>

                <url>http://maven.oschina.net/content/groups/public/</url>

                <releases>

                    <enabled>true</enabled>

                </releases>

                <snapshots>

                    <enabled>false</enabled>

                </snapshots>

            </repository>

        </repositories>

        <pluginRepositories>

            <pluginRepository>

                <id>nexus</id>

                <name>local

private nexus</name>

                <url>http://maven.oschina.net/content/groups/public/</url>

                <releases>

                    <enabled>true</enabled>

                </releases>

                <snapshots>

                    <enabled>false</enabled>

                </snapshots>

            </pluginRepository>

        </pluginRepositories>

    </profile>

</profiles>

Snip20170518_10.png Snip20170518_11.png Snip20170518_12.png Snip20170518_13.png Snip20170518_14.png

3 新建maven项目
project explorer空白区域->new->other->maven project->next

Snip20170518_15.png Snip20170518_16.png

最后点击finish 一个maven项目就建好了

相关文章

网友评论

      本文标题:JAVA-eclipes-maven安装配置

      本文链接:https://www.haomeiwen.com/subject/yuxsxxtx.html