Brian Smith schrieb:
Actually, I did select the "Copy projects into Workspace" checkbox so that
may be the source of my problem.

I've been experimenting a little bit and it seems that if I create the whole
directory structure in C:\temp (c:\temp\TestApp) and then do the imports,
everything seems to work as expected.  If I go ahead and check in one of the
submodules (say testcommon), and then delete the directory from disk and
check out of the repository, the code is in my workspace as opposed to
c:\temp\TestApp.  In a team environment, this still seems pretty ugly.  It
appears that you have to jump through quite a few hoops to get this to work.
If you have a multi-module project beeing organized in a hierarchical way you'll have to checkin the top level directory (e.g. the TestApp) and not the submodules. Then checkout the whole project out of the repository, create the project files (mvn eclipse:eclipse) and import the projects. If you're looking for a easier "eclipse-way" of working with maven, have a look at the M2Eclipse plugin at:
http://m2eclipse.codehaus.org/
This plugin will manage your project inside eclipse including all dependencies. Using this plugin all submodules won't be seperate projects. Instead all modules will be appear as source-folders inside your parent project.
e.g.

TestApp [Eclipse Project]
  + testcommon/src/main/java
  + testcommon/src/main/resources
  + testcommon/src/test/java
  + testcommon/src/test/resources
  + testejb/src/main/java
  + testejb/src/main/resources
  + testejb/src/test/java
  + testejb/src/test/resources
  + testear/src/main/java
  + testear/src/main/resources
  + testear/src/test/java
  + testear/src/test/resources

Could you explain more about how you can import the top level project into
eclipse?  I was able to see the top level pom but it also  had the sub
modules as well.
This is how it is expected to be. Eclipse is only representing the file structure beeing on the disk.


On 9/4/07, Francois Fernandes <[EMAIL PROTECTED]> wrote:
One little Note about the importing of the projects: Ensure that "Copy
projects into workspace" is deselected.
Event the top level project can be imported into eclipse. To do this you
generate the project files of the submodules and import them. Then
create a new Project (not Java, a General Project) with exactly the name
of your Top-Level Module (In your application: TestApp). Eclipse will
not overwrite the directory. Instead it will discover the contents.
Inside this project executing mvn install will be possible.

Graham Leggett schrieb:
On Tue, September 4, 2007 7:12 pm, Brian Smith wrote:

First thing I noticed (and I think this is what you mentioned) is that
the
top level directory is not there.  Because of this, I can't run Maven
(mvn
install) because the parent pom is not available.
Why is the top level directory not there?

One thing to make sure you do - check out the whole project using your
source control tool of choice, then run mvn eclipse:eclipse from the
root
of your project, then import your projects into eclipse by selecting the
root of your project and importing all the projects eclipse finds.

  Directory Structure                  Eclipse
  ===================                  =======
      TestApp                             + testcommon
        + testcommon                      + testejb
        + testejb                         + testear
        + testear
This is exactly what we have, and mvn install runs fine.

Can you explain in more detail the exact steps you are trying to
perform?
Regards,
Graham
--



---------------------------------------------------------------------
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]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to