You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Sergey Khandogin <ha...@sunbay.com> on 2004/03/26 17:16:46 UTC

collecting dependencies from sub-projects

Dear All.

I have teh following project structure
main\
       --project.xml
       --maven.xml
       --components\ 
                              ---mod1\
                                        ---project.xml
                               ---mod2\
                                        ---project.xml
mod1 depends on mod2
ant main depends on mod1
I want to collect all dependencies from mod1, mod2 and main into one 
foler for future deployment

but when I use the folloving script for main project I have some 
dependencies missed.

script:
    <goal description="Collect all dependancy jars into one folder"
          name="jars-collect">
        <maven:reactor banner="Collecting all dependancy for"
                       basedir="${basedir}/components" goals="pom:validate"
                       ignoreFailures="false" includes="*/project.xml"
                       postProcessing="true" />

        <j:forEach items="${reactorProjects}" var="project">
            <echo>${project.id}</echo>

            <j:forEach items="${project.dependencies}" var="dep">
                <echo>${project.getDependencyPath(dep.artifactId)}</echo>
                <copy overwrite="false" todir="${basedir}/target/jars/" 
verbose="false">
                    <fileset 
file="${project.getDependencyPath(dep.artifactId)}" />
                </copy>
            </j:forEach>
        </j:forEach>
    </goal>

Can anybody help me with it?

Thanks for future answers :-)

Sergey Khandogin.

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