Is there any possibility to use local Maven repository (~/.m2) as local Ivy cache (~/.ivy)? They have different layouts.
Sometimes I use Maven and sometimes I use SBT which uses Ivy underneath, so I have 2 copies of same libs in both Maven and Ivy. I would like to use same dir thus saving disk space and network.
Thanks.
Clearing the Ivy cache The Ivy cache can become corrupted, especially when using the http type in the repositories section of conf/dependencies. yml . If this happens, and dependency resolution does not work, you can clear the cache with the --clearcache option. This is equivalent to rm -r ~/.
The first place that Maven looks for artifacts is in the local repository, which is the local cache where Maven stores all of the artifacts it has downloaded or found elsewhere. The default location of the local repository is the . m2/repository/ directory under the user's home directory.
ivy2/local while the cache of downloaded dependencies/libraries is under ~/. ivy2/cache . Play now uses the default ivy cache and repository, in the . ivy2 folder in the users home directory.
To save network, just configure ivy to use local Maven repository
<property name="local-maven2-dir" value="${user.home}/.m2/repository/" /> <filesystem name="local-maven-2" m2compatible="true"> <artifact pattern="${local-maven2-dir}/[organisation]/[module]/[revision]/[module]-[revision].[ext]" /> <ivy pattern="${local-maven2-dir}/[organisation]/[module]/[revision]/[module]-[revision].pom" /> </filesystem>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With