简体   繁体   中英

maven Local Repo version artifactory

How to differentiate between jars of same version present in local maven repo and artifactory.

Say for example sample-1.0.jar is present in local maven repository and also the same resides in artifactory but with latest code.

I need the jar(with latest code) from artifactory during maven build.(without clearing the local repo)

Please try with -U command while making the build. This is for force updating the local repo. this may help you

There is no way you can do it. That's because the assumption is - you shouldn't have two different binaries under the same version (except of snapshots). Both Maven and Artifactory operate under this assumption and there is no way to override it.

Bottom line:

  1. Don't have different binaries under same version.
  2. the only way is to clean local repo (you might of a maven plugin to do that if you can't fix the problem with conflicting binaries).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM