Announcement Announcement Module
Collapse
No announcement yet.
Bundlor and Spring-Context Not Working? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Bundlor and Spring-Context Not Working?

    If I read the docs right, Bunlor (using the M6 version now) should find the Spring-Context header in the template.mf file and use that to determine where to scan for spring context files, right?

    It works great in this regard if this header is NOT present and your spring context files are there in META-INF/spring, but if you wanted a custom location, you should be able to tweak that with Spring-Context, right?

    It works at runtime, but in STS (2.2.0.200910210131-RELEASE) with Bundlor M6 it does not appear to be working.

    Am I missing something, or is this a known issue, or should I create a JIRA for it?

    Thanks!

  • #2
    Hi Scott. This should work, and I'm not aware of an outstanding issue reporting that it does not. Could you please create a JIRA for it?

    Comment


    • #3
      Before I do, let me make sure I'm specifying this right, and describe what I'm seeing in case I'm off my rocker.

      We are converting a legacy WAR, and deploying to Spring dm Server 1, so we're using the web-module format. Our project therefore has under src/main/resources only a META-INF folder (containing the MANIFEST.MF) and a MODULE-INF folder.

      MODULE-INF also contains a META-INF/company/spring folder which contains my spring context files.

      (In web.xml, we specify for the contextConfigLocation context-param the value of classpath*:META-INF/plateau/spring/**/*.xml, and this works great at runtime.)

      In the project's template.mf, if I specify any of the following, I see the Spring-Context appear in the MANIFEST.MF but the imports are not being augmented with classes specified in our spring context files.
      • Spring-Context: MODULE-INF/META-INF/company/spring/**/*.xml
      • Spring-Context: MODULE-INF/META-INF/company/spring/*.xml

      (Of course at runtime we will get an error that we're adding multiple contexts b/c of our web.xml also having a context listener - we'd take this out as part of our conversion process of the WAR. I mention this in case it is confusing Bundlor, however.)

      One final bit of information that may be pertinent. If I specify paths that Bundlor appears not to like, such as:
      • Spring-Context: /MODULE-INF/META-INF/company/spring/**/*.xml
      • Spring-Context: classpath:*MODULE-INF/META-INF/company/spring/*.xml

      In this case the MANIFEST.MF is not updated at all - it appears as though Bundlor silently fails and you would not know it unless you were carefully watching that file for changes.

      Before I submitted a JIRA, I wanted to make sure I was not missing something in my configuration?

      Comment


      • #4
        Hi, Scott. Nope, you're not off your rocker . Your expectations are entirely reasonable so please do open a JIRA when you have a minute.

        Thanks,
        Andy

        Comment


        • #5
          JIRAs submitted. Thanks!

          https://issuetracker.springsource.com/browse/BNDLR-318

          https://issuetracker.springsource.com/browse/BNDLR-319

          Comment

          Working...
          X