如何在Eclipse中使用Maven启动一个新的Web应用程序? [英] How to start a new web app project in Eclipse with Maven?

查看:153
本文介绍了如何在Eclipse中使用Maven启动一个新的Web应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正试图用Maven在Eclipse中开始一个新的项目。它是一个将具有EJB / JPA和JSF技术的项目。我使用webapp原型创建项目。是否正确使用?我需要在构建路径上添加一些库吗? (部署到Glassfish)

解决方案

maven-archetype-webapp 完全可以用来开始使用。它很好地创建了初始文件夹结构。另一个好的选择是使用 appfuse-basic-jsf



只要您的pom.xml具有正确设置的所有依赖项,您的eclipse构建路径应该是正常的。我假设你已经安装了 m2eclipse 插件。如果您看到您在eclipse视图中看到错误,请右键单击项目选择 Maven->更新项目配置


I am trying to start a new project in Eclipse with Maven. It is a project that will have both EJB/JPA and JSF technology. I used the webapp archetype create the project. Is correct to use that? And do I need to add some libraries on the buildpath? (Deploying to Glassfish)

解决方案

The maven-archetype-webapp is perfectly fine to use to get started. It creates the initial folder structure nicely. Another good alternative is to use appfuse-basic-jsf.

As long as your pom.xml has all the dependencies set up correctly, your eclipse build path should be fine. I am assuming you already have m2eclipse plugin installed. If you see that you are seeing errors in eclipse view then right click on the project select Maven->Update Project Configuration.

这篇关于如何在Eclipse中使用Maven启动一个新的Web应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆