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.
Package Description. Tools for Java developers creating Java EE and Web applications, including a Java IDE, tools for Java EE, JPA, JSF, Mylyn, EGit and others.
I suppose that you've installed all required plugins to the Eclipse already. As @Michał Politowski mentions, M2E, M2E-WTP and so on.
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: -
Catalog file
: http://repo.maven.apache.org/maven2
Description
Maven CentralAdd more remote catalog.
Catalog file
: http://download.java.net/maven/2
Description
Java.NetClick OK
to apply change.
File ---> New ---> Other
.Select Wizard Windows
, select Maven ---> Project
.New Maven Project
.Filter
textbox, enter pom
org.codehaus.mojo.archetypes:pom-root:1.1
New ---> Other
.Select Wizard Windows
, select Maven ---> Project
.New Maven Project
.Parent Project
= MY PARENT
Module name
, e.g. my-ear, my-ejb or my-web. Then click Next
button,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
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.
I would make one small change:
Create the child project
Right click at the parent project and select New ---> Other.
At the Select Wizard Windows, select Maven ---> **Maven Module**
This way it will automatically recognize this as a child project of the parent.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With