Grokbase Groups Maven users May 2003
FAQ
Hi all!
Can somebody tell me how the reactor really works?
If I have a project structure that looks like this:

/-MyProject
-MySubProject1

-MySubProject2

-MySubProject3
Can I then define a dependency like this?

MySubProject2 depends on MySubProject3
MySubProject2 depends on MySubProject1
MySubProject1 depends on MySubProject3

And get the reactor to execute in the following order:

1. MySubProject3
2. MySubProject1
3. MySubProject2

If this is possible then, can somebody tell me how? By the way I want to
use the reactor, and not define my execution order by using many
attainGoal tags.

Thanks,
Kristinn Danielsson

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

Search Discussions

  • Martin Skopp at May 20, 2003 at 7:23 am

    On Tue, 2003-05-20 at 08:12, Kristinn_Danielson@sonynetservices.com wrote:
    Can somebody tell me how the reactor really works?
    Can I then define a dependency like this?

    MySubProject2 depends on MySubProject3
    MySubProject2 depends on MySubProject1
    MySubProject1 depends on MySubProject3

    And get the reactor to execute in the following order:

    1. MySubProject3
    2. MySubProject1
    3. MySubProject2
    reactor determines execution order automagically.
    just trust maven ;-)
    --
    Martin Skopp
    Riege Software International GmbH
    Support: mailto:maint@riege.com, Information: http://www.riege.com

    This email is intended to be viewed with a nonproportional font.
    Public Key on http://www.keyserver.net, Key-ID: 3D4027B5
    Fingerprint: 1970 C78D 9A1D 99FA 5CE4 5C0D 29E6 6A95 3D40 27B5


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
    For additional commands, e-mail: users-help@maven.apache.org
  • Mark H. Wilkinson at May 20, 2003 at 9:46 am

    On Tue, 2003-05-20 at 08:23, Martin Skopp wrote:
    On Tue, 2003-05-20 at 08:12, Kristinn_Danielson@sonynetservices.com
    wrote:
    Can somebody tell me how the reactor really works?
    reactor determines execution order automagically.
    just trust maven ;-)
    That's not very helpful! :-)

    I'll explain how I think it works, and hopefully someone else will
    correct me if I'm wrong anywhere...

    Each project has a unique id derived from the <id> and (optionally)
    <groupId> tags in the POM.

    Each <dependency> in the POM specifies a unique id using <groupId> and
    <id> or <artifactId>.

    The reactor builds a dependency graph by tying one projects'
    <dependency> to the project with the same unique id, if one exists in
    the set of projects the reactor has loaded. It then generates a
    processing order that makes sure each project appears after all its
    dependencies.

    Note that none of the above makes assumptions about what is generated by
    attaining a particular goal in a project. At build time dependencies are
    converted into references to files in the repository, so any artifacts
    generated by a dependent project must be installed into the local
    repository (for example, with jar:install) to make them available to the
    depending project.

    This means that (I think) you could have a container project that uses
    the reactor to both build a set of jar files and generate web sites for
    each sub-project. The ordering produced by the reactor would be the same
    because it doesn't take into account the artifacts being generated.

    -Mark.


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
    For additional commands, e-mail: users-help@maven.apache.org
  • Kristinn_danielson at May 20, 2003 at 7:29 am
    Well I have entered all the dependencies into my sub-projects, but all I
    get is an alphabetical order of execution. And the build fails because it
    can't find the dependencies.

    -----Original Message-----
    From: skopp@riege.de
    Sent: 20. maí 2003 09:24
    To: users@maven.apache.org
    Subject: Re: Reactor execution order?


    On Tue, 2003-05-20 at 08:12, Kristinn_Danielson@sonynetservices.com
    wrote:
    Can somebody tell me how the reactor really works?
    Can I then define a dependency like this?

    MySubProject2 depends on MySubProject3
    MySubProject2 depends on MySubProject1
    MySubProject1 depends on MySubProject3

    And get the reactor to execute in the following order:

    1. MySubProject3
    2. MySubProject1
    3. MySubProject2
    reactor determines execution order automagically.
    just trust maven ;-)
    --
    Martin Skopp
    Riege Software International GmbH
    Support: mailto:maint@riege.com, Information: http://www.riege.com

    This email is intended to be viewed with a nonproportional font. Public
    Key on http://www.keyserver.net, Key-ID: 3D4027B5
    Fingerprint: 1970 C78D 9A1D 99FA 5CE4 5C0D 29E6 6A95 3D40 27B5


    ---------------------------------------------------------------------
    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
  • Ben Walding at May 20, 2003 at 7:37 am
    It might be best if you posted the three project.xml files that aren't
    behaving

    Kristinn_Danielson@sonynetservices.com wrote:
    Well I have entered all the dependencies into my sub-projects, but all I
    get is an alphabetical order of execution. And the build fails because it
    can't find the dependencies.

    -----Original Message-----
    From: skopp@riege.de
    Sent: 20. maí 2003 09:24
    To: users@maven.apache.org
    Subject: Re: Reactor execution order?


    On Tue, 2003-05-20 at 08:12, Kristinn_Danielson@sonynetservices.com
    wrote:

    Can somebody tell me how the reactor really works?
    Can I then define a dependency like this?

    MySubProject2 depends on MySubProject3
    MySubProject2 depends on MySubProject1
    MySubProject1 depends on MySubProject3

    And get the reactor to execute in the following order:

    1. MySubProject3
    2. MySubProject1
    3. MySubProject2
    reactor determines execution order automagically.
    just trust maven ;-)


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
    For additional commands, e-mail: users-help@maven.apache.org
  • Brett Porter at May 20, 2003 at 7:42 am
    you'll need to run jar:install as one of your targets at some point so
    the deps can be found
    Well I have entered all the dependencies into my sub-projects, but all I
    get is an alphabetical order of execution. And the build fails because it
    can't find the dependencies.

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
    For additional commands, e-mail: users-help@maven.apache.org
  • Kristinn_danielson at May 20, 2003 at 7:44 am
    Ok here are the files:

    Here is the main project.xml:

    <?xml version="1.0" encoding="ISO-8859-1"?>
    <project>
    <pomVersion>3</pomVersion>
    <id>MyProject1</id>
    <groupId>MYPROJ</groupId>
    <name>MyProject1</name>
    <currentVersion>1.0</currentVersion>
    <organization>
    <name/>
    <url/>
    <logo />
    </organization>
    <inceptionYear>2002</inceptionYear>
    <package>com.sony.sns.mediastation</package>
    <logo />
    <description>TODO:</description>
    <shortDescription>TODO:</shortDescription>
    <url />
    <issueTrackingUrl />
    <siteAddress />
    <siteDirectory />
    <distributionDirectory />
    <repository>
    <connection />
    <url />
    </repository>
    <mailingLists />
    <developers />
    <dependencies>
    <dependency>
    <id>log4j</id>
    <version>1.2.6</version>
    </dependency>
    <dependency>
    <id>commons-collections</id>
    <version>2.0</version>
    </dependency>
    <dependency>
    <id>commons-logging</id>
    <version>1.0.3</version>
    </dependency>
    <dependency>
    <id>ejb</id>
    <groupId>java</groupId>
    <version>2.0</version>
    </dependency>
    <dependency>
    <id>servletapi</id>
    <version>2.3</version>
    </dependency>
    <dependency>
    <id>xdoclet</id>
    <version>1.2b2</version>
    </dependency>
    <dependency>
    <id>xdoclet+xjavadoc</id>
    <version>1.2b2</version>
    </dependency>
    <dependency>
    <id>xdoclet+xdoclet-module</id>
    <version>1.2b2</version>
    </dependency>
    <dependency>
    <id>xdoclet+ejb-module</id>
    <version>1.2b2</version>
    </dependency>
    <dependency>
    <id>ejb</id>
    <groupId>java</groupId>
    <version>2.0</version>
    </dependency>
    </dependencies>
    <build>
    <nagEmailAddress />
    <sourceDirectory/>
    <unitTestSourceDirectory/>
    </build>
    </project>

    Here is the sub-project1 file:

    <?xml version="1.0" encoding="ISO-8859-1"?>
    <project>
    <extend>${basedir}/../project.xml</extend>
    <pomVersion>3</pomVersion>
    <id>MySubProject1</id>
    <name>MySubProject1</name>
    <dependencies>
    <groupId>MYPROJ</groupId>
    <id>MySubProject2</id>
    <version>1.0</version>
    </dependencies>
    <build>
    <nagEmailAddress />
    <sourceDirectory>${basedir}/src/java</sourceDirectory>
    <unitTestSourceDirectory>${basedir}/src/test</unitTestSourceDirectory>
    <unitTest>
    <includes>
    <include>**/*Test.java</include>
    </includes>
    <excludes>
    <exclude>**/NaughtyTest.java</exclude>
    </excludes>
    </unitTest>
    <resources>
    <resource>
    <directory>${basedir}/src/conf</directory>
    <includes>
    <include>*.properties</include>
    </includes>
    </resource>
    </resources>
    </build>
    </project>


    Here is the sub-project2 file:

    <?xml version="1.0" encoding="ISO-8859-1"?>
    <project>
    <extend>${basedir}/../project.xml</extend>
    <pomVersion>3</pomVersion>
    <id>MySubProject2</id>
    <name>MySubProject2</name>
    <dependencies></dependencies>
    <build>
    <nagEmailAddress />
    <sourceDirectory>${basedir}/src/java</sourceDirectory>
    <unitTestSourceDirectory>${basedir}/src/test</unitTestSourceDirectory>
    <unitTest>
    <includes>
    <include>**/*Test.java</include>
    </includes>
    <excludes>
    <exclude>**/NaughtyTest.java</exclude>
    </excludes>
    </unitTest>
    <resources>
    <resource>
    <directory>${basedir}/src/conf</directory>
    <includes>
    <include>*.properties</include>
    </includes>
    </resource>
    </resources>
    </build>
    </project>


    -----Original Message-----
    From: default0001@walding.com
    Sent: 20. maí 2003 09:37
    To: users@maven.apache.org
    Subject: Re: Reactor execution order?


    It might be best if you posted the three project.xml files that aren't
    behaving

    Kristinn_Danielson@sonynetservices.com wrote:
    Well I have entered all the dependencies into my sub-projects, but all
    I get is an alphabetical order of execution. And the build fails
    because it can't find the dependencies.

    -----Original Message-----
    From: skopp@riege.de
    Sent: 20. maí 2003 09:24
    To: users@maven.apache.org
    Subject: Re: Reactor execution order?


    On Tue, 2003-05-20 at 08:12, Kristinn_Danielson@sonynetservices.com
    wrote:

    Can somebody tell me how the reactor really works?
    Can I then define a dependency like this?

    MySubProject2 depends on MySubProject3
    MySubProject2 depends on MySubProject1
    MySubProject1 depends on MySubProject3

    And get the reactor to execute in the following order:

    1. MySubProject3
    2. MySubProject1
    3. MySubProject2
    reactor determines execution order automagically.
    just trust maven ;-)


    ---------------------------------------------------------------------
    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
  • Alex Vollmer at May 20, 2003 at 4:19 pm
    This is a great thread! I've been trying to do something like this too
    but figured Maven wasn't ready to handle this kind of auto-magic
    dependency-tree generation. One question I have though is what should
    the Reactor invocation look like? Is this where we would tell each
    sub-project to do 'jar:install', as suggested by other users?

    Thanks!

    --Alex

    Kristinn_Danielson@sonynetservices.com wrote:
    Ok here are the files:

    Here is the main project.xml:

    <?xml version="1.0" encoding="ISO-8859-1"?>
    <project>
    <pomVersion>3</pomVersion>
    <id>MyProject1</id>
    <groupId>MYPROJ</groupId>
    <name>MyProject1</name>
    <currentVersion>1.0</currentVersion>
    <organization>
    <name/>
    <url/>
    <logo />
    </organization>
    <inceptionYear>2002</inceptionYear>
    <package>com.sony.sns.mediastation</package>
    <logo />
    <description>TODO:</description>
    <shortDescription>TODO:</shortDescription>
    <url />
    <issueTrackingUrl />
    <siteAddress />
    <siteDirectory />
    <distributionDirectory />
    <repository>
    <connection />
    <url />
    </repository>
    <mailingLists />
    <developers />
    <dependencies>
    <dependency>
    <id>log4j</id>
    <version>1.2.6</version>
    </dependency>
    <dependency>
    <id>commons-collections</id>
    <version>2.0</version>
    </dependency>
    <dependency>
    <id>commons-logging</id>
    <version>1.0.3</version>
    </dependency>
    <dependency>
    <id>ejb</id>
    <groupId>java</groupId>
    <version>2.0</version>
    </dependency>
    <dependency>
    <id>servletapi</id>
    <version>2.3</version>
    </dependency>
    <dependency>
    <id>xdoclet</id>
    <version>1.2b2</version>
    </dependency>
    <dependency>
    <id>xdoclet+xjavadoc</id>
    <version>1.2b2</version>
    </dependency>
    <dependency>
    <id>xdoclet+xdoclet-module</id>
    <version>1.2b2</version>
    </dependency>
    <dependency>
    <id>xdoclet+ejb-module</id>
    <version>1.2b2</version>
    </dependency>
    <dependency>
    <id>ejb</id>
    <groupId>java</groupId>
    <version>2.0</version>
    </dependency>
    </dependencies>
    <build>
    <nagEmailAddress />
    <sourceDirectory/>
    <unitTestSourceDirectory/>
    </build>
    </project>

    Here is the sub-project1 file:

    <?xml version="1.0" encoding="ISO-8859-1"?>
    <project>
    <extend>${basedir}/../project.xml</extend>
    <pomVersion>3</pomVersion>
    <id>MySubProject1</id>
    <name>MySubProject1</name>
    <dependencies>
    <groupId>MYPROJ</groupId>
    <id>MySubProject2</id>
    <version>1.0</version>
    </dependencies>
    <build>
    <nagEmailAddress />
    <sourceDirectory>${basedir}/src/java</sourceDirectory>
    <unitTestSourceDirectory>${basedir}/src/test</unitTestSourceDirectory>
    <unitTest>
    <includes>
    <include>**/*Test.java</include>
    </includes>
    <excludes>
    <exclude>**/NaughtyTest.java</exclude>
    </excludes>
    </unitTest>
    <resources>
    <resource>
    <directory>${basedir}/src/conf</directory>
    <includes>
    <include>*.properties</include>
    </includes>
    </resource>
    </resources>
    </build>
    </project>


    Here is the sub-project2 file:

    <?xml version="1.0" encoding="ISO-8859-1"?>
    <project>
    <extend>${basedir}/../project.xml</extend>
    <pomVersion>3</pomVersion>
    <id>MySubProject2</id>
    <name>MySubProject2</name>
    <dependencies></dependencies>
    <build>
    <nagEmailAddress />
    <sourceDirectory>${basedir}/src/java</sourceDirectory>
    <unitTestSourceDirectory>${basedir}/src/test</unitTestSourceDirectory>
    <unitTest>
    <includes>
    <include>**/*Test.java</include>
    </includes>
    <excludes>
    <exclude>**/NaughtyTest.java</exclude>
    </excludes>
    </unitTest>
    <resources>
    <resource>
    <directory>${basedir}/src/conf</directory>
    <includes>
    <include>*.properties</include>
    </includes>
    </resource>
    </resources>
    </build>
    </project>


    -----Original Message-----
    From: default0001@walding.com
    Sent: 20. maí 2003 09:37
    To: users@maven.apache.org
    Subject: Re: Reactor execution order?


    It might be best if you posted the three project.xml files that aren't
    behaving

    Kristinn_Danielson@sonynetservices.com wrote:


    Well I have entered all the dependencies into my sub-projects, but all
    I get is an alphabetical order of execution. And the build fails
    because it can't find the dependencies.

    -----Original Message-----
    From: skopp@riege.de
    Sent: 20. maí 2003 09:24
    To: users@maven.apache.org
    Subject: Re: Reactor execution order?


    On Tue, 2003-05-20 at 08:12, Kristinn_Danielson@sonynetservices.com
    wrote:



    Can somebody tell me how the reactor really works?
    Can I then define a dependency like this?

    MySubProject2 depends on MySubProject3
    MySubProject2 depends on MySubProject1
    MySubProject1 depends on MySubProject3

    And get the reactor to execute in the following order:

    1. MySubProject3
    2. MySubProject1
    3. MySubProject2


    reactor determines execution order automagically.
    just trust maven ;-)




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


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
    For additional commands, e-mail: users-help@maven.apache.org
  • Mark H. Wilkinson at May 20, 2003 at 4:41 pm

    On Tue, 2003-05-20 at 17:17, Alex Vollmer wrote:
    This is a great thread! I've been trying to do something like this too
    but figured Maven wasn't ready to handle this kind of auto-magic
    dependency-tree generation. One question I have though is what should
    the Reactor invocation look like? Is this where we would tell each
    sub-project to do 'jar:install', as suggested by other users?
    Yes. Make a maven.xml that contains this:

    <project default="module:build"
    xmlns:maven="jelly:maven">

    <goal name="module:build">
    <maven:reactor
    basedir="${basedir}"
    includes="*/project.xml"
    goals="jar:install"
    ignoreFailures="false"
    />
    </goal>

    </project>

    -Mark.


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
    For additional commands, e-mail: users-help@maven.apache.org
  • Jason van Zyl at May 20, 2003 at 5:08 pm

    On Tue, 2003-05-20 at 12:17, Alex Vollmer wrote:
    This is a great thread! I've been trying to do something like this too
    but figured Maven wasn't ready to handle this kind of auto-magic
    dependency-tree generation. One question I have though is what should
    the Reactor invocation look like? Is this where we would tell each
    sub-project to do 'jar:install', as suggested by other users?
    The reactor has always used a topo sort to figure out the dependency
    ordering. It has never worked any other way. If you're getting some
    scary ordering that doesn't work it's more than likely due to
    misconfiguration. Maven's own plugin build uses the reactor. As stated
    in other emails the order that arises can often be different because the
    algorithm only guarantees dependency ordering is correct. If there is no
    dependency chain then it may come out appearing random.
    Thanks!

    --Alex

    Kristinn_Danielson@sonynetservices.com wrote:
    Ok here are the files:

    Here is the main project.xml:

    <?xml version="1.0" encoding="ISO-8859-1"?>
    <project>
    <pomVersion>3</pomVersion>
    <id>MyProject1</id>
    <groupId>MYPROJ</groupId>
    <name>MyProject1</name>
    <currentVersion>1.0</currentVersion>
    <organization>
    <name/>
    <url/>
    <logo />
    </organization>
    <inceptionYear>2002</inceptionYear>
    <package>com.sony.sns.mediastation</package>
    <logo />
    <description>TODO:</description>
    <shortDescription>TODO:</shortDescription>
    <url />
    <issueTrackingUrl />
    <siteAddress />
    <siteDirectory />
    <distributionDirectory />
    <repository>
    <connection />
    <url />
    </repository>
    <mailingLists />
    <developers />
    <dependencies>
    <dependency>
    <id>log4j</id>
    <version>1.2.6</version>
    </dependency>
    <dependency>
    <id>commons-collections</id>
    <version>2.0</version>
    </dependency>
    <dependency>
    <id>commons-logging</id>
    <version>1.0.3</version>
    </dependency>
    <dependency>
    <id>ejb</id>
    <groupId>java</groupId>
    <version>2.0</version>
    </dependency>
    <dependency>
    <id>servletapi</id>
    <version>2.3</version>
    </dependency>
    <dependency>
    <id>xdoclet</id>
    <version>1.2b2</version>
    </dependency>
    <dependency>
    <id>xdoclet+xjavadoc</id>
    <version>1.2b2</version>
    </dependency>
    <dependency>
    <id>xdoclet+xdoclet-module</id>
    <version>1.2b2</version>
    </dependency>
    <dependency>
    <id>xdoclet+ejb-module</id>
    <version>1.2b2</version>
    </dependency>
    <dependency>
    <id>ejb</id>
    <groupId>java</groupId>
    <version>2.0</version>
    </dependency>
    </dependencies>
    <build>
    <nagEmailAddress />
    <sourceDirectory/>
    <unitTestSourceDirectory/>
    </build>
    </project>

    Here is the sub-project1 file:

    <?xml version="1.0" encoding="ISO-8859-1"?>
    <project>
    <extend>${basedir}/../project.xml</extend>
    <pomVersion>3</pomVersion>
    <id>MySubProject1</id>
    <name>MySubProject1</name>
    <dependencies>
    <groupId>MYPROJ</groupId>
    <id>MySubProject2</id>
    <version>1.0</version>
    </dependencies>
    <build>
    <nagEmailAddress />
    <sourceDirectory>${basedir}/src/java</sourceDirectory>
    <unitTestSourceDirectory>${basedir}/src/test</unitTestSourceDirectory>
    <unitTest>
    <includes>
    <include>**/*Test.java</include>
    </includes>
    <excludes>
    <exclude>**/NaughtyTest.java</exclude>
    </excludes>
    </unitTest>
    <resources>
    <resource>
    <directory>${basedir}/src/conf</directory>
    <includes>
    <include>*.properties</include>
    </includes>
    </resource>
    </resources>
    </build>
    </project>


    Here is the sub-project2 file:

    <?xml version="1.0" encoding="ISO-8859-1"?>
    <project>
    <extend>${basedir}/../project.xml</extend>
    <pomVersion>3</pomVersion>
    <id>MySubProject2</id>
    <name>MySubProject2</name>
    <dependencies></dependencies>
    <build>
    <nagEmailAddress />
    <sourceDirectory>${basedir}/src/java</sourceDirectory>
    <unitTestSourceDirectory>${basedir}/src/test</unitTestSourceDirectory>
    <unitTest>
    <includes>
    <include>**/*Test.java</include>
    </includes>
    <excludes>
    <exclude>**/NaughtyTest.java</exclude>
    </excludes>
    </unitTest>
    <resources>
    <resource>
    <directory>${basedir}/src/conf</directory>
    <includes>
    <include>*.properties</include>
    </includes>
    </resource>
    </resources>
    </build>
    </project>


    -----Original Message-----
    From: default0001@walding.com
    Sent: 20. maí 2003 09:37
    To: users@maven.apache.org
    Subject: Re: Reactor execution order?


    It might be best if you posted the three project.xml files that aren't
    behaving

    Kristinn_Danielson@sonynetservices.com wrote:


    Well I have entered all the dependencies into my sub-projects, but all
    I get is an alphabetical order of execution. And the build fails
    because it can't find the dependencies.

    -----Original Message-----
    From: skopp@riege.de
    Sent: 20. maí 2003 09:24
    To: users@maven.apache.org
    Subject: Re: Reactor execution order?


    On Tue, 2003-05-20 at 08:12, Kristinn_Danielson@sonynetservices.com
    wrote:



    Can somebody tell me how the reactor really works?
    Can I then define a dependency like this?

    MySubProject2 depends on MySubProject3
    MySubProject2 depends on MySubProject1
    MySubProject1 depends on MySubProject3

    And get the reactor to execute in the following order:

    1. MySubProject3
    2. MySubProject1
    3. MySubProject2


    reactor determines execution order automagically.
    just trust maven ;-)




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


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

    Jason van Zyl
    jason@zenplex.com
    http://tambora.zenplex.org

    In short, man creates for himself a new religion of a rational
    and technical order to justify his work and to be justified in it.

    -- Jacques Ellul, The Technological Society


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
    For additional commands, e-mail: users-help@maven.apache.org
  • Kristinn_danielson at May 20, 2003 at 7:47 am
    What do you mean exactly? That I have to execute jar:install individually
    on each project before I can use the reactor?
    Because now I'm trying to execute jar:install using the reactor and I want
    the reactor to find out which sub project has to be jar:installed first
    for the process to work.

    -----Original Message-----
    From: bporter@f2network.com.au
    Sent: 20. maí 2003 09:43
    To: users@maven.apache.org
    Subject: Re: Reactor execution order?


    you'll need to run jar:install as one of your targets at some point so
    the deps can be found
    Well I have entered all the dependencies into my sub-projects, but
    all I get is an alphabetical order of execution. And the build fails
    because it can't find the dependencies.

    ---------------------------------------------------------------------
    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
  • Kristinn_danielson at May 20, 2003 at 9:57 am
    Hi Mark!
    Thanks for the explanation of the reactor. Maybe you could help me out
    with my problem?
    I have a posted some questions regarding the reactor. My problem is that
    it seems that the reactor does not resolve my dependencies correctly,
    instead it always executes in the same order (alphabetical). Maybe you
    have an idea of what is going on?

    Thanks
    Kristinn

    -----Original Message-----
    From: Mark H. Wilkinson
    Sent: 20. maí 2003 11:46
    To: users@maven.apache.org
    Subject: Re: Reactor execution order?

    On Tue, 2003-05-20 at 08:23, Martin Skopp wrote:
    On Tue, 2003-05-20 at 08:12, Kristinn_Danielson@sonynetservices.com
    wrote:
    Can somebody tell me how the reactor really works?
    reactor determines execution order automagically.
    just trust maven ;-)
    That's not very helpful! :-)

    I'll explain how I think it works, and hopefully someone else will correct
    me if I'm wrong anywhere...

    Each project has a unique id derived from the <id> and (optionally)
    <groupId> tags in the POM.

    Each <dependency> in the POM specifies a unique id using <groupId> and
    <id> or <artifactId>.

    The reactor builds a dependency graph by tying one projects' <dependency>
    to the project with the same unique id, if one exists in the set of
    projects the reactor has loaded. It then generates a processing order that
    makes sure each project appears after all its dependencies.

    Note that none of the above makes assumptions about what is generated by
    attaining a particular goal in a project. At build time dependencies are
    converted into references to files in the repository, so any artifacts
    generated by a dependent project must be installed into the local
    repository (for example, with jar:install) to make them available to the
    depending project.

    This means that (I think) you could have a container project that uses the
    reactor to both build a set of jar files and generate web sites for each
    sub-project. The ordering produced by the reactor would be the same
    because it doesn't take into account the artifacts being generated.

    -Mark.


    ---------------------------------------------------------------------
    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
  • Mark H. Wilkinson at May 20, 2003 at 11:06 am

    On Tue, 2003-05-20 at 10:56, Kristinn_Danielson@sonynetservices.com wrote:
    Hi Mark!
    Thanks for the explanation of the reactor. Maybe you could help me out
    with my problem?
    I have a posted some questions regarding the reactor. My problem is that
    it seems that the reactor does not resolve my dependencies correctly,
    instead it always executes in the same order (alphabetical). Maybe you
    have an idea of what is going on?
    There are a couple of problems with your sub-project project.xml files:

    1. You've missed the <dependency> element inside the <dependencies>
    element. This:

    <dependencies>
    <groupId>MYPROJ</groupId>
    <id>MySubProject2</id>
    <version>1.0</version>
    </dependencies>

    should be

    <dependencies>
    <dependency>
    <groupId>MYPROJ</groupId>
    <id>MySubProject2</id>
    <version>1.0</version>
    </dependency>
    </dependencies>

    2. (With my copy of maven, built from CVS HEAD in the last few days).
    Dependencies don't seem to work properly if you use the combination of
    elements that you've used in the order you've used them. You should
    probably be doing this instead:

    <dependencies>
    <dependency>
    <groupId>MYPROJ</groupId>
    <artifactId>MySubProject2</artifactId>
    <version>1.0</version>
    </dependency>
    </dependencies>

    <id> is the old way of doing things, and there seems to be a transition
    to the new way (using <artifactId>) under way. If you put the <id> tag
    before <groupId> that would work as well, but the order you've used
    causes the (non-existent) group id that could go in the <id> tag to
    replace the <groupId> that you specified. I'd say that's a bug in maven.

    With those tweaks I get this:

    Starting the reactor...
    Our processing order:
    MySubProject2
    MySubProject1

    which is probably what you were hoping for.

    I'd also suggest not using MyProject/project.xml as the shared base
    project: <extend>../project.xml</extend> also pulls in maven.xml from
    that directory (I believe), so running maven in MyProject/MySubProject1
    gives

    Starting the reactor...
    Our processing order:
    BUILD SUCCESSFUL
    Total time: 6 seconds

    which might not be what you want. I have a subdirectory with common
    things in it and then do <extend>../common/project.xml</extend> in the
    subprojects and <extend>common/project.xml</extend> in the top-level
    project.

    -Mark.


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
    For additional commands, e-mail: users-help@maven.apache.org
  • Kristine Weissbarth at May 21, 2003 at 2:23 pm
    Hi,

    it might not be helpful for the solution of your problem, but maybe you
    already found a way to manage it. I just wanted to tell you that I've
    the same problem at the moment. But in my case maven even does not
    process in alphabetical order. As I have not only subprojects but
    subsubprojects too the maven reactor obviously does not build the right
    dependency graph. But I could not yet figure out on which criteria the
    processing order is built.

    Did you found a way to manipulate the processing order?

    Thanks.


    Am Die, 2003-05-20 um 11.56 schrieb
    Kristinn_Danielson@sonynetservices.com:
    Hi Mark!
    Thanks for the explanation of the reactor. Maybe you could help me out
    with my problem?
    I have a posted some questions regarding the reactor. My problem is that
    it seems that the reactor does not resolve my dependencies correctly,
    instead it always executes in the same order (alphabetical). Maybe you
    have an idea of what is going on?

    Thanks
    Kristinn

    -----Original Message-----
    From: Mark H. Wilkinson
    Sent: 20. maí 2003 11:46
    To: users@maven.apache.org
    Subject: Re: Reactor execution order?

    On Tue, 2003-05-20 at 08:23, Martin Skopp wrote:
    On Tue, 2003-05-20 at 08:12, Kristinn_Danielson@sonynetservices.com
    wrote:
    Can somebody tell me how the reactor really works?
    reactor determines execution order automagically.
    just trust maven ;-)
    That's not very helpful! :-)

    I'll explain how I think it works, and hopefully someone else will correct
    me if I'm wrong anywhere...

    Each project has a unique id derived from the <id> and (optionally)
    <groupId> tags in the POM.

    Each <dependency> in the POM specifies a unique id using <groupId> and
    <id> or <artifactId>.

    The reactor builds a dependency graph by tying one projects' <dependency>
    to the project with the same unique id, if one exists in the set of
    projects the reactor has loaded. It then generates a processing order that
    makes sure each project appears after all its dependencies.

    Note that none of the above makes assumptions about what is generated by
    attaining a particular goal in a project. At build time dependencies are
    converted into references to files in the repository, so any artifacts
    generated by a dependent project must be installed into the local
    repository (for example, with jar:install) to make them available to the
    depending project.

    This means that (I think) you could have a container project that uses the
    reactor to both build a set of jar files and generate web sites for each
    sub-project. The ordering produced by the reactor would be the same
    because it doesn't take into account the artifacts being generated.

    -Mark.


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

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
    For additional commands, e-mail: users-help@maven.apache.org
  • Kristine Weissbarth at May 21, 2003 at 2:23 pm
    Hi,

    it might not be helpful for the solution of your problem, but maybe you
    already found a way to manage it. I just wanted to tell you that I've
    the same problem at the moment. But in my case maven even does not
    process in alphabetical order. As I have not only subprojects but
    subsubprojects too the maven reactor obviously does not build the right
    dependency graph. But I could not yet figure out on which criteria the
    processing order is built.

    Did you found a way to manipulate the processing order?

    Thanks.




    Am Die, 2003-05-20 um 11.56 schrieb
    Kristinn_Danielson@sonynetservices.com:
    Hi Mark!
    Thanks for the explanation of the reactor. Maybe you could help me out
    with my problem?
    I have a posted some questions regarding the reactor. My problem is that
    it seems that the reactor does not resolve my dependencies correctly,
    instead it always executes in the same order (alphabetical). Maybe you
    have an idea of what is going on?

    Thanks
    Kristinn

    -----Original Message-----
    From: Mark H. Wilkinson
    Sent: 20. maí 2003 11:46
    To: users@maven.apache.org
    Subject: Re: Reactor execution order?

    On Tue, 2003-05-20 at 08:23, Martin Skopp wrote:
    On Tue, 2003-05-20 at 08:12, Kristinn_Danielson@sonynetservices.com
    wrote:
    Can somebody tell me how the reactor really works?
    reactor determines execution order automagically.
    just trust maven ;-)
    That's not very helpful! :-)

    I'll explain how I think it works, and hopefully someone else will correct
    me if I'm wrong anywhere...

    Each project has a unique id derived from the <id> and (optionally)
    <groupId> tags in the POM.

    Each <dependency> in the POM specifies a unique id using <groupId> and
    <id> or <artifactId>.

    The reactor builds a dependency graph by tying one projects'
    <dependency>
    to the project with the same unique id, if one exists in the set of
    projects the reactor has loaded. It then generates a processing order that
    makes sure each project appears after all its dependencies.

    Note that none of the above makes assumptions about what is generated by
    attaining a particular goal in a project. At build time dependencies are
    converted into references to files in the repository, so any artifacts
    generated by a dependent project must be installed into the local
    repository (for example, with jar:install) to make them available to the
    depending project.

    This means that (I think) you could have a container project that uses the
    reactor to both build a set of jar files and generate web sites for each
    sub-project. The ordering produced by the reactor would be the same
    because it doesn't take into account the artifacts being generated.

    -Mark.


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

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
    For additional commands, e-mail: users-help@maven.apache.org
  • Kristinn_danielson at May 22, 2003 at 6:27 am
    Hi,
    Well my build is under control now thanks to Mark. Have a look at what he
    says about the id and the artifactId tags. The trick is to use artifactId
    instead of id, but there are some mails from Mark that explain the problem
    better. But I seem to remember having seen that Maven/Reactor only
    supports one level of inheritence, I'm not sure if it is that easy to use
    the reactor to build sub-subprojects. But I have never tried it. So sorry
    can't help you there :(

    Hi,

    it might not be helpful for the solution of your problem, but maybe you
    already found a way to manage it. I just wanted to tell you that I've the
    same problem at the moment. But in my case maven even does not process in
    alphabetical order. As I have not only subprojects but subsubprojects too
    the maven reactor obviously does not build the right dependency graph. But
    I could not yet figure out on which criteria the processing order is
    built.

    Did you found a way to manipulate the processing order?

    Thanks.




    Am Die, 2003-05-20 um 11.56 schrieb
    Kristinn_Danielson@sonynetservices.com:
    Hi Mark!
    Thanks for the explanation of the reactor. Maybe you could help me out
    with my problem? I have a posted some questions regarding the reactor.
    My problem is that
    it seems that the reactor does not resolve my dependencies correctly,
    instead it always executes in the same order (alphabetical). Maybe you
    have an idea of what is going on?

    Thanks
    Kristinn

    -----Original Message-----
    From: Mark H. Wilkinson
    Sent: 20. maí 2003 11:46
    To: users@maven.apache.org
    Subject: Re: Reactor execution order?

    On Tue, 2003-05-20 at 08:23, Martin Skopp wrote:
    On Tue, 2003-05-20 at 08:12, Kristinn_Danielson@sonynetservices.com
    wrote:
    Can somebody tell me how the reactor really works?
    reactor determines execution order automagically.
    just trust maven ;-)
    That's not very helpful! :-)

    I'll explain how I think it works, and hopefully someone else will correct
    me if I'm wrong anywhere...

    Each project has a unique id derived from the <id> and (optionally)
    <groupId> tags in the POM.

    Each <dependency> in the POM specifies a unique id using <groupId> and
    <id> or <artifactId>.

    The reactor builds a dependency graph by tying one projects'
    <dependency>
    to the project with the same unique id, if one exists in the set of
    projects the reactor has loaded. It then generates a processing order that
    makes sure each project appears after all its dependencies.

    Note that none of the above makes assumptions about what is generated by
    attaining a particular goal in a project. At build time dependencies are
    converted into references to files in the repository, so any artifacts
    generated by a dependent project must be installed into the local
    repository (for example, with jar:install) to make them available to the
    depending project.

    This means that (I think) you could have a container project that uses the
    reactor to both build a set of jar files and generate web sites for each
    sub-project. The ordering produced by the reactor would be the same
    because it doesn't take into account the artifacts being generated.

    -Mark.


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

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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupusers @
categoriesmaven
postedMay 20, '03 at 6:12a
activeMay 22, '03 at 6:27a
posts16
users8
websitemaven.apache.org
irc#maven

People

Translate

site design / logo © 2019 Grokbase