RE: inter project dependencies
"Unico Hommes" <[email protected]>
| Newsgroups | gmane.comp.krysalis.user |
|---|---|
| Message-ID | <[email protected]> |
Nicola Ken Barozzi wrote:
>
> 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.
I did see that, yes it works.
> 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.
But imagine wanting to have gump do a full 'dist' on project B, I wouldn't want a 'package' in project A to result in a full 'dist' on project B. Perhaps it would be better not to use the gump tag for these dependencies, but just always call package?
> 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
Sounds good. Is that syntax understood by centipede: @@date@@ ?
> 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? :-)
Well, I would like to help out but Centipede isn't directly clear to me. I checked out krysalis-ant-tasks and started reading CentipedeTask. One thing that is not yet clear to me is how and where the compilation classpath is being set up. java-cent is refering to ${project.name}.classpath and I did find a path declaration bearing that name in ${project.name}.getdepend.xml but is it correct?:
<path id="ecm-catalina.classpath">
<path refid="lib.classpath"/>
<fileset dir=".">
<include name="${lib.dir}/**/*.jar"/>
</fileset>
</path>
where ${lib.dir} points to ./lib . I couldn't locate where lib.classpath is defined though. Any pointers?
Regards,
U.
-------------------------------------------------------
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