标签:eclipse cli pat get uil targe ati 图片 type
至https://maven.apache.org/,点击Download,下载apache-maven-3.6.0-bin.zip,解压到C盘根目录,然后将C:\apache-maven-3.6.0\bin添加到path,同时新建M2_HOME的系统环境变量,值为C:\apache-maven-3.6.0。
在~/.m2目录(如:C:\Users\HP\.m2)下新建,settings.xml,填入下面的配置:
<settings> <mirrors> <mirror> <id>aliyun</id> <name>aliyun</name> <url>http://maven.aliyun.com/nexus/content/groups/public/</url> <mirrorOf>central</mirrorOf> </mirror> </mirrors> </settings>
打开eclipse,File—New—Project—Maven Project,点击下一步,默认选择Use default Workspace location,
点击下一步,选择默认的maven-archetype-quickstart 1.1 ,点下一步,输入Group Id,如com.yang,Artifact Id,如hello,点完成。
修改pom.xml,修改默认的java版本未java1.8,修改默认的Junit版本为Junit 4.12
<properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <java.version>1.8</java.version> <maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.target>1.8</maven.compiler.target> </properties> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.12</version> <scope>test</scope> </dependency> </dependencies>
标签:eclipse cli pat get uil targe ati 图片 type
原文地址:https://www.cnblogs.com/jec1999/p/9959903.html