Re: inter project dependencies

Nicola Ken Barozzi <[email protected]>
Newsgroups gmane.comp.krysalis.user
Organization Apache Software Foundation
Message-ID <[email protected]>
Unico Hommes wrote, On 18/03/2003 12.13:
...
> module.xml looks something like:
> 
> <module>
> ...
>   <project name="A">
>     ...
>     <depend project="B" />
>   </project>
> 
>   <project name="B">
>     <ant target="package" />
>     ...
>   </project>
> 
> </module>
> 
> What can I do to have project B's classes added to project A's compilation path? Previously I had gotten that working with a change I made to makeclasspath.xsl but that approach seems to have been abandoned in the most recent centipede.
> 
> Should I declare another repository in module.xml and reference that in the depend tag? Will the ant target declared in project B get called when project B is declared to be a dependency on A?

Ok, well let me see if I can get it straight...

The automatic dependency resolution of the dependency builds should 
work. So now if you call for project A, project B should be compiled first.

The only thing that is lacking still, as you correctly point out, is the 
classes of the other build result.

Now, we want to remain near to Gump ways as much as possible. So Gump 
defines dependencies by looking in the <jar> tage of the dependent project.

In the above case, I should have:

    <project name="A">
      ...
      <depend project="B" />

    </project>

    <project name="B">
      <ant target="package" />
      <jar name="b.jar"/>
    </project>

So that when centiepede needs to set the classpath for A, it should look 
in B for the jar tags, and set thost on the classpath.

The problem is that now we use jars that have the dev, beta, or whatever 
tags, but Gump doesn't know about them.

So we should make the java cent output jars as

   jarname-date.jar

without the dev-beta-etc parts, and Gump uses this syntax which w should 
follow:

      <jar name="b-@@DATE@@.jar"/>

So the thing should be:

1-

    <project name="A">
      ...
      <depend project="B" />

    </project>

    <project name="B">
      <ant target="package" />
      <jar name="b-@@DATE@@.jar"/>
    </project>

2- Centipede outputs b-20030101.jar

3- the CentipedeTask adds the correct jars to the classpath when calling 
projects that have a dependency

So this was the basic idea, but... it's not finished... by doing this in 
the Centipede task, we put all the code there.

For a first implementation it will do, but as you have pointed out, we 
can do this to some extent in other parts of Centiepde, like 
makeclasspath. The problem is that now Ruper has no info about Gump 
xmls, nor should it.

So what we should do, is add to Ruper the possibility of getting 
'snapshot' jars that have been compiled locally, or something like that.

Anyway, this seems more difficult, and can be done later.

Anyone up for the task? :-)

-- 
Nicola Ken Barozzi                   [email protected]
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------



-------------------------------------------------------
This SF.net email is sponsored by: Does your code think in ink? 
You could win a Tablet PC. Get a free Tablet PC hat just for playing. 
What are you waiting for?
http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.