Yea you basically got it right.  However I was under the impression that
when you specify the "include" and "exclude" tags of the maven:reactor tag
it would 1) first find all project.xml files according to the fileset and
exclude the ones that match your exclude pattern and 2) work out which
projects to compile first based on the project.xml dependencies.

I think what you are asking for should be reasonable, however it's not in.

Suppose I have a single maven project and it requires the Log4J jar file and
some jar file called "projectB-1.0.jar".  All maven would do is try to
download the projectB artifact from the maven.repo.local, and if that failed
it would to go a remote repository.  If that failed the compile goal fails.

I think what you want is for Maven to recognize that the "projectB-1.0.jar"
is actually an artifact that can be produced by some other maven project,
and have it find that project.xml and compile/jar:install that jar into the
maven.repo.local repository.  How would maven know that projectB is an
artifact that can be produced on your system and not a normal one that can
be downloaded?  At this point I'm not sure.  I don't think that is in there.

Perhaps it's reasonable to say "Maven, compile the "buildA" project and if
it has any dependencies first look at the other project.xml files in this
fileset to see if any other project can build that artifact.  If not then go
to the repository."

Right now, if you use the maven:reactor does it build all projects (A, B, C,
D, E) even if you only want to build A and it's dependencies, in this case B
and C?  I guess it still builds D and E.  

> -----Original Message-----
> From: Hartin, Brian [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, October 01, 2003 2:13 PM
> To: 'Maven Users List'
> Subject: RE: Beginner's question about reactor
> 
> 
> If I understand correctly, you're suggesting that I create 
> main project with no dependencies, and for the case of 
> project A, a 'buildA' goal in the main project's maven.xml 
> file.  In that goal's reactor tag I would exclude projects 
> that A doesn't depend on.  I did try this approach, but rejected it
> because: 
> 
> a) A's dependency information is already in it's project XML 
> file.  It doesn't seem right to express it yet again in a 
> 'fake' main project's build file.
> b) If A depends on B and C, shouldn't A's build be ignorant 
> of what B and C depend on, and defer to their project.xml 
> files for that?  If so, then we can't exclude anything in the 
> 'buildA' tag.
> 
> I wonder if there's a way to write a maven.xml file for 
> project A that will build project A, and everything in its 
> dependency graph, in the proper order.  The only problem 
> seems to be that Maven can't get past the fact that A has 
> dependencies, so the reactor never does its work.  I wonder 
> why this is?  It would seem trivial to ignore the 
> dependencies until after the reactor has done its thing.
> 
> Any ideas?
> 
> -----Original Message-----
> From: Steve Garcia [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, October 01, 2003 3:52 PM
> To: 'Maven Users List'
> Subject: RE: Beginner's question about reactor
> 
> 
> Hi Brian - the way I used Maven reactor is similar to the way 
> you have it. I have a few sub projects and the main project 
> is just a shell which executes the sub projects.  Based on 
> the dependencies, the sub projects are executed in the right 
> order (that is so cool).
> 
> In your case I'm not sure if you can specify more filters in 
> your reactor tag for includes and excludes to get only the 
> projects you want done.  Say if you have 5 projects (A, B, C, 
> D, E) and project A depends on artifacts from B, and C, in 
> your outer maven empty project I think you can write the 
> maven:reactor tag to point to project A, and exclude any 
> project.xml's found in the path to project D and E.  I 
> haven't tried that myself but it's worth trying.
> 
> Hope this helps, Steve
> 
> > -----Original Message-----
> > From: Hartin, Brian [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, October 01, 2003 1:46 PM
> > To: '[EMAIL PROTECTED]'
> > Subject: Beginner's question about reactor
> > 
> > 
> > I've just started using Maven and I'm having trouble with
> > multiproject builds using reactor.  Suppose I don't have a 
> > main project with subprojects, but rather a set of projects 
> > and dependencies between them, and I want to be able to build 
> > a particular project, recursively building its dependencies 
> > if necessary?  The examples I've seen have all assumed that 
> > we have a 'main' project, with no dependencies in its 
> > project.xml file, and that it's got a goal in maven.xml which 
> > uses the reactor to build all its subprojects in the correct order.
> > 
> > Can this be accomplished?
> > 
> > Thanks,
> > 
> > Brian Hartin
> > NCS Pearson
> > Iowa City, IA
> > USA
> > 
> > "A ship in harbor is safe, but that is not what ships are
> > built for." - John Shedd
> > 
> http://www.digitalconsumer.org/bill.html
> 
> **************************************************************
> **************
> 
> This email may contain confidential material. 
> If you were not an intended recipient, 
> Please notify the sender and delete all copies. 
> We may monitor email to and from our network. 
> **************************************************************
> **************
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> **************************************************************
> ************** 
> This email may contain confidential material. 
> If you were not an intended recipient, 
> Please notify the sender and delete all copies. 
> We may monitor email to and from our network. 
> **************************************************************
> **************
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


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

Reply via email to