I’ve got a main project where module A depends on a a .jar file created by the build for module B. While I’m in development, I’m modifying B regularly, then building B to create the library, then building A to use these changes.
Is there a way to point module A’s ivy file to the jar file my module B build creates? Given I’m iterating multiple times, I don’t want to check module B’s jar into ivy over and over. It’s also annoying to have to copy the jar into module A’s build directory structure after every module B build.
Actually, for me it’s worse, as I have about 4 modules in something of a dependency tree (A->B->CD). If it were just A and B I’d probably just live with it, but I’m getting sick of copying jar files around after the submodule builds and thought if there was a way to override the ivy file dependency line to look locally then that’d make life a lot simpler.
Pointing the Ivy dependency at your locally built module isn’t the way to solve this. Instead when you build module B publish it to your local Ivy repository. When you resolve your dependencies for module A it will pull down module B from your local repository.
From the Ivy docs on the local repository:
The Using Ivy in multiple projects environment documentation has an example
publish-localAnt task that you might find useful.