You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Eric Kolotyluk <er...@gmail.com> on 2011/04/19 00:47:29 UTC

Arranging Modules on the File System

I apologize if this is a newbie question, but I'm looking for a quick 
answer...

I'm using Sonatype Maven plug-in for Eclipse and I have set up a project 
with several modules. The way the plug-in arranged them on the file 
system is:

eclipse-workspace/parent-project/.project
eclipse-workspace/parent-project/pom.xml
eclipse-workspace/parent-project/sub-project-1/.project
eclipse-workspace/parent-project/sub-project-1/pom.xml
eclipse-workspace/parent-project/sub-project-2/.project
eclipse-workspace/parent-project/sub-project-2/pom.xml
eclipse-workspace/parent-project/sub-project-3/.project
eclipse-workspace/parent-project/sub-project-3/pom.xml

The problem is that the IBM Rational Team Concert source control I am 
using chokes when I try to share and check in the parent-project because 
of the nesting. The sub-projects are fine. Can I just rearrange the file 
system so it looks like:

eclipse-workspace/parent-project/.project
eclipse-workspace/parent-project/pom.xml
eclipse-workspace/sub-project-1/.project
eclipse-workspace/sub-project-1/pom.xml
eclipse-workspace/sub-project-2/.project
eclipse-workspace/sub-project-2/pom.xml
eclipse-workspace/sub-project-3/.project
eclipse-workspace/sub-project-3/pom.xml

It was not immediately apparent to me looking at the pom.xml or the 
Sonatype UI how to do this. The POM looks like

<modules>
<module>sub-project-1</module>
<module>sub-project-2</module>
<module>sub-project-3</module>
</modules>

Cheers, Eric


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Arranging Modules on the File System

Posted by Eric Kolotyluk <er...@gmail.com>.
Wow, thanks for the awesome tip! That's has helped clear things up 
enourmously.

It was actually fairly simple to flatten the Maven modules the way I 
suspected. It was vastly more difficult to 'flatten' the Eclipse 
projects in the file system - well actually it was easy to flatten the 
Eclipse projects, it was really difficult to figure out how.

Also, the reference you gave me has tons more considerations on dealing 
with Maven in Jazz-land.

Cheers, Eric

On 2011-04-18 5:38 PM, Barrie Treloar wrote:
> On Tue, Apr 19, 2011 at 8:17 AM, Eric Kolotyluk
> <er...@gmail.com>  wrote:
>> I apologize if this is a newbie question, but I'm looking for a quick
>> answer...
>>
>> I'm using Sonatype Maven plug-in for Eclipse and I have set up a project
>> with several modules. The way the plug-in arranged them on the file system
>> is:
> You may have better luck on the m2e mailing list, or ask the Team
> Concert lists how a hierarchical layout is supported.
>
> You may be able to use the guidance at
> http://maven.apache.org/plugins/maven-eclipse-plugin/reactor.html
> *Read this carefully*
> Especially "Note, you have to delete the .project-file of your parent
> project before."
> You need to do this as the "import" step will produce a blank list of
> projects to import, but if you delete the .project file and try the
> sub-projects are now available in the list.
> Eclipse doesn't really support "projects within projects" so your
> mileage may vary", however a lot of us have this working ok.
>
> You can also try turning off Team support for the sub-projects and
> only uses the main project for checkin/checkout.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org