maven命令创建web项目
Last updated
Was this helpful?
Last updated
Was this helpful?
通过dos命令行定位到要创建项目的目录,执行以下命令:
mvn archetype:create -DgroupId=com.learn -DartifactId=LearnNew -DarchetypeArtifactId=maven-archetype-webapp
或者使用自定义的仓库配置文件
执行结果如下:
生成项目目录机构:
打开index.jsp 就能看到
执行mvn install,并将target下面的LearnNew.war放于tomcat的webapps下面,启动tomcat,通过浏览器访问: 将会看到熟悉的:”Hello World!“