multiproject of multiprojects site generation - infinite loop

2005-05-31 Thread Julian C. Dunn
I know (from reading the list archives) that the Multiproject plugin
doesn't support multiproject nesting. From my understanding if one has a
project structure like:

projectA
  \
    projectB
\
 - projectC1
 |
 - projectC2

and you try to run maven multiproject:site from projectA, it will
invoke maven site in projectB instead of maven multiproject:site.

So I tried to override projectB's site goal in the maven.xml with this:

  goal name=site
attainGoal name=multiproject:site/
  /goal

However, this causes an infinite loop. This is an example of the
transcript:

Starting the reactor...
Our processing order:
projectB1
projectB2
+
| Generating site for  projectB1
| Memory: 3M/4M
+

multiproject:site-init:

multiproject:site:
build:start:

site:
.
.
.
multiproject:projects-init:
[echo] Gathering project list
Starting the reactor...
Our processing order:
projectC1
projectC2
+
| Generating site for  projectC1
| Memory: 16M/24M
+

multiproject:site-init:

multiproject:site:
build:start:
.
.
.
+
| Generating site for  projectC2
| Memory: 30M/36M
+
.
.
.
build:end:

[echo] Now building reactor projects: [projectC1, projectC2]
.
.
Our processing order:
projectC1
projectC2


and over and over.

Is there any way to get this to work?

- Julian

-- 
-- Julian C. Dunn, B.A.Sc, P.Eng.  [EMAIL PROTECTED]
-- Platform Administrator, CBC.ca Production  Operations
-- Office: 2C310-Q  *  Tel.: (416) 205-3311 x5592


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



Re: multiproject of multiprojects site generation - infinite loop

2005-05-31 Thread Kenney Westerhof

On Tue, 31 May 2005, Julian C. Dunn wrote:

I don't see any loop there, but I guess the next step would be that c1
gets built again.

The problem here is that C1 and C2 inherit B's settings, so
the site goal there is actually the site goal from B, which calls
multiproject:site. You should wither override the site
goal again in C1 and C2 to just attainGoal site:site, or
add a check to B's site goal to see if it's being called on B (or on a
subproject). I don't know if the first solution will work, though.

-- Greetings,
Kenney


 I know (from reading the list archives) that the Multiproject plugin
 doesn't support multiproject nesting. From my understanding if one has a
 project structure like:

 projectA
   \
 projectB
 \
  - projectC1
  |
  - projectC2

 and you try to run maven multiproject:site from projectA, it will
 invoke maven site in projectB instead of maven multiproject:site.

 So I tried to override projectB's site goal in the maven.xml with this:

   goal name=site
 attainGoal name=multiproject:site/
   /goal

 However, this causes an infinite loop. This is an example of the
 transcript:

 Starting the reactor...
 Our processing order:
 projectB1
 projectB2
 +
 | Generating site for  projectB1
 | Memory: 3M/4M
 +

 multiproject:site-init:

 multiproject:site:
 build:start:

 site:
 .
 .
 .
 multiproject:projects-init:
 [echo] Gathering project list
 Starting the reactor...
 Our processing order:
 projectC1
 projectC2
 +
 | Generating site for  projectC1
 | Memory: 16M/24M
 +

 multiproject:site-init:

 multiproject:site:
 build:start:
 .
 .
 .
 +
 | Generating site for  projectC2
 | Memory: 30M/36M
 +
 .
 .
 .
 build:end:

 [echo] Now building reactor projects: [projectC1, projectC2]
 .
 .
 Our processing order:
 projectC1
 projectC2


 and over and over.

 Is there any way to get this to work?

 - Julian

 --
 -- Julian C. Dunn, B.A.Sc, P.Eng.  [EMAIL PROTECTED]
 -- Platform Administrator, CBC.ca Production  Operations
 -- Office: 2C310-Q  *  Tel.: (416) 205-3311 x5592


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


--
Kenney Westerhof
http://www.neonics.com
GPG public key: http://www.gods.nl/~forge/kenneyw.key

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



Re: multiproject of multiprojects

2004-11-29 Thread Christian Mouttet
Hi Dominik,

this is the code fragment I use to clean multi projects.

maven.xml of the main project:

  util:available file=${maven.multiproject.basedir}
j:set var=multiproject.exists value=true/
  /util:available
  
  postGoal name=clean
j:if test=${context.getVariable('multiproject.exists')}
  j:set var=goal value=clean/
  attainGoal name=multiproject:goal/
/j:if
  /postGoal

Only the main project sets maven.multiproject.basedir in project.properties. 
If the 'clean' goal of main project is called all subprojects are also 
cleaned.

Don't know if this is the best way to go -- but it's working.

-Chris

On Saturday 27 November 2004 16:05, Dominik Dahlem wrote:
 Hi all,

 I've been thinking about how to support a multiproject of multiprojects
 and couldn't find a working solution to it. I'm facing two problems:
 (1) If I could find out whether a project is a multiproject or not, it
 would be possible to just delegate the original command (e.g.
 multiproject:goal -Dgoal=test) to the multiproject. Otherwise, maven
 test on a normal project. Are there mechanisms in maven which allow to
 do that?
 (2) If I overwrite the site goal in maven.xml of the multiproject to
 attain the site goal on each of its components the components themselves
 would inherit the overwritten site goal which ends up in an infinite
 build loop.

 Any help is appreciated.
 Thanks,
 Dominik

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



Re: multiproject of multiprojects

2004-11-29 Thread Dominik Dahlem
Hi Chris,

thanks for your advice. As long as there are no native mechanisms
implemented in maven your way looks like a feasible solution to me.
It'll bring me closer to what I'm trying to achieve.

Cheers,
Dominik



On Mon, 2004-11-29 at 09:29 +0100, Christian Mouttet wrote:
 Don't know if this is the best way to go -- but it's working.
 
 -Chris
 
-- 
Dominik Dahlem [EMAIL PROTECTED]
---
Trinity College Dublin
Department of Computer Science,
Dublin 2, Ireland

tel: (+353) 1-608 1539
fax: (+353) 1-677 2204
www: http://www.cs.tcd.ie/Dominik.Dahlem/
---


signature.asc
Description: This is a digitally signed message part


Re: multiproject of multiprojects

2004-11-29 Thread Dominik Dahlem
Hi Michal,

I'm working at the moment on a maven 1.1 snapshot. It would be nice to
have this feature available in maven 1.1. I'll keep my eyes open to when
it is going to be introduced in maven 1.1.

Thanks,
Dominik


On Sun, 2004-11-28 at 16:03 -0800, Michal Maczka wrote:
 The indicator if project is multiproject exists in m2 and will be
 most 
 likely introduced in maven 1.1
 This will be implemented by addition of  the new tag in the POM named 
 type.
-- 
Dominik Dahlem [EMAIL PROTECTED]
---
Trinity College Dublin
Department of Computer Science,
Dublin 2, Ireland

tel: (+353) 1-608 1539
fax: (+353) 1-677 2204
www: http://www.cs.tcd.ie/Dominik.Dahlem/
---


signature.asc
Description: This is a digitally signed message part


Re: multiproject of multiprojects

2004-11-28 Thread Michal Maczka
Dominik Dahlem wrote:
Hi all,
I've been thinking about how to support a multiproject of multiprojects
and couldn't find a working solution to it. I'm facing two problems:
(1) If I could find out whether a project is a multiproject or not, it
would be possible to just delegate the original command (e.g.
multiproject:goal -Dgoal=test) to the multiproject. Otherwise, maven
test on a normal project. Are there mechanisms in maven which allow to
do that?
 

The indicator if project is multiproject exists in m2 and will be most 
likely introduced in maven 1.1
This will be implemented by addition of  the new tag in the POM named 
type.

At the moment some plugins are using maven.multiproject.type property 
of multiproject plugin.
But this is not a good thing - but unfortunately the best which 
curenntly exists.

(2) If I overwrite the site goal in maven.xml of the multiproject to
attain the site goal on each of its components the components themselves
would inherit the overwritten site goal which ends up in an infinite
build loop.
 

I will try to fix this particular problem pretty soon (requires minor 
changes in site and multiproject plugins)
But we will need to define common contract which needs to be implemented 
by plugins in case of multiprojects goal.
Possibly this contract can be partially built in into core so for 
example delegation to given goal/plugin
may be sensitive to project's type.

Michal
--
Startuj z INTERIA.PL!!!  http://link.interia.pl/f1837
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


multiproject of multiprojects

2004-11-27 Thread Dominik Dahlem
Hi all,

I've been thinking about how to support a multiproject of multiprojects
and couldn't find a working solution to it. I'm facing two problems:
(1) If I could find out whether a project is a multiproject or not, it
would be possible to just delegate the original command (e.g.
multiproject:goal -Dgoal=test) to the multiproject. Otherwise, maven
test on a normal project. Are there mechanisms in maven which allow to
do that?
(2) If I overwrite the site goal in maven.xml of the multiproject to
attain the site goal on each of its components the components themselves
would inherit the overwritten site goal which ends up in an infinite
build loop.

Any help is appreciated.
Thanks,
Dominik


-- 
Dominik Dahlem [EMAIL PROTECTED]
---
Trinity College Dublin
Department of Computer Science,
Dublin 2, Ireland

tel: (+353) 1-608 1539
fax: (+353) 1-677 2204
www: http://www.cs.tcd.ie/Dominik.Dahlem/
---


signature.asc
Description: This is a digitally signed message part