Feb 18th, 2010, 05:24 PM
Fix for overriding abstract beans - 3.0.1
I have a simple abstract app config class, with a concrete subclass that overrides an abstract bean definition. This was done following an example someone had written up, but probably dates back to when JavaConfig was a separate project.
Using Spring 3.0.0.RELEASE, when I do this I get an error: config has 2 overloaded factory methods of name...
I found that this was documented as a bug, and fixed in release 3.0.1 of spring. According to the spring download page, 3.0.1 is the latest production release. If that is the case, why is it not in maven central repository? Only 3.0.0.RELEASE exists there.
I can avoid this problem by using composition instead of inheritance (@import), but figured I'd ask what the deal is. If 3.01. is very recent maybe it's just not been put on the central repo yet.
Feb 19th, 2010, 01:17 AM
It can take a while for artifacts to show up in the central repo, as Spring 3.0.1 was released shortly ago. You can add the spring maven repo that way you can always have fast access to new releases, instead of waiting for it to show up in the central repo.
Feb 19th, 2010, 10:32 AM
Thanks for the response!
When you say "spring maven repo", what is the URL? I've tried EBR, which is referenced here:
and also you milestone repos, which is referenced here:
And in both cases I still get the error:
Here is my POM dependency:
I notice that in my web browser when I hit maven central repo this morning, 3.0.1.RELEASE is present:
But yet neither from maven commandline nor from indexer in eclipse can I seem to access it.
Feb 19th, 2010, 10:39 AM
here's the two repos entries I tried
<name>Spring Portfolio Milestone Repository</name>
<name>EBR External Release Repository</name>
Feb 19th, 2010, 11:07 AM
OK, got it
Actually repo1 worked.
I think my issue is that we are using nexus at my company, and it is not reflecting the most recent additions to repo1. If I add repo1 or 2 directly to my pom and don't proxy through nexus, was able to download.
Feb 20th, 2010, 06:49 AM
You use neither, as the names imho clearly state.
snapshot - nightly builds/snapshots
milestone - milestone and candidate releases
release - release builds
external - external dependencies
Next to that if you use the EBR instead of the maven repo you get OSGi bundles and the naming convention is different, so trying to use the default maven naming for EBR isn't going to work (which is also explained in the blog you read).
Feb 20th, 2010, 05:02 PM
I'm good to go now
Thanks. Have the release and it fixes the bug.
However, this page:
states that your "release repository" is:
"For any final release (Spring 2.5, Spring Web Flow 2.0, etc.) the Maven artifacts for that release will be uploaded to the Maven Central repository (http://repo1.maven.org/maven2). Using this repository requires no effort on your part as Maven will automatically look for artifacts there."
This is in fact precisely the place where 3.0.1.R was not present when I originally posted ;-). The day after my post it was uploaded there, thanks. If you were referring to a different repository where your release versions can be obtained before someone gets around to putting them on maven central, I don't see that URL described anywhere on that page.
Feb 21st, 2010, 05:57 AM
The blog you refer to is the old one this is the correct one, things change in 2 years .
The central maven repo lags behind in comparision to the spring release repo, because first it is published to the spring release repo and later this syncs with the central maven repo. So it can take 24/48 hours to catch up. if next to that you use an internal repo which syncs with the central one it can take 24/48 hours extra to be available.