For Eclipse, I know I had the same problem, which I solved by writing a
simple plugin (it could be a goal in your root maven.xml if you only
have 1 project, I have many), which basically goes through each
subproject and runs the eclipse goal only if it doesn't have any
subproject, which in my case (and I imagine most cases) means it has no
sources. Then I use the multi-project import/export Eclipse plugin to
import the subprojects into Eclipse.

But if your stuff already works, I guess you don't really need this info
now do you? :-) Here's the goal anyway just in case...

        <goal name="multiEclipse">
            <maven:reactor
                basedir="${maven.multiEclipse.basedir}"
                banner="Gathering project list"
                includes="${maven.multiEclipse.includes}"
                excludes="${maven.multiEclipse.excludes}"
                postProcessing="true"
                collectOnly="true"
                collectionVar="multiprojects"
                ignoreFailures="${maven.multiEclipse.ignoreFailures}"
            />
            <j:if test="${multiprojects.isEmpty()}">
                <attainGoal name="eclipse"/>
            </j:if>
            <j:if test="${!multiprojects.isEmpty()}">
                    <maven:reactor
                        basedir="${maven.multiEclipse.basedir}"
                        banner="Executing ${goal}"
                        projectList="${multiprojects}"
                        goals="multiEclipse"
        
ignoreFailures="${maven.multiEclipse.ignoreFailures}"
                    />
            </j:if>
        </goal>

Steve Molloy


-----Original Message-----
From: Robert Hernik [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 19, 2004 12:20 PM
To: Maven Users List
Subject: RE: multiproject recursive nesting problem

I'm using this flat structure to keep the same hierarchy as we have in
our Eclipse development environment, so I'd prefer to keep it if
possible.

I think I have found the solution though after your comments prompted
(yet another) re-read of the multiproject documentation.

My project.properties in the buildRoot dir also contains an entry for
the docs directory:

maven.docs.dest=F:/path/to/docs

The multiproject documentation says:
"At the completion of the multiproject:site goal, each project's
generated site is copied into the appropriate directory. e.g. if
WebProject1 and JarProject2 are the names of projects processed via
multiproject:site, the project that is executing multiproject:site will
have the generated sites from WebProject1/target/docs and
JarProject2/target/docs copied into target/docs/multiproject/WebProject1
and target/docs/multiproject/JarProject2 respectively. "

As the project.properties for my projectA and projectB did not
explicitly define their own maven.docs.dest I think they were using the
buildRoot's maven.docs.dest path, and because of this I was getting them
copied within each other.

Explicitly setting a unique maven.docs.dest in the project.properties of
each sub-project appears to have fixed this!

Thanks for helping with my question.

Cheers,

Rob. 




************************************************************************
****

This email and any files transmitted with it contain information that
may be
confidential or privileged, and are intended solely for the use of the
individual or entity to whom they are addressed. If you are not the
intended
recipient any disclosure, copying, distribution or use of the
information is
prohibited. If you have received this email in error, please notify me
by
return email immediately. Any opinions expressed are those of the
author,
not of Morpheus Limited.


This message has been checked for all known viruses by UUNET delivered 
through the MessageLabs Virus Control Centre.

************************************************************************
****

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