Maven创建项目(命令创建)

1、创建项目

C:\Users\Administrator\LearnNew>mvn -X archetype:generate -Dgroup

artifactId=LearnNew -DarchetypeArtifactId=maven-archetype-webapp



C:\Users\Administrator\LearnNew>mvn archetype:create -DgroupId=com.learn -Dartif
actId=LearnNew -DarchetypeArtifactId=maven-archetype-webapp


C:\Users\Administrator\LearnNew>mvn -X archetype:generate -DgroupId=co
artifactId=LearnNew -DarchetypeArtifactId=maven-archetype-webapp


2、遍历路径

C:\Users\Administrator\LearnNew>dir


3、

C:\Users\Administrator\LearnNew>cd LearnNew

4、tree


5、intelIj 中 有如下错误:

"C:\Program Files\Java\jdk1.8.0_77\bin\java" -Dmaven.home=D:\maven\apache-maven-3.3.9 -Dclassworlds.conf=D:\maven\apache-maven-3.3.9\bin\m2.conf -Didea.launcher.port=7532 "-Didea.launcher.bin.path=D:\IntelIj_Dev\IntelliJ IDEA 14.0.3\bin" -Dfile.encoding=UTF-8 -classpath "D:\maven\apache-maven-3.3.9\boot\plexus-classworlds-2.5.2.jar;D:\IntelIj_Dev\IntelliJ IDEA 14.0.3\lib\idea_rt.jar" com.intellij.rt.execution.application.AppMain org.codehaus.classworlds.Launcher -Didea.version=14.0.3 clean
-Dmaven.multiModuleProjectDirectory system property is not set. Check $M2_HOME environment variable and mvn script match.


操作:setting——>Build,Exceuction,Deployment ——>Build Tools——>Runner——>

在其中的VM Options     -Dmaven.multiModuleProjectDirectory=$M2_HOME


你可能感兴趣的:(java,框架集合)