Hi Manfred,
Thanks for the reply. I cannot do as you suggest because I don't control the artifacts.
As I mentioned in my previous mail, I'm working on Cursive, an IDE for working with Clojure code based on IntelliJ. When Cursive users open a Leiningen project, I call lein for each module (which corresponds to a lein/Maven/Aether artifact) to resolve its dependencies via Aether and attach the artifacts from those dependencies to the module as libraries so that symbol resolution works correctly. This all works fine in simple cases.
However in more complex projects, they are generally made up of multiple lein/Maven modules with dependencies between them. If the user opens one of these projects for the first time before compiling it, the resolution will fail for the modules which depend on other modules from the project because the dependencies are not installed in the local repo yet and may not be published anywhere public. Since the resolution fails, Cursive cannot attach any libraries to the modules and nothing works in the IDE.
In addition to the on-first-open use case, when working with these projects it's useful for the IDE to be able to resolve modified code across modules without requiring the user to continually compile and install the dependent modules into their local repo. I do this by adding dependencies between the IntelliJ modules and removing the library dependencies for the inter-module dependencies within the project.
Currently I achieve all this by fiddling with the project.clj (lein's equivalent to a pom) before calling into lein. I collect all the project.clj files for the whole project, work out the dependencies between them and remove those dependencies from the project.clj files before passing them to lein. However this has subtle side effects, mostly that occasionally the incorrect version of a dependency will be attached - I assume this is due to slightly different versions of dependencies coming out of the transitive dependency calculations with some of the dependencies removed. I'd like to avoid this, and the temporary repository solution I described seems like a cleaner solution to this.