Derby
  1. Derby
  2. DERBY-5462

ant release needs to accommodate for different ant executables on different systems

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: 10.8.3.0, 10.9.1.0
    • Fix Version/s: 10.9.2.2, 10.10.1.1
    • Component/s: Build tools
    • Labels:
      None

      Description

      The ant release target will call ant to build the classes, jars, and docs. However, the ant executable is different when running this on a windows OS vs. Unix. So the target should either figure out the correct name of the executable, or prompt for it.

      1. DERBY-5462_2.diff
        1 kB
        Myrna van Lunteren
      2. DERBY-5462.diff
        1 kB
        Myrna van Lunteren

        Issue Links

          Activity

          Hide
          Kristian Waagan added a comment -

          May not be the best way to do it, but see an example in 'tools/release/build.xml'. Search for "isWindows".

          Show
          Kristian Waagan added a comment - May not be the best way to do it, but see an example in 'tools/release/build.xml'. Search for "isWindows".
          Hide
          Rick Hillegas added a comment -

          Hi Myrna,

          Can you explain what is breaking for you? I see one instance of the ant executable being invoked (in the master build file in the "builduserdocs" target). I think that ant is invoked as an executable in order to guarantee the following:

          1) enough memory must be given to the JVM to build the docs (the full docs build is a pig)

          2) fop.jar needs to be on the classpath in order to build the docs

          It may be possible to make the master "release" target fail early if these conditions are not met. Then we may be able to just use the ordinary <ant> task instead of the <exec> task for the docs build.

          Thanks,
          -Rick

          Show
          Rick Hillegas added a comment - Hi Myrna, Can you explain what is breaking for you? I see one instance of the ant executable being invoked (in the master build file in the "builduserdocs" target). I think that ant is invoked as an executable in order to guarantee the following: 1) enough memory must be given to the JVM to build the docs (the full docs build is a pig) 2) fop.jar needs to be on the classpath in order to build the docs It may be possible to make the master "release" target fail early if these conditions are not met. Then we may be able to just use the ordinary <ant> task instead of the <exec> task for the docs build. Thanks, -Rick
          Hide
          Myrna van Lunteren added a comment -

          Yes, the failure shows up in the builduserdocs target.
          To overcome this for the 10.8.2 release, I have committed the change in the 10.8 branch to have 'ant.bat' instead of ant.
          Changing the call back to use 'ant' (and commenting out the svn clean checks) I get the following error:

          BUILD FAILED
          C:\derby\108\10.8debug\build.xml:2711: The following error occurred while executing this line:
          C:\derby\108\10.8debug\build.xml:2052: Execute failed: java.io.IOException: Cannot run program "ant" (in directory "c:\derby\108docs\10.8"): CreateProcess error=2, The system cannot find the file specified.

          Show
          Myrna van Lunteren added a comment - Yes, the failure shows up in the builduserdocs target. To overcome this for the 10.8.2 release, I have committed the change in the 10.8 branch to have 'ant.bat' instead of ant. Changing the call back to use 'ant' (and commenting out the svn clean checks) I get the following error: BUILD FAILED C:\derby\108\10.8debug\build.xml:2711: The following error occurred while executing this line: C:\derby\108\10.8debug\build.xml:2052: Execute failed: java.io.IOException: Cannot run program "ant" (in directory "c:\derby\108docs\10.8"): CreateProcess error=2, The system cannot find the file specified.
          Hide
          Myrna van Lunteren added a comment -

          Attaching a patch which mimics the steps done in tools/release/build.xml to get the mvn executable name, but applies it to ant for the builddocsroot target.

          I've not tested this except for doing a generic build (which I think would fail if I missed some tags).

          Show
          Myrna van Lunteren added a comment - Attaching a patch which mimics the steps done in tools/release/build.xml to get the mvn executable name, but applies it to ant for the builddocsroot target. I've not tested this except for doing a generic build (which I think would fail if I missed some tags).
          Hide
          Myrna van Lunteren added a comment -

          Attaching a new version of the patch, which has the $ for ant.exec variable in the build target in the correct spot.

          Show
          Myrna van Lunteren added a comment - Attaching a new version of the patch, which has the $ for ant.exec variable in the build target in the correct spot.
          Hide
          Kathey Marsden added a comment -

          Hi Myrna,

          I tried the 2 patch on trunk and did not get the CreateProcess error with the builduserdocs target. +1 to checking this into trunk and 10.9. Thank you for the fix.

          Show
          Kathey Marsden added a comment - Hi Myrna, I tried the 2 patch on trunk and did not get the CreateProcess error with the builduserdocs target. +1 to checking this into trunk and 10.9. Thank you for the fix.
          Hide
          Myrna van Lunteren added a comment -

          Thanks for the review Kathey.
          I committed the _2 patch to trunk with revision 1414316 (http://svn.apache.org/viewvc?view=revision&revision=1414316) and backported to 10.9 with revision 1414317 (http://svn.apache.org/viewvc?view=revision&revision=1414317)

          Show
          Myrna van Lunteren added a comment - Thanks for the review Kathey. I committed the _2 patch to trunk with revision 1414316 ( http://svn.apache.org/viewvc?view=revision&revision=1414316 ) and backported to 10.9 with revision 1414317 ( http://svn.apache.org/viewvc?view=revision&revision=1414317 )
          Hide
          Myrna van Lunteren added a comment -

          Marking fixed for 10.10 and 10.9.
          Note, that this is not fixed in 10.8, there, we have a hardcoded ant.bat, which will only allow a release build on windows.

          Show
          Myrna van Lunteren added a comment - Marking fixed for 10.10 and 10.9. Note, that this is not fixed in 10.8, there, we have a hardcoded ant.bat, which will only allow a release build on windows.

            People

            • Assignee:
              Unassigned
              Reporter:
              Myrna van Lunteren
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development