continuum-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Petter Måhlén <petter.mah...@jadestone.se>
Subject RE: Project build order
Date Tue, 07 Nov 2006 08:02:28 GMT
I haven't done it like that for two reasons:
- the common.jar file shouldn't be distributed, it's only used at build time
to generate code, which in turn should be distributed, and,
- more importantly, the plugin that does code generation has to have the
common.jar file in its classpath, meaning that it needs to be configured as
a plugin dependency. Which it is, but that doesn't seem to affect the build
order. Configuring it as a dependency in two places in the pom doesn't seem
right.

I was looking at the source code for Continuum as well, but I haven't been
able to figure out quite how the ProjectDependencies list of a Project (in
org.apache.maven.continuum.model) gets populated - none of those classes
seems to be included in the Continuum source code, and I haven't yet found
out where they are.

/ Petter

> -----Original Message-----
> From: Wayne Fay [mailto:waynefay@gmail.com] 
> Sent: Monday, November 06, 2006 6:41 PM
> To: continuum-users@maven.apache.org
> Subject: Re: Project build order
> 
> 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 <petter.mahlen@jadestone.se> 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
> >
> >
> 
> 


Mime
View raw message