Jarret,
Try this:
1. Run 'mvn eclipse:eclipse' from your Common directory.
2. Starting with an empty workspace in Eclipse, setup the M2_REPO
classpath variable.
3. Use the File -> Import -> Existing projects into workspace feature.
Choose the "root" directory of your project (NOT Common, but Common/..),
and all of your Maven modules should show up in the list of projects to
import in the dialog box. Make sure they are all checked, and Next/Close
your way out of the dialog.
You should end up with a workspace that has a separate (but
inter-dependent) Eclipse project for each of your modules (Common.
MidTier, etc.). They should all be setup with proper dependencies and
src and output dirs such that Eclipse will build them (and not show any
compile errors).
I have noticed that 'mvn eclipse:eclipse' doesn't produce a .project
file for non-Java projects. For instance, it might not produce one for
your Common project. In that case, just add that module as a Simple
Project in Eclipse, and commit the resulting .project file into your
source control (so other team members don't have to suffer this step).
-Max
Jarret R wrote:
All,
I hope this question hasn't been asked a million times already, but I
have been playing around with this issue for quite a while now and I
think it is time to ask for some professional help. I am working on
setting up an enterprise Java application. I am trying to get a basic
project structure set up for use, but I am running into difficulties.
My desired project structure is below. Each top level directory is an
Eclipse project. Common contains the top level pom.xml and the
dependencies are pretty easy to work out, or I can include them if
necessary.
Common/
MidTier/
Domain/
Web/
Plugin/
Following the directions here:
http://maven.apache.org/guides/mini/guide-ide-eclipse.html
Gets me one project with multiple subdirectories. It all builds find
in Maven, but Eclipse won't build the project at all. I assume it
doesn't recognize the directories under src/main/java as containing
Java source.
Is there a good guide for getting Maven set up under Eclipse utilizing
Eclipse's inline building? I can't seem to get a sane build that works
in Maven and Eclipse, just one or the other.
Thanks,
Jarret R
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]