Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aether-users] Disabling artifact installation to local-repo?

Hi all,

I'm working on a Clojure IDE which uses Leiningen, a Clojure build tool, which uses Aether under the hood. The IDE resolves the Leiningen artifacts and then adds their dependencies as libraries to the project. I'm trying to develop some functionality to help users work with projects containing multiple interdependent Leiningen artifacts (each of which is an Aether artifact) without having to have them compiled and installed into their local repo.

In order to do this, I'm deploying fake artifacts from the project (empty jars) to a temporary repository on the file system. I then put the temporary repository first in the list of repositories I pass to Aether, and everything resolves correctly. The fact that the jars for the artifacts from the project are fake doesn't matter, since I trim them out and don't add libraries for them.

The one issue I can't solve is that when artifacts are resolved from the temporary repository, they're cached in the local ~/.m2 repository. Is there any way to disable this for a particular repo or for particular artifacts? Or can I set up multiple local repositories such that writes go to the first (temporary) one but reads pass through to the second (~/.m2) one?

Thanks for any advice,
Colin



Back to the top