《SSM框架搭建》一.构建maven web项目

一.创建maven工程File-New-other-Maven Project

二.设置项目工作空间,取消默认勾选,手动设置

三.选择internal,输入web,选择maven.archetypes,这里第一次进来需要等待加载

四.输入项目名称

第一次创建,生成的是java工程,需要手动更改为web工程,方法见另一篇日志,

创建完成pom报错,Multiple annotations found at this line,

添加远程仓库配置,这里涉及到maven仓库管理nexus,暂时添加学习链接http://www.blogjava.net/baoyaer/articles/355040.html,稍后补充,这段配置不添加不影响项目运行

  <pluginRepositories>
      <pluginRepository>
            <id> gw-nexus-plugin</id>
            <name>goalwisdom nexus-plugin</name>
            <url> http://nexus.goalwisdom.com/nexus/content/groups/public/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </pluginRepository>
   </pluginRepositories>

完成

有时候创建的项目没有这两个依赖库,右键项目,maven->Update Project即可,pom文件标签配置错误也有可能导致maven dependencies消失

修改项目名称为student,并且修改pom文件中name标签中的项目名称。

原文地址:https://www.cnblogs.com/Ebird/p/5940960.html