-
Feb 18th, 2010, 05:24 PM
#1
Fix for overriding abstract beans - 3.0.1
Heya,
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
#2
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
#3
Hi Marten
Thanks for the response!
When you say "spring maven repo", what is the URL? I've tried EBR, which is referenced here:
http://blog.springsource.com/2009/12...ts-with-maven/
and also you milestone repos, which is referenced here:
http://blog.springsource.com/2007/09...n-artifacts-2/
And in both cases I still get the error:
Missing:
----------
1) org.springframework:spring-context:jar:3.0.1.RELEASE
Here is my POM dependency:
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>3.0.1.RELEASE</version>
</dependency>
I notice that in my web browser when I hit maven central repo this morning, 3.0.1.RELEASE is present:
http://repo2.maven.org/maven2/org/sp...3.0.1.RELEASE/
But yet neither from maven commandline nor from indexer in eclipse can I seem to access it.
-
Feb 19th, 2010, 10:39 AM
#4
here's the two repos entries I tried
<repository>
<id>spring-milestone</id>
<name>Spring Portfolio Milestone Repository</name>
<url>http://s3.amazonaws.com/maven.springframework.org/milestone</url>
</repository>
<repository>
<id>com.springsource.repository.bundles.external </id>
<name>EBR External Release Repository</name>
<url>http:// repository.springsource.com/maven/bundles/external</url>
</repository>
thanks,
jim
-
Feb 19th, 2010, 11:07 AM
#5
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.
sorry!
-
Feb 20th, 2010, 06:49 AM
#6
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).
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules