Results 1 to 8 of 8

Thread: Fix for overriding abstract beans - 3.0.1

Hybrid View

  1. #1
    Join Date
    Jun 2007
    Posts
    6

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

  2. #2
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,625

    Default

    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.
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

  3. #3
    Join Date
    Jun 2007
    Posts
    6

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

  4. #4
    Join Date
    Jun 2007
    Posts
    6

    Default 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

  5. #5
    Join Date
    Jun 2007
    Posts
    6

    Default 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!

  6. #6
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,625

    Default

    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).
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •