1.创建命令:
mvn archetype:generate -DgroupId=com.cn.zcode -DartifactId=zcode -DarchetypeArtifactId=maven-archetype-webapp -DinteractiveMode=true
2.要配置servlet版本:右键项目-Properties-Project Facets
3.Cannot access defaults field of Properties
Description Resource Path Location Type
Exception java.lang.ExceptionInInitializerError: Cannot access defaults field of Properties [in thread "Worker-22: Building"] pom.xml /zcode line 1 Maven Configuration Problem
加入:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>3.3.1</version>
</plugin>
</plugins>
</build>
4.编译后,maven创建的web项目依赖的jar
版权归原作者 svygh123 所有, 如有侵权,请联系我们删除。