avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jörg Schaible <Joerg.Schai...@Elsag-Solutions.com>
Subject RE: Mortician at Work
Date Wed, 17 Mar 2004 11:25:34 GMT

Hi Niclas,

Niclas Hedhman wrote on Wednesday, March 17, 2004 12:08 PM:
> Since I am cleaning up Excalibur before burying it, I want to remove
> the circular dependencies.
> So I am breaking out the testcases (and anything else I find) which
> are the ones that creates a lot of them
> The goal is that "maven multiproject" is to work from the top
> directory, and to create a complete Excalibur from that.
> Another goal is that Gump builds it without complaints as well.

just a hint how you could handle dependencies between the test code. I have the same problems
in on of my multiprojects where I have to use mock classes in a subproject from another sibling
subproject. What I've done:

Directory Layout:
root
+ sub1
++ mock
+ sub2

The mock directory has just a project.xml and a project.properties:


project.properties:

maven.multiproject.type=jar


project.xml (snippet):

<extend>../../project.xml</extend>
<id>sub1-mock</id>
...
<build>
        <sourceDirectory>${basedir}/../src/test</sourceDirectory>
        <unitTestSourceDirectory/>
        <sourceModifications>
            <sourceModification>
                <className>does.not.Exist</className>
                <includes>
                    <include>**/*Mock.java</include>
                </includes>
            </sourceModification>
        </sourceModifications>
</build>


In sub1 I have a maven.xml with following elements:

    <goal name="sub1-mock-clean">
        <maven:reactor
            basedir="${basedir}/mock"
            includes="project.xml"
            goals="clean"
            banner="Clean Sub1 Mock"
        />
    </goal>
    <goal name="sub1-mock-install">
        <maven:reactor
            basedir="${basedir}/mock"
            includes="project.xml"
            goals="jar:install"
            banner="Install Sub1 Mock"
        />
    </goal>
    <goal name="sub1-mock-deploy">
        <maven:reactor
            basedir="${basedir}/mock"
            includes="project.xml"
            goals="jar:deploy"
            banner="Deploy Sub1 Mock"
        />
    </goal>

    <postGoal name="clean:clean">
        <attainGoal name="sub1-mock-clean"/>
    </postGoal>
    <postGoal name="jar:install">
        <attainGoal name="sub1-mock-install"/>
    </postGoal>
    <postGoal name="jar:deploy">
        <attainGoal name="sub1-mock-deploy"/>
    </postGoal>



This works quite transparently and I have buried my helper jar in a minimal Maven subsubproject.
Maybe you can use this,

Regards,
Jörg

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


Mime
View raw message