I am trying to get multiproject dependencies work. But am having a hard
time. The doc didn't seem to contain the answers to my question.

My idea is to test the multiproject functionality doing the following

project/core
project/web

I then need core to be built before web. 


Detailed Setup:
---------------

I have 3 project.xml files

on in project/ and one in each of the sub projects.

In each project.xml I have something like that

  <extend>../project.xml</extend>  (this only in the sub projects)
  <pomVersion>3</pomVersion>       (same pom version)
  <id>fullex-web</id>              (different for each project)
  <groupId>org.cb.test</groupId>   (same groupId)

The web one contains a dependency on the artifact built by the core
project.

something like

      <dependency>
        <groupId>org.cb.test</groupId>
        <id>fullex-core</id>
        <version>0.1</version>
        <url>http://localhost/</url>
      </dependency>

in the project.properties for the web project I have something like

maven.jar.override=on
maven.jar.fullex-core=${basedir}/../core/target/fullex-core-0.1.jar

In the root maven.xml I've added the reactor example found in the doc.
  <goal name="all" description="build all modules">
      <maven:reactor
          basedir="${basedir}"
          postProcessing="true"
          includes="*/project.xml"
          goals="all"
          banner="Building full project"
          ignoreFailures="false"
      >
      </maven:reactor>
      <j:forEach var="reactorProject" items="${reactorProjects}">

      </j:forEach>
  </goal>


Problem:
--------

But when I run maven, it keeps trying to build web before core.

Here is the extract of maven -X:

[...]
attaining goal build:start
attaining goal all
Starting the reactor...
Using userBuildPropertiesFile: /home/jerome/build.properties
Using projectPropertiesFile:
/home/jerome/Dev/FullExample/AWebApp/project.properties
Using projectBuildPropertiesFile:
/home/jerome/Dev/FullExample/AWebApp/build.properties
Using userBuildPropertiesFile: /home/jerome/build.properties
Using projectPropertiesFile:
/home/jerome/Dev/FullExample/project.properties
Using projectBuildPropertiesFile:
/home/jerome/Dev/FullExample/build.properties
Using projectBuildPropertiesFile:
/home/jerome/Dev/FullExample/build.properties
Using projectPropertiesFile:
/home/jerome/Dev/FullExample/project.properties
Using userBuildPropertiesFile: /home/jerome/build.properties
Using projectPropertiesFile:
/home/jerome/Dev/FullExample/core/project.properties
Using projectBuildPropertiesFile:
/home/jerome/Dev/FullExample/core/build.properties
Using projectBuildPropertiesFile:
/home/jerome/Dev/FullExample/build.properties
Using projectPropertiesFile:
/home/jerome/Dev/FullExample/project.properties
Our processing order:
Tests FullExample (Web)
Tests FullExample (CORE)


Questions:
---------

- how do I enforce the order? Did I miss something?

- is the publishing of my jar file in a local repository the recommended
approach? Or should I use the dependency overriding (which has the
inconvenient of requiring an exact path, containing the version number)



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to