• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

javaee: eclipse + maven

 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello! I got a problem. We are currently starting a new javaee project (war + ejb, so we package it as an ear module). We want to use eclipse as an IDE and Maven as a build tool. We also want to use eclipse automatic build and deploy as it is very useful for development. The problem is that I haven't managed to use 'automatic build and deploy' feature, as maven and eclipse use different project layouts (I had an error when tried to deploy ear module to server (JBoss AS 4.2)). We've already used maven with eclipse for a web project (war module), and want to use same tools for this new project. So my question is: is it possible to adjust eclipse so that we could make builds with maven and still use automatic build and deploy. I've tried 'mvn eclipse:eclipse -Dwtpversion=1.5' but it seems it didn't solve the problem. Please help!
 
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Actually, one of the nice things about Eclipse is that it doesn't force you to use a specific project layout. The only thing different about Eclipse projects is that it adds 2 files: .project and .classpath, which define the project characteristics and the Java build classpath (assuming a Java project).

The Maven eclipse goal will use the POM as a reference point to build the .project and .classpath files ("Mavenize" the project). That's all it does. There's a similar goal for IntelliJ support.

For best results, you should have a Maven plug-in installed in Eclipse. If you are using the default Eclipse automatic rebuild feature, you could be having trouble where Eclipse rebuilds all or part of the output folders without being properly aware of Maven's use of those folders.
 
Denis Zjukow
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your explanation, Tim. Could you please tell me what particular Maven plugin you install?
 
Denis Zjukow
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Actually, I found what was my problem with EJB project (Eclipse threw an IndexOutOfBoundsException after I tried to deploy my EAR module containing an EJB module). As a matter of fact, I generate project settings using Maven Eclipse Plugin. It turned out, there is an open issue (MECLIPSE-196) in Maven 2 Plugin JIRA. However, the defect is not fixed yet. There is some mysterious workaround, unfortunately, I am not an expert in Eclipse development, so I haven't managed to apply the described solution on my machine. If anyone faced this problem and found a way to solve it, please share your knowledge. Any information about this problem is highly appreciated. Thanks...
[ June 24, 2008: Message edited by: Denis Zjukow ]
 
I AM MIGHTY! Especially when I hold this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic