myeclipse 2014新建maven web 项目步骤
2017-01-27 20:22
417 查看
首先在myeclipse中配置maven的安装路径:
新建web项目:
pom.xml文件报错解决办法:
在pom.xml中加上:
[html] view plain copy print?<plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin</artifactId> <version>2.6</version> <configuration> <encoding>utf-8</encoding> </configuration> </plugin> </plugins>
如果项目结构没有Maven Dependencies
需要在项目根路径下的.classpath文件里加上
[html] view plain copy print?<classpathentry kind=“con” path=“org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER”>
<attributes>
<attribute name=“maven.pomderived” value=“true”/>
<attribute name=“org.eclipse.jst.component.dependency” value=“/WEB-INF/lib”/>
</attributes>
</classpathentry>
如果项目启动时报maven与jdk版本不对应,需要添加一行代码:
MAVEN_HOME是你在环境变量里配置的maven安装路径
[html] view plain copy print?-Dmaven.multiModuleProjectDirectory=MAVEN_HOME </span></span></li></ol><div class="save_code tracking-ad" data-mod="popu_249" style="display: none;"><a href="javascript:;" target="_blank"><img src="http://static.blog.csdn.net/images/save_snippets_01.png"></a></div></div><pre name="code" class="html" style="display: none;">-Dmaven.multiModuleProjectDirectory=MAVEN_HOME
本人搭建的maven web项目,框架用spring springMVC mybatis,架包都是最新的,已经上传,需要的可以下载
新建web项目:
pom.xml文件报错解决办法:
在pom.xml中加上:
[html] view plain copy print?<plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin</artifactId> <version>2.6</version> <configuration> <encoding>utf-8</encoding> </configuration> </plugin> </plugins>
<plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin</artifactId> <version>2.6</version> <configuration> <encoding>utf-8</encoding> </configuration> </plugin> </plugins>
如果项目结构没有Maven Dependencies
需要在项目根路径下的.classpath文件里加上
[html] view plain copy print?<classpathentry kind=“con” path=“org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER”>
<attributes>
<attribute name=“maven.pomderived” value=“true”/>
<attribute name=“org.eclipse.jst.component.dependency” value=“/WEB-INF/lib”/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"> <attributes> <attribute name="maven.pomderived" value="true"/> <attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/> </attributes> </classpathentry>
如果项目启动时报maven与jdk版本不对应,需要添加一行代码:
MAVEN_HOME是你在环境变量里配置的maven安装路径
[html] view plain copy print?-Dmaven.multiModuleProjectDirectory=MAVEN_HOME </span></span></li></ol><div class="save_code tracking-ad" data-mod="popu_249" style="display: none;"><a href="javascript:;" target="_blank"><img src="http://static.blog.csdn.net/images/save_snippets_01.png"></a></div></div><pre name="code" class="html" style="display: none;">-Dmaven.multiModuleProjectDirectory=MAVEN_HOME
本人搭建的maven web项目,框架用spring springMVC mybatis,架包都是最新的,已经上传,需要的可以下载
相关文章推荐
- MyEclipse2014 新建Maven Web 项目步骤
- MyEclipse2014 新建Maven Web 项目步骤
- MyEclipse2014 新建Maven Web 项目步骤
- MyEclipse2014 新建Maven Web 项目步骤
- MyEclipse2014 新建Maven Web 项目步骤
- MyEclipse2014 新建Maven Web 项目步骤
- MyEclipse2014 新建Maven Web 项目步骤
- MyEclipse2014 新建Maven Web 项目步骤
- MyEclipse2014 新建Maven Web 项目步骤
- myeclipse 2014新建maven web 项目步骤
- myeclipse 2014新建maven web 项目步骤
- myeclipse 2014新建maven web 项目步骤
- MyEclipse2014 新建Maven Web 项目步骤
- MyEclipse2014 新建Maven Web 项目步骤
- MyEclipse2014 新建Maven Web 项目步骤
- MyEclipse2014 新建Maven Web 项目步骤
- MyEclipse2014 新建Maven Web 项目步骤
- myeclipse 2014新建maven web 项目步骤
- 图文详解MyEclipse中新建Maven webapp项目的步骤(很详细)
- 图文详解MyEclipse中新建Maven webapp项目的步骤(很详细)