I would like developers to be able to locally override the dependencies they get from the repository with modules they have built themselves. Below are my use case descriptions:
Use Case 1: Let's say I have modules A, B, and C such that A depends on B which depends on C. A developer needs to do some work in modules B and C. He has checked out sandboxes for both modules B and C. He makes his changes to C in his local sandbox. Before checking it into the source repository, he wants to make his changes to B and test against his changes to C. So he publishes his locally built C module to a private repository locally on his machine. He then switches to working on B. He runs a resolve/retrieve. His friendly CM guy has already configured his ivy settings file to look first in the private local repository using a chain resolver with returnFirst="true". With these settings and a dependency revision of "latest", he will successfully pick up his locally published C for use with his changes in B. He then can feel confident everything will work together and checks in changes to both B and C. Everybody is happy. Use Case 2: Now let's say that a different developer wants to do the same workflow but he is working in modules A and C instead of B and C. Just like the other developer he publishes his changes to C locally to a private repo. However, when he does a resolve/retrieve from A, it does NOT pick up the private copy of C in the local repo. This is because A uses the "latest" rule to get B which it find in the public repository. Then IVY looks up C transitively by using the specific revision of C that was used to build the revision of B already found. Since this specific revision of C is used in the lookup, it won't find the private local C since who know what revision number it has. How can I fix Use Case 2 to work as elegantly as Use Case 1? The new resolveMode feature is perfect for this problem. If the developer in Use Case 2, changed the ivy settings file and added a module override to set resolveMode="dynamic", everything would work perfectly and the private local C would be found. However, that is an extra step for the developer and he has to know all about ivy settings files. I am trying to hide all of that from developers since most of them don't want to learn. I added a special publish.local ANT target so that any developer could run it and publish locally to his own private repo. I wouldn't want him to also go into the ivy settings file and manually add the resolveMode override too. How could I make this more automatic with the ANT build file? One idea I have is to use a variable in the resolveMode setting so that I could change its value and, therefore, the resolve behavior with an ANT property. Then inside my ANT build file just before the resolve/retrieve task, I could scan the private repo looking for modules that have been published there and set the ANT properties to "dynamic" for each module I find. I don't know if this would work, but it suffers from requiring me to add a module override with a resolveMode variable setting for EVERY module that exists. That is a pain and requires updating everytime a new module gets created. Any suggestions? I use this workflow all the time when I need to make changes that span multiple modules. I want to test all my changes to all modules together before checking in anything. --- Shawn Castrianni ---------------------------------------------------------------------- This e-mail, including any attached files, may contain confidential and privileged information for the sole use of the intended recipient. Any review, use, distribution, or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive information for the intended recipient), please contact the sender by reply e-mail and delete all copies of this message.
