这种情况通常出现在 我们新加载了一个 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标识的解决方法的更多相关文章

  1. maven项目project facets中是2.3调整为3.0的解决办法

    以前情况下直接直接调整到3.0下面的按钮就会变成不可以点,当把前面的勾取掉就可以点击apply了,之后再次把勾勾上,点击apply有个弹窗默认是webcontent.在maven项目中改成src/ma ...

  2. 如何将maven项目导入myeclipse中

    在mvn的项目中 pom.xml 文件所在目录, 运行 mvn eclipse:clean eclipse:eclipse ,会自动将mvn工程转成eclipse工程, 然后在eclipse中 &qu ...

  3. 使用idea搭建maven项目时 java目录下的xml文件没有加载的解决方法

    今天在idea集成开发环境下 使用maven搭建了ssm项目,遇到了3个问题 首先我们先复习一下知识点: 第一步:在web.xml中配置spring监听器 <!-- spring监听器 加载sp ...

  4. Maven项目- get请求的乱码问题,使用tamcat7出现乱码的解决方法

    get请求的乱码问题: 解决方法: 手动处理编码

  5. 项目在vs中打开后识别不出来ashx页面的解决方法

    在web.config配置文件中指定页面版本 <add key="webPages:Version" value="2.0"/> <?xml ...

  6. 3.发布Maven项目到nexus中

    1.在pom.xml文件中配置需要发布的工厂 如果想把项目发布到nexus中,需要在pom.xml中配置releases和snapshots版本发布的具体repository <distribu ...

  7. MyEclipse如何安装egi插件及如何将github项目引入MyEclipse中

    一.如何查看MyEclipse版本及Eclipse版本号 查看MyEclipse版本号:MyEclipse主界面的菜单栏的最左边“help”—>选择“About MyEclipse Enterp ...

  8. maven打war包注意之xml、properties文件没打进去解决方法

    maven项目在ide中编译出的war包一般不会有很多问题. 但是经过集成环境打war包会出现war包中打不进xml.properties等文件.这样打war包不会报错,但是war包放进tomcat中 ...

  9. 关于真机调试DDMS中的data文件夹打不开的解决方法

    关于真机调试DDMS中的data文件夹打不开的解决方法 今天在开发的时候需要导出程序中的数据库文件查看数据,数据库文件默认就在/data/data/应用包名/databases/数据库名 这个路径下, ...

随机推荐

  1. lightoj1066【BFS】

    题意: 就是按照A->B->C->D....去拿,求步数: 思路: 有一个注意点:如果碰到合法字母吃掉,再以后的某次可以重新到改点: BFS的因为标记而减少了重复位置的到达,但是按照 ...

  2. LVS-DR VIP和RIP不同网段的配置方法

    http://blog.itpub.net/25723371/viewspace-1446935/

  3. C 语言实例 - 字符转 ASCII 码

    C 语言实例 - 字符转 ASCII 码 C 语言实例 C 语言实例 ASCII 定义了 个字符. 分类: 一:-.(删除键)是控制字符 二:空白字符:空格(). 制表符. 垂直制表符. 换行. 回车 ...

  4. bzoj3196:Tyvj1730二逼平衡树

    传送门 暴力啊,直接树套树上啊 线段树套splay,卡卡常就直接A了 代码: #include<cstdio> #include<iostream> #include<a ...

  5. E. XOR and Favorite Number (莫队板子题)

    题目链接 #include <bits/stdc++.h> using namespace std; typedef long long ll; inline int read() { , ...

  6. [題解]51nod_1515_明辨是非

    好久沒有話多了,是覺得有點浪費時間,今天考試和一中用的一樣的題,結果反而考得不好,不過Jackpei一句知恥而後勇點醒夢中人偷偷@Jackpei 就是這樣吧 還有我極度懷疑我的鍵帽打油了......我 ...

  7. Codeforces 1137B(kmp next数组构造)

    为了物尽其用,Next求出最多有哪部分能重复使用,然后重复使用就行了-- const int maxn = 5e5 + 5; char s[maxn], t[maxn]; int cnts0, cnt ...

  8. C. Functions again DP + 分类讨论

    http://codeforces.com/contest/789/problem/C 首先按题目要求处理出dis数组. 那么对于任意一个区间,[L, R],是dis[L] - dis[L + 1] ...

  9. H5 之 Page Visibility

    这个是今天刚发现的,想起之前那个在页面用video标签视频播放,别人切换页面后仍在继续播放,体验很不好,用这个API就可以很完美的解决. Page Visibility API 可以让你获取到这种状态 ...

  10. postgresql 存储过程动态更新数据

    -- 目标:动态更新表中数据 -- 老规矩上代码-----------------------------tablename 表名--feildname 字段名数组--feildvalue 字段值数组 ...