Announcement Announcement Module
Collapse
No announcement yet.
Web Bundle RFC-66 support inside PARs Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Web Bundle RFC-66 support inside PARs

    I've just tried out the latest dm Server 2.0 and migrated a few web modules (now deprecated) to web bundles(RFC-66) manually.

    But I'm noticing that in order to run web bundles(RFC-66 kind) the following is required:
    * Compiled classes need to be placed in the /WEB-INF/classes directory.
    * And the bundle has to have a .war extension.

    I'm assuming all this is in accordance with the spec RFC-66. But it left me wondering about the tool support.

    If I assign a bundle(once web module) to a PAR project. When I generate the PAR, by default all bundles have their classes placed in the root of the bundle, in addition, all bundles have a .jar extension. If I then drop the PAR into dm Server(with RFC-66 container) it of course fails ( no .war extension and it cant read the classes of /WEB-INF/classes)

    Is there some workaround to specifying where a bundle places its compiled classes and its extension ? Or will a new 'web bundle project' be added in future dm Server tools to support this?

    I almost found a workaround by creating a standard WAR via a 'Web-Dynamic Web Project'. This places the compiled classes inside /WEB-INF/classes/ and assigns a .war extension, just added a MANIFEST.MF . However, I realized PAR projects only have the option of adding bundles. Perhaps 'unlocking' the 'Add or remove bundle dependencies to the PAR' option to show this. Just a thought.

    Thanks for any info on how this might be supported in future version of the tools.

  • #2
    drubio,

    with STS 2.1.0.RC1 you can now add "Dynamic Web Projects" that also have the Bundle Nature to a PAR.

    This has been added to support RFC66 complaint web projects.

    Let me know if that is what you are looking for.

    Christian

    Comment


    • #3
      Christian,

      Correct, that's exactly what I was looking for. I was using STS 2.1.0.M1 so I didn't have this functionality.

      I downloaded STS 2.1.0.RC1 and tried it out, however, its not entirely working.

      While I can now add a "Dynamic Web Projects" with a Bundle Nature to a PAR. When I export a PAR, the contents are mangled. The output is the following:
      * The bundle has a .jar extension ( not .war )
      * Only the manifest.mf file is present and the classes are in the root directory (not /WEB-INF/classes ).
      * It apparently mangles /WEB-INF/ and all the other configuration files.

      It appears to be a bug in the PAR export, because if I do a direct 'Export WAR' on the "Dynamic Web Projects" with a Bundle Nature the contents of the exported WAR are correct.(Directory structure, configuration files,.war extension,etc).

      (I should point out I'm getting a warning on the "Dynamic Web Projects" with a Bundle Nature, though I don't know if it could be related to this mangling in the export PAR process. the warning is:
      Classpath entry com.springsource.server.ide.jdt.core.MANIFEST_CLAS SPATH_CONTAINER will not be exported or published. Runtime ClassNotFounExceptions may result.) )

      Comment


      • #4
        drubio,

        you found a bug in the Export wizard and its support for WAR files. I raised a JIRA to track this problem:

        STS-243: Support RFC66 WARs in the PAR export wizard
        https://issuetracker.springsource.com/browse/STS-243

        Thanks for reporting this issue. I'll make sure that we fix this for 2.1.0 GA.

        Christian

        Comment

        Working...
        X