Derby
  1. Derby
  2. DERBY-5482

Reduce number of jar invocations in the buildjars target

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 10.9.1.0
    • Fix Version/s: 10.9.1.0
    • Component/s: Build tools
    • Labels:
      None

      Description

      When building derby.jar, derbytools.jar and derbynet.jar, the build script runs the jar target twice for each of the jars. The first jar invocation creates the jar and adds some files, and the second one updates the jars with some more files. It would be simpler to create each of the jar files in a single invocation, and it would also cut off a few seconds on the time to build the jars.

      1. d5482-1a.diff
        4 kB
        Knut Anders Hatlen

        Activity

        Hide
        Knut Anders Hatlen added a comment -

        Committed revision 1189064.

        Show
        Knut Anders Hatlen added a comment - Committed revision 1189064.
        Hide
        Knut Anders Hatlen added a comment -

        Attaching a patch that makes the following changes to the buildjars target:

        • derby.jar:
        • Don't add DBMS.properties to derby.list, since the file is added to the jar via one of the filesets. (This was needed to prevent that it ended up twice in the jar file (I didn't even know that it was possible...). It used to work without creating duplicates before, but that was because they were added in two different invocations, and the second one would overwrite the first one. Not so when the file appears twice in the same jar invocation, apparently...)
        • Merge the two <jar> targets. I believe the split target was introduced back when we supported builds both with and without OSGi support. Now that OSGi support is a mandatory part of the build, the split doesn't serve any purpose.
        • derbytools.jar:
        • Simple merge of two adjacent <jar> targets.
        • derbynet.jar:
        • Simple merge of two adjacent <jar> targets.

        The jars have the exact same contents when built with the patch, as far as I can tell. Running regression tests now.

        Show
        Knut Anders Hatlen added a comment - Attaching a patch that makes the following changes to the buildjars target: derby.jar: Don't add DBMS.properties to derby.list, since the file is added to the jar via one of the filesets. (This was needed to prevent that it ended up twice in the jar file (I didn't even know that it was possible...). It used to work without creating duplicates before, but that was because they were added in two different invocations, and the second one would overwrite the first one. Not so when the file appears twice in the same jar invocation, apparently...) Merge the two <jar> targets. I believe the split target was introduced back when we supported builds both with and without OSGi support. Now that OSGi support is a mandatory part of the build, the split doesn't serve any purpose. derbytools.jar: Simple merge of two adjacent <jar> targets. derbynet.jar: Simple merge of two adjacent <jar> targets. The jars have the exact same contents when built with the patch, as far as I can tell. Running regression tests now.

          People

          • Assignee:
            Knut Anders Hatlen
            Reporter:
            Knut Anders Hatlen
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development