【发布时间】:2012-11-05 02:37:35
【问题描述】:
过去 90 小时以来,我一直在尝试了解如何在我的 Web 项目中使用 Maven,生成一个 war 文件并将其部署到我的 JBoss 4.2 服务器中。
我没有得到。 我正在阅读各种博客,几乎一直在谷歌搜索,尝试各种使用 maven 构建动态 Web 项目的方法,但尝试不同的方法会使简单的事情变得更复杂。
很少有例子告诉我如何运行,很少有人告诉我改变文件夹结构,很少有人告诉我传输网页内容的内容,但没有什么符合我的要求。在某些示例中,生成了 war 文件,但名称有些大,并且它不包含里面的 jars。呜呜呜。
我知道 maven 很简单,可以让我们的生活更美好,但第一次学习它会变得很复杂。
我的要求很简单。
1) Build a Dynamic web project in eclipse indigo. (Preferably in JAVA perspective )
2) Enable Maven dependencies, in eclipse.
3) Update pom.xml to add dependencies.
4) Finish the web application i want to do by writing classes, html pages, deployment descriptors.
5) Build the war file using maven "IN ECLIPSE ONLY". (the WAR file must have user specific name and not some name like "V1- Snapshot dash dash dash")
6) Deploy my war file in jboss 4.2 server deployment location. (Preferably from eclipse )
7) Run my localhost server and my application from the browser.
完成了。
通过花时间在上面,我了解了 maven 是多么美丽,但我无法实现我想要的。
请帮我详细说明如何使用 maven 来满足我的上述要求。
【问题讨论】:
标签: eclipse jakarta-ee maven maven-3 m2eclipse