Cargo
  1. Cargo
  2. CARGO-963

Make TomcatLocalInstalledLocalDeployer.shouldCopyWars configurable through Tomcat container configuration

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.1.0
    • Component/s: Tomcat
    • Labels:
      None
    • Complexity:
      Intermediate
    • Number of attachments :
      3

      Description

      AbstractCatalinaStandaloneLocalConfiguration contains hard coded overriding of the default TomcatLocalInstalledLocalDeployer.shouldCopyWars (true) to false.
      And there is no way to "fix" or reconfigure this through container configuration.
      This means that no war files on a local tomcat installation will be copied but only "referenced" through injected context elements in the the server.xml.

      The only exception (providing a temporary workaround) is when a war file contains a custom Tomcat context.xml itself.
      However, having to add one just for this purpose is undesirable.

      This also, by default, causes (maven) cargo:package to produce a "package" which cannot be transported across machines/filesystems as it contains hard file location references outside the package structure itself, which IMO is a serious "bug".

      I've created a fix for the above by making copyWars configurable through a new TomcatPropertySet.COPY_WARS = "cargo.tomcat.copywars" boolean property, which for instance can be used through Maven like:

        <configuration>
          <configuration>  
             <properties>
               <cargo.tomcat.copywars>true</cargo.tomcat.copywars>
             </properties>
        ...
      

      I'm a bit hesitant to change the current (overridden to false) behavior (back) to true as it might break existing usages, which is why I created two patches:

      • one to keep the current but IMO undesirable default behavior
      • a second which defaults to copyWars = true (my personal preference)

      If either of the patches is agreed upon I'll also take care of updating the relevant website documentation, e.g. http://cargo.codehaus.org/Tomcat+x.x pages.

        Activity

        Hide
        Savas Ali Tokmen added a comment -

        Here is my +1 for CARGO-963-fix-default-copyWars-true.patch and CARGO-963-fix-default-copyWars-capability.patch

        If no one vetoes within 72 hours, I would say you can check these two in.

        Show
        Savas Ali Tokmen added a comment - Here is my +1 for CARGO-963 -fix-default-copyWars-true.patch and CARGO-963 -fix-default-copyWars-capability.patch If no one vetoes within 72 hours, I would say you can check these two in.
        Hide
        Ate Douma added a comment -

        Thanks!

        Show
        Ate Douma added a comment - Thanks!
        Hide
        Savas Ali Tokmen added a comment -

        The 72 hours are passed, you can check in CARGO-963-fix-default-copyWars-true.patch and CARGO-963-fix-default-copyWars-capability.patch if you like.

        Thank you

        Show
        Savas Ali Tokmen added a comment - The 72 hours are passed, you can check in CARGO-963 -fix-default-copyWars-true.patch and CARGO-963 -fix-default-copyWars-capability.patch if you like. Thank you
        Hide
        Ate Douma added a comment -

        Thanks, I'll proceed with committing those fixes shortly.

        Show
        Ate Douma added a comment - Thanks, I'll proceed with committing those fixes shortly.
        Hide
        Ate Douma added a comment -

        Committed with default true and slightly improved javadoc and code comments, svn r2872

        Show
        Ate Douma added a comment - Committed with default true and slightly improved javadoc and code comments, svn r2872

          People

          • Assignee:
            Ate Douma
            Reporter:
            Ate Douma
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: