I am using latest IDEA which supplies maven 3.6.3.

No version ranges.

My interpretation of 
https://maven.apache.org/guides/mini/guide-multiple-repositories.html#repository-order
says that maven central is always first.

--

About Maven Central: Many years ago I did submit some tools of mine to maven 
central. That was a truly painful experience. I wrote a mail to this mailing 
list about it where I suggested that it would be greatly beneficial  to 
everyone if the procedure to get artifacts to maven central was an easy one. I 
only got one reply and that was from jbarush at JFrog who asked if I was aware 
of Bintray. Bintray showed how easy and trivial this really should be. I think 
they set a standard there.  

I recently googled about releasing to maven central thinking that it might have 
improved, and it has, but not enough.

JFrog offered free Artifactory account for open source. Artifactory also needs 
its own repository and URL, there is no common like JCenter as far as I have 
been able to determine. Thereby it doesn't offer more than my web server does. 
And pushing to my web server is 100% painless. It does not waste my time in any 
way, and I value my time. What I'm doing on GitHub is partly for personal 
need/want, but mostly for fun, and then it should be fun all the way.

Don't misunderstand me. I'm a big fan of maven. Its only the maven central 
handling that I'm in disagreement with. 

/Tommy


Från: Anders Hammar <and...@hammar.net>
Svara: Maven Users List <users@maven.apache.org>
Datum: 22 april 2021 at 20:37:20
Till: Maven Users List <users@maven.apache.org>
Ämne:  Re: Scratching my head over repositories ...  

But it should work. At least as long as you specify the version.  
This is what we do when we create patched versions of external libraries.  
We publish them to our internal repo but with the "correct" groupId and  
artifactId, but a version that identifies it as patched (1.2-ISSUE123  
e.g.). I admit it's been a while since we did it the last time, but it  
worked then.  

But if you're using version ranges (or even LATEST) it might not work. But  
that's a bad pattern in any case.  

/Anders  

On Thu, Apr 22, 2021 at 6:38 PM Tamás Cservenák <ta...@cservenak.net> wrote:  

> Howdy Tommy,  
>  
> I think you are on a thin ice with this setup: if your artifacts are in  
> Central, why not publish them in future as well?  
>  
> Having your "own" repo, while it seems cool at first glance, is usually NOT  
> what you want, unless you can guarantee reliability, availability and speed  
> of that of Central (or let's say 1/3 of it).  
> Moreover, bringing your own repo with overlapping GAVs to Central is a big  
> mistake, you are booby-trapping your users: they will always struggle just  
> like you now, and it just complicate their bootstrap and development setup.  
>  
> So, IMO, bite the bullet, and continue publishing to Central. Yes, is a  
> process, is slow and has many problems, but is still the best way to go. At  
> least for your users.  
>  
> HTH,  
> T  
>  
> On Thu, Apr 22, 2021 at 6:24 PM Tommy Svensson <to...@natusoft.se> 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  
> >  
> >  
>  

Reply via email to