maven项目在myeclipse中不出现Maven Dependencies 和maven标识的解决方法
这种情况通常出现在 我们新加载了一个 maven的项目,但是myeclipse没识别到。
或者说 我们把该项目修改成了maven项目--------也就是说该项目 有了pom.xml 但是还没有maven Dependencies而且也不能使用maven插件对它进行操作
原因
myeclipse未识别到该项目是maven项目
修改项目的.classpath文件,将以下代码贴上
<classpath>
<classpathentry including="**/*.java" kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</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>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
修改项目的.project文件
<buildCommand>
<name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.common.project.facet.core.builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.validation.validationbuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
</natures>
添加成功后,refresh一下项目,然后会生成一些项目中不需要的文件信息,将这些文件信息删除即可
maven项目在myeclipse中不出现Maven Dependencies 和maven标识的解决方法的更多相关文章
- maven项目project facets中是2.3调整为3.0的解决办法
以前情况下直接直接调整到3.0下面的按钮就会变成不可以点,当把前面的勾取掉就可以点击apply了,之后再次把勾勾上,点击apply有个弹窗默认是webcontent.在maven项目中改成src/ma ...
- 如何将maven项目导入myeclipse中
在mvn的项目中 pom.xml 文件所在目录, 运行 mvn eclipse:clean eclipse:eclipse ,会自动将mvn工程转成eclipse工程, 然后在eclipse中 &qu ...
- 使用idea搭建maven项目时 java目录下的xml文件没有加载的解决方法
今天在idea集成开发环境下 使用maven搭建了ssm项目,遇到了3个问题 首先我们先复习一下知识点: 第一步:在web.xml中配置spring监听器 <!-- spring监听器 加载sp ...
- Maven项目- get请求的乱码问题,使用tamcat7出现乱码的解决方法
get请求的乱码问题: 解决方法: 手动处理编码
- 项目在vs中打开后识别不出来ashx页面的解决方法
在web.config配置文件中指定页面版本 <add key="webPages:Version" value="2.0"/> <?xml ...
- 3.发布Maven项目到nexus中
1.在pom.xml文件中配置需要发布的工厂 如果想把项目发布到nexus中,需要在pom.xml中配置releases和snapshots版本发布的具体repository <distribu ...
- MyEclipse如何安装egi插件及如何将github项目引入MyEclipse中
一.如何查看MyEclipse版本及Eclipse版本号 查看MyEclipse版本号:MyEclipse主界面的菜单栏的最左边“help”—>选择“About MyEclipse Enterp ...
- maven打war包注意之xml、properties文件没打进去解决方法
maven项目在ide中编译出的war包一般不会有很多问题. 但是经过集成环境打war包会出现war包中打不进xml.properties等文件.这样打war包不会报错,但是war包放进tomcat中 ...
- 关于真机调试DDMS中的data文件夹打不开的解决方法
关于真机调试DDMS中的data文件夹打不开的解决方法 今天在开发的时候需要导出程序中的数据库文件查看数据,数据库文件默认就在/data/data/应用包名/databases/数据库名 这个路径下, ...
随机推荐
- 《剑指offer》面试题13—O(1)时间删除链表结点
题目:给定单向链表的头指针和某结点指针,实现函数在O(1)时间内删除指定节点. 思路:由于没有要删除结点(j结点)的前一个结点(i结点)指针,通常想法是从头开始遍历找到指定结点的前一个结点(i结点), ...
- Spring Boot 学习系列(07)—properties文件读取
此文已由作者易国强授权网易云社区发布. 欢迎访问网易云社区,了解更多网易技术产品运营经验. 传统的properties读取方式 一般的,我们都可以自定义一个xxx.properties文件,然后在工程 ...
- TP5之使用layui分页样式
1.首先你得引入layui文件吧 2.在 application\config.php 中配置,像这样,,, 3.controller中这样写 $data = Db::table($table) -& ...
- 347. Top K Frequent Elements (sort map)
Given a non-empty array of integers, return the k most frequent elements. Example 1: Input: nums = [ ...
- grunt和seajs入门之--提取依赖、合并、压缩js文件
一.安装grunt: npm install -g grunt-cli //安装 npm install grunt –save-dev //安装Grunt最新版本到项目目录中,并将其添加到devDe ...
- bzoj 3996: [TJOI2015]线性代数【最小割】
把转置矩阵看成逆矩阵吓傻了233 首先按照矩乘推一下式子: \[ D=\sum_{i=1}^n a[i]*(\sum_{j=1}^n a[j]*b[j][i])-c[i] \] \[ D=(\sum_ ...
- SpringBoot2.0基础案例(01):环境搭建和RestFul风格接口
一.SpringBoot 框架的特点 1.SpringBoot2.0 特点 1)SpringBoot继承了Spring优秀的基因,上手难度小 2)简化配置,提供各种默认配置来简化项目配置 3)内嵌式容 ...
- java string(转)
初探Java字符串 优化变成了忧患:String.split引发的“内存泄露” String是java中的无处不在的类,使用也很简单.初学java,就已经有字符串是不可变的盖棺定论,解释通常是:它是f ...
- Cordova/Cordova.h file not found的解决方法
参考http://stackoverflow.com/questions/10714600/cdvplugin-h-file-not-found-in-cordova-as-component-cle ...
- hdu 6299 Balanced Sequence( 2018 Multi-University Training Contest 1 )
#include <stdio.h> #include <iostream> #include <cstdlib> #include <cmath> # ...