eclipse java ee 配置,如何在Eclipse中配置Java EE maven项目?

I know Maven pretty well, but I usually work with Netbeans, which makes it quite easy to deploy Java EE applications - and handle hot deployment of any changes.

The team I work with now uses Eclipse as their IDE of choice, but none of them has worked with Maven projects before; so I need to know how to correctly add Eclipse's project facets to the maven projects we have, in order to support (hot) deployment through WTP. We are using Weblogic 12c for this particular endeavour.

Our project layout is as simple as it gets:

super-project (pom)

project-ear (pom)

project-ejb (pom)

project-web (pom)

Thanks for any resource you can point me to.

解决方案

I suppose that you've installed all required plugins to the Eclipse already. As @Michał Politowski mentions, M2E, M2E-WTP and so on.

Add Archetype Catalog

Go to menu Window--->Preferences.

At the Preferences window, select Maven---->Archetypes,

On the Right Panel, click Add Remote Catalog... button.

At the Remote Archetype Catalog windows enter the following: -

Description Maven Central

Add more remote catalog.

Description Java.Net

Click OK to apply change.

Create the parent project

Go to menu File ---> New ---> Other.

At the Select Wizard Windows, select Maven ---> Project.

Click next and enter the required information so that we are at the New Maven Project.

At the Filter textbox, enter pom

Choose org.codehaus.mojo.archetypes:pom-root:1.1

Click next and enter the required information so that the parent creation is finished.

Create the child project

Right click at the parent project and select New ---> Other.

At the Select Wizard Windows, select Maven ---> Project.

Click next and enter the required information so that we are at the New Maven Project.

You will see that the Parent Project = MY PARENT

Enter the Module name, e.g. my-ear, my-ejb or my-web. Then click Next button,

At the Filter textbox, enter some of the following

org.codehaus.mojo.archetypes:webapp-javaee6:1.5

org.codehaus.mojo.archetypes:ejb-javaee6:1.5

org.codehaus.mojo.archetypes:ear-javaee6:1.5

Click next and enter the required information so that the child creation is finished.

Summary

I've used both NetBeans 7.x and Eclipse Juno together. When I move to Eclipse I've face the issue as same as your. Then I've captured the steps above from NetBeans logs one by one, and do the same thing manually by using Eclipse.

I hope this may help.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值