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).