用google才收到了这个。。

http://stackoverflow.com/questions/12197662/maven-java-web-project-not-recognised-when-importing-into-eclipse

就是导入后  是普通的java项目,然后在   project factes  勾上Dynamic Web Module 选3.0   apply  就行了

貌似要FQ才能看  直接发把

A colleague is trying to import a Java web project project into his Eclipse workspace. He's installed the m2e plugin and it recognises the "parent" project and the 3 sub projects it has (which are also Maven projects). However when the projects are imported,
Eclipse doesn't seem to recognise them as Java projects (it doesn't show the usual "Java Resources" and "Deployment Descriptor"). The only two things that appear in the Project Explorer are shown below:

I've imported the same project using my version of Eclipse and it recognises that the project is a Java web project without any issues. Is there something he needs to do/install to get it to work? He has the Eclipse WTP as well as the m2e plugin, so I can't
see any different between his Eclipse installation and mine.

asked Aug 30 '12 at 13:11
Closeratio

190312
 
 
as far as I know it is correct, as the main deployment descriptor would be inside src>main>webapp>web-inf –  Dhruvenkumar
Shah
 Aug
30 '12 at 13:23
 
@DhruvenkumarShah This is inside Eclipse's Project Explorer though, so there should be other items present such as "Deployed
Resources" and "Javascript Resources" (among others) –  Closeratio Aug
30 '12 at 15:33
 
 
How does your colleague import the project? It should be imported as an existing maven project (File -> Import -> Maven
-> Existing Maven Projects). –  yorkw Aug
30 '12 at 21:39
1  
Just like that. It's strange because it detects the projects without any issues, but after importing them it doesn't
seem to recognise that they're Java projects. –  Closeratio Aug
31 '12 at 9:47

4 Answers

As it turns out, we needed to enable project facets in the project properties. I'm not sure why this wasn't enabled by default like it was when it was imported into my Eclipse installation, but enabling the appropriate project facets fixed the issues we were
having.

answered Aug 31 '12 at 13:11
Closeratio

190312
 

You need to install m2eclipse-wtp 0.15.x (fromhttp://download.jboss.org/jbosstools/updates/m2eclipse-wtp/).
It contains the necessary configurators to properly set the required project facets of Java EE projects, according to your pom.xml configuration.

Please note that m2eclipse-wtp is moving to the Eclipse foundation and is superceded by m2e-wtp.
m2e-wtp 0.16.0 will be released on sept 28th 2012. Until then you can try playing with the latestrelease
candidate

answered Sep 14 '12 at 15:41
Fred Bricon

2,216719
 

Try selecting the project in the Package Explorer and performing Maven --> Update Project Configuration

answered Aug 30 '12 at 13:20
Chris Gerken

9,32651535
 

I experienced something like this once when I was using the "project explorer" view when I thought I was actually using the "package explorer" view. These two views will display your project differently.

answered Aug 30 '12 at 18:47
herrtim

1,031516


 

版权声明:本文为博主原创文章,未经博主允许不得转载。

myeclipse 导入 import maven web project的更多相关文章

  1. spring boot:创建一个简单的web(maven web project)

    1.新建一个maven web project; 2.在pom.xml文件中添加相应的依赖包: 3.新建一个HelloController请求控制类: 4.编写index.jsp页面: 5.编写启动类 ...

  2. maven web project打包为war包,目录结构的变化

    一个maven web project工程目录: 资源管理器中的目录层级如下: 导出为war包之后的目录层级为: 我们会发现,其实并没有如下的这些目录层级: 所以这两个目录层级只是IDE为我们添加的, ...

  3. 创建一个maven web project

    几经周折总算是找到了和高杨学长一样的web  project的方法.感谢学长的一语点醒.我之前以为,既是maven又是web project的项目得要是通过dynamic web project转换到 ...

  4. MyEclipse Web Project导入Eclipse Dynamic Web Project,无法部署到tomcat问 题

    做作业遇到一个小问题,将MyEclipse Web Project导入到Eclipse中开发.在部署到tomcat时,发现无法发布这个项目. 问题分析: MyEclipse Web Project被识 ...

  5. myeclipse下构建maven web项目

    首先创建一个Maven的Project如下图 我们勾选上Create a simple project (不使用骨架) 这里的Packing 选择 war的形式 由于packing是war包,那么下面 ...

  6. myeclipse 2014新建maven web 项目步骤

    首先在myeclipse中配置maven的安装路径: 在pom.xml中加上: 1 2 3 4 5 6 7 8 9 10  <plugins>           <plugin&g ...

  7. Maven Web Project设置Webcontent路径

    1,新建maven-archetype-webapp 2,右键项目-->Properties-->选中Project Facets中的Runtimes标签,然后Java版本改为1.8,Dy ...

  8. MyEclipse - 问题集 - maven update project 后,项目jdk的版本变化

    解决方法: 进入maven安装根目录,conf/settings.xml <profiles> <profile> <id>jdk-1.7</id> & ...

  9. myeclipse eclipse创建maven web项目时 index.jsp报错

    第一种办法 解决办法: ---------------------------------------------------------------------------------------- ...

随机推荐

  1. awk练习笔记

    题目数据如下: Mike Harrington:(510) 548-1278:250:100:175 Christian Dobbins:(408) 538-2358:155:90:201Susan ...

  2. lightbox用法

    示例代码: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF ...

  3. 用windows或ubuntu访问apfs或mac分区

    MacBook读写不了NTFS,Windows也读写不了APFS和Mac OS 扩展分区,Ubuntu又用的是ext4分区,有时候想用U盘传点东西真的费劲.著名公司Paragon Software开发 ...

  4. 十七、S3C2440 音频解码芯片WM8976声卡驱动移植、madplay测试

    学习目标:1. WM9876接口和工作原理:2. WM9876驱动移植:3. WM9876应用测试:4. 问题总结 1. WM9876接口和工作原理  本节使用了JZ2440开发板移植WM9876驱动 ...

  5. HTTP协议图

  6. C语言学习记录_2019.02.12

    "学计算机一定要有一个非常强大的心理状态,计算机不是黑魔法,都是人想出来的,别人能够想的出来,那么,总有一天,我也能够想的出来." 指针类型的变量就是保存地址的变量. int* p ...

  7. 20155318 2016-2017-2 《Java程序设计》第七学习总结

    20155318 2016-2017-2 <Java程序设计>第七学习总结 教材学习内容总结 学习目标 了解Lambda语法 了解方法引用 了解Fucntional与Stream API ...

  8. Deep Learning综述[上]

    Deep-Learning-Papers-Reading-Roadmap: [1] LeCun, Yann, Yoshua Bengio, and Geoffrey Hinton. "Dee ...

  9. 【SHOI2016】黑暗前的幻想乡

    题面 题解 如果没有建筑公司的限制,那么就是个\(\mathrm{Matrix\;tree}\)板子 其实有了也一样 发现\(n\leq 17\),考虑容斥 每次钦定一些建筑公司,计算它们包含的边的生 ...

  10. 「PKUSC2018」最大前缀和

    题面 题解 可以想到枚举成为最大前缀和的一部分的数 设\(sum_i=\sum\limits_{j\in i}a[j]\) 设\(f_i\)表示满足\(i\)的最大前缀和等于\(sum_i\)的方案数 ...