0

I'm new to maven, and I am in the process of migrating all my eclipse projects to m2e projects. I'm having these three usage questions:

1) Currently, I've two standalone java projects that are being referenced by two different web projects. At first, I was thinking about creating those two standalone java projects as maven modules. But my understanding is that a module can only have one parent project. So, how can they be referenced in two different web projects? Would this means that I would have to create these two java projects as maven project?

2) I also have an eclipse EJB 2.1 project that I want to move to maven. The EJB runs in a server where several different applications are accessing it, including the two web projects mentioned above. Should I create this EJB project as maven project? If it is created as project, what is the proper way for those two web projects to reference it?

3) Is there a standard maven archetype for EJB2.1 project?

Thanks

HockChai Lim
  • 1,675
  • 2
  • 20
  • 30
  • possible duplicate of [Maven "Module" vs "Project" (Eclipse, m2eclipse plugin)](http://stackoverflow.com/questions/2890341/maven-module-vs-project-eclipse-m2eclipse-plugin) –  Jun 09 '15 at 19:02
  • @Jarrod Roberson. Yes, I saw that post when researching it. It only explain what the diff between the two. It does not give answer on my question on #1. I need to create a module that referenced by two different web applications. – HockChai Lim Jun 09 '15 at 20:27

1 Answers1

1

First, there is nothing like an "m2e project". m2e is an Eclipse plugin that supports working with Maven projects.

Re 1) You're right. A project/module can have one parent only. But, assuming that "java projects that are being referenced by two different web projects" means that the web projects depend on the Java projects:

... are different things.

See also POM Reference, POM_Relationships.

Gerold Broser
  • 14,080
  • 5
  • 48
  • 107
  • @ Gerold. Finally got a chance to read those links you provided. I've a better understanding of how maven work now. Complicated but will give it a try. Thank you for your help. – HockChai Lim Jun 10 '15 at 19:03