How could ivy support publishing artifacts of projects in multiple phases?
Suppose we had project A and B. A depends on B's models while B depends on A's models. (Usually the circular dependence isn't that direct, but the example serves. Our projects are relatively loosely coupled, sending messages to each other via the models) The models themselves don't depend on anything, so I can easy build those artifacts. However, while I can build moduleA-models.jar, I cannot build moduleA.jar until I get moduleB-models.jar. (And.. of course, visa-versa with module B.)
So I'm thinking a 2 phase publishing effort. I'm doing exactly that. I have an ant target that builds the models and then publishes the 'model' ivy conf. I run through all the projects building/publishing the models. I then go back and start building the rest of the project code. Note that 'going back and building the rest of the project code' implies a new publishing call... this time with all the artifacts, not just the model artifact.
However ivy is.. mildly unhappy with it. For example, it sometimes sees module A's 'published' ivy.xml with just the model jar, and then might find out later there's an updated ivy.xml for module A that has model and non-model jars in it. By and large I can get around that with 'changing="true"' dependency flag.
However, lately even that just fails for me and ivy is trying to build projects out of order and thus failing. Also I occasionally get into trouble about a missing version of a project (due again to the fact that it's seeing two different versions of a project's ivy.xml within the same build cycle).
So what's the recommended approach here? Separate ivy projects (in the same file structure) perhaps?