Sounds to me like Client depends on Server depends on Common.

Thus:
common/pom.xml
<dependencies>...none...</dependencies>

server/pom.xml
<dependencies>...common...</dependencies>

client/pom.xml
<dependencies>...server, common...</dependencies> or
<dependencies>...server...</dependencies> and common will be pulled in
via transitive dependencies

Is there a reason you can't set things up like this, or why this won't
work for you?

Wayne

On 11/6/06, Petter Måhlén <[EMAIL PROTECTED]> wrote:
Hi,

I have a question concerning what I can do to force projects to be built in
a specific order. There have been some previous similar queries, but they
don't quite seem to apply to our situation. What we want is this:

1. 'mvn clean install' for project 'common': this leads to a jar file with
common message definitions for node-node communication being updated.
2. 'mvn clean install' for project 'server': we have written a simple Maven
plugin that reads the message definitions, and generates source code that
parses/packages the messages.
3. 'ant clean test' for project 'client': this again generates source code
for parsing/packaging messages, but this time for the client.

Is it possible for us to specify this order somehow? As it is, the builds
will more or less randomly fail depending on which order they are executed
in. It may be relevant that the 'server->common' dependency is configured
like so:

<project>
...
 <build>
     <plugins>
       <plugin>
         <groupId>se.jadestone.whine</groupId>
         <artifactId>maven-whine-generator</artifactId>
         <version>3.0</version>
...
         <dependencies>
               <dependency>
                               <groupId>se.jadestone.esports</groupId>
                               <artifactId>hc-common</artifactId>
                               <version>0.0.1</version>
                       </dependency>
               </dependencies>
       </plugin>
...

The 'common' jar must be available on the classpath of the plugin that
generates source code, and like this, it is only available at that point,
which is great since we don't want to include it in the shipped product.

Thanks for any help,

Petter

Cell: +46 704 40 30 25
Direct: +46 8 442 75 95
Fax: +46 8 24 05 08
www.jadestone.se
Björns Trädgårdsgränd 1, 116 21 Stockholm, Sweden


Reply via email to