On Fri, 30 Sep 2005 [EMAIL PROTECTED] wrote:

> I think we are having a problem with terminology... Especially when
> talking about a "module"
> Comments and questions are embedded.

Yeah - too much terminology from different contexts come clashing together
:)

> > > Is the following hypothesis correct?
> > >
> > > - Setup the recommended M2 structure for multiple modules.
>
> As specified before, the recommended structure is:
>
>  +- pom.xml
>  +- my-app
>  | +- pom.xml
>  +- my-webapp
>  | +- pom.xml
>

Yup.

> The next two answers from Kenny are the confusing and apparently
> conflicting part that need more clarification.
>
> >
> > > - Check in the entire tree as a single SCM module.
> >
> > Correct. You can also use different scm repositories for each module if
> > you want, as long as you specify the scm repository in the pom for that
> > module.
> >
>
> Kenny answers that it is correct that you can check in the entire tree as
> a single SCM Module.  This seems to conflict with what Kenny says next.

Correct, you can check in the entire project tree as a single SCM Module
(CVS uses that term; in subversion it would be a 'sub-tree in a
repository' i guess).

> > > - To work on an individual module: Check out the subsection of
> thestructure

module = a project (and subprojects), i.e. my-app + subdirs, as I
understand this.

> > > that holds the module and Eclipse project for that module.
>
> > never check in eclipse projects! Generate them. If you work on a
> > subsection of the structure, you don't have project references to other
> > sections. If you were to check in eclipse project files you would have
> to
> > decide beforehand wheter to use project references or not (in this last
> > case you would have to run m2 eclipse:eclipse for each module
> seperately).
>
> Kenny says to "never checkin eclipse projects"... Well then, if you never

What i meant was 'never check in eclipse project files'
(.project/.classpath/.settings etc..).

> check in eclipse projects, then you are not checking in the entire tree as
> a single SCM Module.  This is confusing.  Wouldn't you need to check in
> the eclipse project to get the master POM (the top level POM) into SCM?

eclipse is a way of looking at/working with a maven project. I merely
meant the eclipse-aspect of the project, since it can be generated, and
it depends on what part of the project tree is checked out what the
contents of the eclipse project files are.

> So... for clarification...to be as specific as possible
>
> Given this structure in SCM
>
> MyProject
>  +- pom.xml (master POM)
>  +- my-app
>  | +- pom.xml
>  +- my-webapp
>  | +- pom.xml


Ok, the above is the SCM structure.

> Within Eclipse wouldn't I right click on the "MyProject" project and

This SCM project structure is impossible to have in eclipse,
unless you have one single project in your workspace named 'MyProject',
containing 'pom.xml', 'my-app/' and 'my-webapp/' subdirectories.
You'd have to manually add all the source paths and merge dependencies
from all maven2 sub-projects (pom files). I didn't recommend this,
so I didn't mention it.

> choose Team-->Commit
> If not, then please clarify.

Hm.. interesting problem. You can only do that if you 'share project'
first, in which case you'd have to manually enter an SCM Url. If we
take the structure above, with 1 project in eclipse, then the eclipse
project structure == the scm project structure.

There's currently no support to write SCM settings in the .project files,
we assume the project being in SCM already and rely on eclipse detecting
CVS and .svn directories.

If there is a split-up (one eclipse project for each pom file), i'm not
sure how you'd approach this - probably manually entering an SCM url for
each project.

But I wouldn't know - I hate GUI's (RSI and all). I usually just
create a repository on the commandline, check out revision 0, and 'import'
that directory into eclipse. Then eclipse takes care of marking new files
(pom.xml etc). But i actually first setup the project structure on the
commandline, create some sourcefiles and then later on I import the
projects in eclipse. I always commit on the commandline since the eclipse
SCM plugins are usually buggy (especially for SVN).

-- Kenney

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

Reply via email to