I have this environment:
- Eclipse Juno OEPE Version: 3.8.0
- Ubuntu VM on Virtualbox running a Weblogic 12c single dev instance
- Maven for build my Java EE application (m2eclipse plugin)
And I can't make this work efficiently.
I added my server in the "Server" view of Eclipse successfully, I can managed to deploy manually my EAR (built by maven) on my Weblogic instance via the console GUI. But I can't manage to remotely deploy my EAR from Eclipse.
When I associate my Eclipse ear project with my remote server and publish, here is what I get in Weblogic logs: The EAR file my-app-ear has no META-INF/application.xml and no modules could be found in it
Of course it cannot find my application.xml file, it's generated by Maven during packaging phase.
Is anyone here using (remote) Weblogic + Eclipse + Maven efficiently ?
Here is a temporary workaround* I found out:
- First, make sure all your Java EE eclipse projects match the proper Facets: if not, under Eclipse, right click on your project / properties / Project Facets: select the EJB for EJB modules, Web Application for WAR modules etc... ( note : if you don't have all the facets listed, you can still edit the Eclipse project file org.eclipse.wst.common.project.facet.core.xml located in +.settings+ folder of your project)
- Once the Facets are correct, right click on your EAR project / Properties / Deployment Assembly, and select the modules you want to integrate with your EAR.
- Now remotely deploy your ear: right click on your server / Add and Remove... / Select your ear and click ok.
Eclipse should now generate the EAR with a generated application.xml and deploy it properly.
Keep in mind this is a temporary solution, as the information of the modules embedded in the EAR are duplicate with the Maven pom.xml.
Still waiting for other users input.
You need to have m2e-wtp installed in addition to m2e to populate project facets and deployment assembly metadata.
To be clear, this isn't a solution supported by Oracle at this time. Both m2e and m2e-wtp are still pretty raw, so your mileage will vary.
You may also want to take a look at the Maven plug-in for Weblogic Server that supports deployment of applications to the server. The following links have more information: