I think you should be able to define your repo to take precedence over
Maven Central.

>From documentation
<https://maven.apache.org/guides/mini/guide-multiple-repositories.html#repository-order>

Remote repository URLs are queried in the following order for
artifacts until one returns a valid result:
1. effective settings:
1A. Global settings.xml
1B. User settings.xml
2. local effective build POM:
2A. Local pom.xml
2B. Parent POMs, recursively
2C. Super POM
3. effective POMs from dependency path to the artifact.

On Thu, 22 Apr 2021 at 09:24, Tommy Svensson <[email protected]> wrote:
>
> Hello fellow maven fans,
>
> A very long time ago I released a package to maven central. That was such a 
> pain that when Bintray came I  switched to Bintray (the best and simplest 
> service I've ever used! Really sad to see it gone). Now that Bintray is no 
> more I realized that I can publish my packages on my own web server and point 
> it out as a repository in pom. So far so good.
>
> I'm now having a problem building a maven project using one of my own tools: 
> CodeLicenseManager. I'm using version 2.2.1 which is available in my web 
> server repository. But maven still fails to find this dependency. It finds 
> the others in the same repo without any problem, but not this.
>
> I have come to the realisation that this is because CodeLicenceManager also 
> exists in maven central, but latest version there is 2.1.1 and I'm asking for 
> 2.2.1. But since maven is finding CodeLincenseManager in maven central, it is 
> not looking at other repos for this version.
>
> So now my question is: Is there a way to force maven  to look in all repos 
> when version is not available but artifact is ? Or is the only way out of 
> this to change the name or group of the artifact ?
>
> Best Regards,
> Tommy Svensson
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to