Re: inter project dependencies

Nicola Ken Barozzi <[email protected]>
Newsgroups gmane.comp.krysalis.devel,gmane.comp.krysalis.user
Organization Apache Software Foundation
Message-ID <[email protected]>
I am moving this to the dev list if you don't mind.

Unico Hommes wrote, On 19/03/2003 12.09:
> Nicola Ken Barozzi wrote:
> 
...
>>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?

Sorry I don't get it. If I do a dist of project B, I can use the thing 
that are in build/B/**, while the package of A is in build/A/**

Could you please explain again?

...
>>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@@ ?

Nope. This is what has to be done, in fact.

>>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. 

Simple, it's not set up ;-)

That's what needs to be done WRT the above proposal.

> 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?

IIRC in the RuperTask. That's why we need Ruper to be able to get the 
jar form the local dirs in the second case scenario.

So, recapping, you have basically two possibilities I see ATM:

a) when calling the Ant task on the dependent projects in CentipedeTask, 
also add a classpath with the jar specified in the Gump descriptor

b) Make Ruper able to get the local tasks by inspecting the gump descriptor.

Please don't hesitate to ask further clarifications to the dev list :-)

-- 
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.