Announcement Announcement Module
Collapse

Spring Dynamic Modules forum decommissioned in favor of Eclipse Gemini Blueprint

With the official first release of Eclipse Gemini Blueprint shipped, the migration of the Spring Dynamic Modules code base to the Eclipse Foundation, as part of the Gemini project, has been completed.

As such, this forum has been decommissioned in favour of the Eclipse Gemini forums.
See more
See less
OsgiTests and Spring 2.5.5 dependencies problem Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • OsgiTests and Spring 2.5.5 dependencies problem

    Hi,
    I have been using ivy to manage our builds and it works fine however now I would also like to move over to using AbstractConfigurableBundleCreatorTests and using ivy to manage and run these. It does not make sense for me to use maven here as ivy is already in place for builds and is working fine.

    I created some new classes (modelled on the maven ones) LocalFileSystemIvyRepository / IvyPackagedArtifactFinder (these work fine and get all the relevant dependencies) - I put them in by overriding the method "ArtifactLocator getLocator()" in our testcase which extends AbstractConfigurableBundleCreatorTests. And this seems to work fine as well.

    I needed to add some dependencies to the ivy.xml in order to run the tests (and these are much like the ones discussed for maven in the forum) and this seems to work fine as well. ivy finds them and downloads to the cache.

    <dependency org="org.springframework.osgi" name="org.springframework.osgi.extender" rev="${org.springframework.osgi.test}" conf="test->runtime" />
    <dependency org="org.springframework.osgi" name="org.springframework.osgi.test" rev="${org.springframework.osgi.test}" conf="test->runtime" />

    <!-- Logging -->
    <dependency org="org.slf4j" name="com.springsource.slf4j.api" rev="${org.slf4j}" conf="test->runtime" />
    <dependency org="org.slf4j" name="com.springsource.slf4j.log4j" rev="${org.slf4j}" conf="test->runtime" />
    <dependency org="org.slf4j" name="com.springsource.slf4j.org.apache.commons.lo gging" rev="${org.slf4j}" conf="test->runtime" />
    <dependency org="org.eclipse.osgi" name="org.eclipse.osgi" rev="3.5.0.v20081201-1815" />

    The problem is as the test case is started :

    [junit] ------------- Standard Output ---------------
    [junit] main INFO [org.tssg.network.stack.bundle_a.test.SimpleOsgiTes t] - Equinox OSGi Platform [3.5.0.v20081201-1815] started
    :
    :
    [junit] Testcase: testOsgiPlatformStarts(org.tssg.network.stack.bund le_a.test.SimpleOsgiTest): Caused an ERROR
    [junit] /home/pphelan/local/dump/prototype/projects/ivy-cache/repository/org.springframework/spring-aop/2.5.5/spring-aop-2.5.5.jar (No such file or directory)
    [junit] java.io.FileNotFoundException: /home/pphelan/local/dump/prototype/projects/ivy-cache/repository/org.springframework/spring-aop/2.5.5/spring-aop-2.5.5.jar (No such file or directory)

    :

    Upon startup of OSGi it is looking for spring-aop-2.5.5.jar and ivy cannot resolve it. I have tried to explicity set the version I want but it is ignored and I tracked it back to the org.springframework.osgi.test-1.1.3.RELEASE.jar which in the MANIFEST.MF file is specifies Spring 2.5.5. This is the only place I have seen 2.5.5 as a version so I suspect it is coming from here.

    In the IVY.XML I have specified I am using Spring 2.5.6.A but this does not seem to be taken into consideration as it is satisfying the dependencies of the osgi test packages. This is fine - I have no problem with that.

    The problem I think is that I cannot satisfy a request for Spring packages versioned at 2.5.5 - these do not seem to be available on S3 - so ivy cannot download them. I added some debug into the new classes I created to find artifacts and OSGi is looking for versions 2.5.5 of these packages, see below.


    Can anyone help ? I am stuck and have been looking into this all day. Is there a repository I can get 2.5.5 versions of everything or is there a simpler fix that I am missing.

    ~Patsy

    [junit] main INFO [org.tssg.network.stack.bundle_a.test.LocalFileSyst emIvyRepository] - G: org.springframework A: spring-aop V: 2.5.5 T: jar
    [junit] main INFO [org.tssg.network.stack.bundle_a.test.LocalFileSyst emIvyRepository] - Local IVY_CACHE repository used: [/home/pphelan/local/dump/prototype/projects/ivy-cache]
    [junit] main INFO [org.tssg.network.stack.bundle_a.test.LocalFileSyst emIvyRepository] - G: org.springframework A: spring-beans V: 2.5.5 T: jar
    [junit] main INFO [org.tssg.network.stack.bundle_a.test.LocalFileSyst emIvyRepository] - Local IVY_CACHE repository used: [/home/pphelan/local/dump/prototype/projects/ivy-cache]
    [junit] main INFO [org.tssg.network.stack.bundle_a.test.LocalFileSyst emIvyRepository] - G: org.springframework A: spring-context V: 2.5.5 T: jar
    [junit] main INFO [org.tssg.network.stack.bundle_a.test.LocalFileSyst emIvyRepository] - Local IVY_CACHE repository used: [/home/pphelan/local/dump/prototype/projects/ivy-cache]
    [junit] main INFO [org.tssg.network.stack.bundle_a.test.LocalFileSyst emIvyRepository] - G: org.springframework A: spring-core V: 2.5.5 T: jar
    [junit] main INFO [org.tssg.network.stack.bundle_a.test.LocalFileSyst emIvyRepository] - Local IVY_CACHE repository used: [/home/pphelan/local/dump/prototype/projects/ivy-cache]
    [junit] main INFO [org.tssg.network.stack.bundle_a.test.LocalFileSyst emIvyRepository] - G: org.springframework A: spring-test V: 2.5.5 T: jar
    [junit] main INFO [org.tssg.network.stack.bundle_a.test.LocalFileSyst emIvyRepository] - Local IVY_CACHE repository used: [/home/pphelan/local/dump/prototype/projects/ivy-cache]

  • #2
    I was trying to use Spring DM too.

    Instead of using the IDE plugin I imported the plugins from the download. There were dependencies missing (much like you reported). In addition, I tried to pull in the samples but they had hardcoded paths to other dependencies.

    So I figured I would pull down Spring IDE and try using it that way. I need to use the 3.5 platform but the plugin is not compatible with that.


    Additionally, it also seems I still need to pull in the Spring jars. I would have thought that they would have been in a plugin.

    When my brain clears, I might try it again.

    Comment


    • #3
      this helped me a bunch - http://www.javaworld.com/javaworld/j...-04-osgi2.html

      I am missing the *.tx plugin but that URL is almost a year old.

      Comment


      • #4
        By default, the testing framework looks for its infrastructure jars based on the version of the jars it shipped against. You can customize that by overriding #getTestFrameworkBundles() or #getTestingFrameworkBundlesConfiguration(). The first one is more generic and allows you to define a custom Resource for each bundle while the latter returns a custom properties file with all the artifacts which are being resolved through the artifact locator.
        You can use either of them to override the infrastructure bundles.

        Comment


        • #5
          Instead of using the IDE plugin I imported the plugins from the download. There were dependencies missing (much like you reported). In addition, I tried to pull in the samples but they had hardcoded paths to other dependencies.
          What are the missing dependencies that you encountered? As explained in the docs (http://static.springframework.org/os...tegration.html) you need to run once, at the beginning, the maven task (mvn install) since the plugin only defines the platform target but it's you that needs to download them.

          We need to ship against a certain version of each artifact (that is being downloaded by maven), that's why we can't just specify the jar and not the version. If you know a better to 'link' these dependencies, please let us know.

          Comment


          • #6
            Off the top of my head, I am not sure. I could not/did use the link you gave because it won't work with 3.5.

            I looked at that link and didn't see anything about maven. Is it on one of the other pages?

            Do i need to run maven if i just download Spring DM manually? Do i need to run it if I am not using the tests?

            I guess I am going to have to finally mess with Maven. (looking forward to that as much as a dip in Lake Michigan in the spring ).

            Comment


            • #7
              Quoting from "Select Spring Dynamic Modules Target Platform":

              Select the Spring-DM version that you desire from the Pre-defined Target (1) drop box and press Load Target (2). Eclipse will load the target and all bundles defined by it - this includes Spring-DM bundles and all of its dependencies (SLF4J is used for logging). The configuration can be customised appropriately by removing and adding bundles.
              In its current form, the plug-in offers two predefined targets - one for the stable released versions and one for the SNAPSHOT/nightly Spring DM jars. The latter does not contain any jars as it is expected for the user to download them manually. Simply locate the path where the plug-ins should be located (3), enter that folder and do a
              mvn installThe latest Spring-DM SNAPSHOT will be downloaded along with all of its dependencies. Simply click on the reload button (4) and Eclipse will pick up the bundles.

              Comment


              • #8
                Originally posted by Costin Leau View Post
                Quoting from "Select Spring Dynamic Modules Target Platform":
                No wonder I couldn't find it. the 3 letters "mvn" are embedded in a image. Sorry. I will try to get it to work in eclipse 3.4.

                Anyway, I was talking about the download from the website, not the Spring IDE plugin. From this link - http://www.springsource.com/download...utmk=198246575

                Comment

                Working...
                X