OFBiz
  1. OFBiz
  2. OFBIZ-4765

Allows a build.xml file in hot-deploy folder to build components in a specific order

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: SVN trunk
    • Fix Version/s: SVN trunk
    • Component/s: None
    • Labels:
      None

      Description

      In the current build.xml in the ofbiz-Home-folder, the build target is executed for each subdirectory (framework, application, specialpurpose) with the fileset:

      <filelist dir="." files="specialpurpose/build.xml"/>

      Only for the hot-deploy folder the fileset is quite different:

      <fileset dir="$

      {basedir}

      /hot-deploy" casesensitive="no">
      <exclude name="disabled/**"/>
      <include name="*/build.xml"/>
      </fileset>

      This is calling the build.xml directly in the hot-deploy components, which is an error, if you do have several dependent components in there, which needs to get build in the right order. I propose to use the following filelist:

      <filelist dir="." files="hot-deploy/build.xml"/>

      Problem could be, that not every project do have an build.xml file in this folder (or is this already a requirement?). If it is not then we would need to check, if this build.xml is there, then execute this, and otherwise use the already existing one.

      A patch will be applied for the first solution.

        Activity

        Jacques Le Roux made changes -
        Status Patch Available [ 10002 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]
        Hide
        Jacques Le Roux added a comment -

        Thanks Markus,

        Your patch is in trunk at r1308336

        I have added this comment above the new feature:

        A check is done, if no build.xml file is present in hot-deploy dir, then the build.xml files - if present - in hot-deploy sub-dirs will be used. So the previous, simpler, behaviour is kept as long as you don't need to build hot-deploy components in a specific order.

        Show
        Jacques Le Roux added a comment - Thanks Markus, Your patch is in trunk at r1308336 I have added this comment above the new feature: A check is done, if no build.xml file is present in hot-deploy dir, then the build.xml files - if present - in hot-deploy sub-dirs will be used. So the previous, simpler, behaviour is kept as long as you don't need to build hot-deploy components in a specific order.
        Jacques Le Roux made changes -
        Summary build.xml in hot-deploy folder is not called correctly in the main build.xml Allows a build.xml file in hot-deploy folder to build components in a specific order
        Issue Type Wish [ 5 ] Improvement [ 4 ]
        Assignee Jacques Le Roux [ jacques.le.roux ]
        Hide
        Jacques Le Roux added a comment -

        Changed the title to better reflect the improvment

        Show
        Jacques Le Roux added a comment - Changed the title to better reflect the improvment
        Hide
        Hans Bakker added a comment -

        sounds fine me,
        Hans

        Show
        Hans Bakker added a comment - sounds fine me, Hans
        Hide
        Jacques Le Roux added a comment -

        This seems OK with me, since the previous behaviour is kept (ie when there is no build.xml file in hot-deploy dir then the build.xml files - if present - in hot-deploy sub-dirs will be used)

        Agreed, Jacopo, Hans ?

        Show
        Jacques Le Roux added a comment - This seems OK with me, since the previous behaviour is kept (ie when there is no build.xml file in hot-deploy dir then the build.xml files - if present - in hot-deploy sub-dirs will be used) Agreed, Jacopo, Hans ?
        Hide
        Jacques Le Roux added a comment -

        Yes sorry Markus, I just realize it this morning. I mixed with another issue I was working on.

        Show
        Jacques Le Roux added a comment - Yes sorry Markus, I just realize it this morning. I mixed with another issue I was working on.
        Markus M. May made changes -
        Hide
        Markus M. May added a comment - - edited

        Make the patch "unique", so that it does not depend on the first patch.

        Sorry, Jacques, did not respond in a timely manner, because me is not Francis

        Show
        Markus M. May added a comment - - edited Make the patch "unique", so that it does not depend on the first patch. Sorry, Jacques, did not respond in a timely manner, because me is not Francis
        Hide
        Markus M. May added a comment -

        The applied patch is pretty much the same solution as before. Only if a "hot-deploy/build.xml" is available, the main build.xml is using this one. In all other cases the solution is doing the same as before.

        Could you please review the patch and apply it?

        Show
        Markus M. May added a comment - The applied patch is pretty much the same solution as before. Only if a "hot-deploy/build.xml" is available, the main build.xml is using this one. In all other cases the solution is doing the same as before. Could you please review the patch and apply it?
        Hide
        Hans Bakker added a comment - - edited

        as i mentioned before build.xml should be optional both in the component as in the hot-deploy directory similar to component-load.xml

        also the current situation should still work, only have build.xml in the component dir but not in the hot-deploy dir

        Regards,
        Hans

        Show
        Hans Bakker added a comment - - edited as i mentioned before build.xml should be optional both in the component as in the hot-deploy directory similar to component-load.xml also the current situation should still work, only have build.xml in the component dir but not in the hot-deploy dir Regards, Hans
        Hide
        Jacques Le Roux added a comment -

        Thanks Hans,

        So you agree with Francis's proposition to have a global one in hot-deploy from where to handle all created sub-component, right?

        Show
        Jacques Le Roux added a comment - Thanks Hans, So you agree with Francis's proposition to have a global one in hot-deploy from where to handle all created sub-component, right?
        Hide
        Hans Bakker added a comment -

        not every component has a build.xml, as least up to now there is no requirement for that....

        Show
        Hans Bakker added a comment - not every component has a build.xml, as least up to now there is no requirement for that....
        Hide
        Jacques Le Roux added a comment -

        Francis, your 2d patch will not apply since it's based on your initial change. So you need to revert both and reapply your change.
        Jacopo, I don't see any problem with the spirit of this patch. But we know some are using other strategies coupled with ant create-component. Is it ok for you to apply this patch? Same question for all persons interested, of course...

        Show
        Jacques Le Roux added a comment - Francis, your 2d patch will not apply since it's based on your initial change. So you need to revert both and reapply your change. Jacopo, I don't see any problem with the spirit of this patch. But we know some are using other strategies coupled with ant create-component. Is it ok for you to apply this patch? Same question for all persons interested, of course...
        Markus M. May made changes -
        Hide
        Markus M. May added a comment -

        Remove local files out of the diff.

        Show
        Markus M. May added a comment - Remove local files out of the diff.
        Markus M. May made changes -
        Attachment OFBIZ-4765-use-hotdeploy-buildxml-if-available.patch [ 12520249 ]
        Hide
        Jacopo Cappellato added a comment -

        Markus, the patch seems to contain a diff between two local versions; there are also unrelated changes.

        Show
        Jacopo Cappellato added a comment - Markus, the patch seems to contain a diff between two local versions; there are also unrelated changes.
        Markus M. May made changes -
        Attachment OFBIZ-4765-use-hotdeploy-buildxml-if-available.patch [ 12520249 ]
        Hide
        Markus M. May added a comment -

        The attached patch just uses the build.xml in the hot-deploy-folder, if available. Hope that this solution could be used as a "standard".

        Show
        Markus M. May added a comment - The attached patch just uses the build.xml in the hot-deploy-folder, if available. Hope that this solution could be used as a "standard".
        Jacopo Cappellato made changes -
        Issue Type Bug [ 1 ] Wish [ 5 ]
        Hide
        Jacopo Cappellato added a comment -

        This is not a bug but the intended behavior of the system; we can add support for the hot-deploy/build.xml file but this has to be optional.

        Show
        Jacopo Cappellato added a comment - This is not a bug but the intended behavior of the system; we can add support for the hot-deploy/build.xml file but this has to be optional.
        Markus M. May made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Markus M. May made changes -
        Field Original Value New Value
        Attachment OFBIZ-4765-fix-buildxml.patch [ 12520245 ]
        Markus M. May created issue -

          People

          • Assignee:
            Jacques Le Roux
            Reporter:
            Markus M. May
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development