Berin Loritsch wrote:
why do you need to copy source files? Do the tools/ need access to container/ sourcefiles at runtime?
Yes. THe tools make use of the util/dag/** stuff as well as the util/Service class and the impl/roles/ServiceMetaManager for various aspects.
ok, I get the problem now. What we have, in fact, is a circular dependency between fortress-container and fortress-tools, because the tests for fortress-container utilise the metainfo task provided by fortress-tools, and fortress-tools utilizes classes from fortress-container.
---
Your solution to the problem is
1) duplicate the classes fortress-tools needs from fortress-container, ie, copying them, at buildtime, before compiling
I would prefer to just include the precompiled classes--but they are definitely required *at run-time*.
A few more options:
2) don't use the metainfo task in the fortress-container tests, breaking the loop and removing the dependency on fortress-tools, generating a convenience 'fortress-tools-complete.jar' containing the required materials from fortress-container.jar (or maybe everything from fortress-container-complete, for convenience)
:/ No, Tools should only have the classes that are necessary.
3) seperate out the code that the tools need into a new (mini-)subproject, fortress-util (and/or perhaps a fortress-meta)
That is an option. Both tools and container can use it.... as well as any IDE plugins.... Hmmm. It should be something where we include the compiled classes from the JAR in both cases.
4) make fortress-container generate a jar that contains sourcefiles, and fetch and unpack that from fortress-tools
That's not much better than what I have.
---
my preference is probably #2, because it seems the cleanest conceptually: unit tests should not depend on dependencies of what they are testing, and having a subproject for three classes is ugly.
That can be part of the solution.
Regardless of all that, I think for the gump build it is cleanest to not modify the ant buildfile but just have inherit="runtime" for dependencies on fortress-tools. This does not require buildfile customization and is consistent with how this works for other build projects (like ant).
cheers!
Let's leave it alone for tonight.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
