Uploaded image for project: 'Nuxeo ECM Build/Test Environment'
  1. Nuxeo ECM Build/Test Environment
  2. NXBT-568

Add an Ant end task which successfully ends the build

    XMLWordPrintable

    Details

    • Tags:
    • Backlog priority:
      300
    • Upgrade notes:
      Hide

      New task: <nx:exit if="exit.condition" unless="not.exit.condition" status="exit.status" message="exit.message" />
      See org.nuxeo.build.ant.ExitTask

      Show
      New task: <nx:exit if="exit.condition" unless="not.exit.condition" status="exit.status" message="exit.message" /> See org.nuxeo.build.ant.ExitTask
    • Sprint:
      DevOps Sprint 7
    • Story Points:
      2

      Description

      We need a way to exit an Ant build without failing the build (for instance, if 'skipTests' then exit). The existing fail task always raises an Exception:

      <fail if="skipTests" status="0" />
      BUILD FAILED
      itests.xml:17: if=skipTests
      Total time: 0 seconds
      [INFO] ------------------------------------------------------------------------
      [ERROR] BUILD ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] Error occurred while running itests.xml: if=skipTests

      Override org.apache.tools.ant.taskdefs.Exit or write an alternate task (EndTask for instance) which ends the build without raising an Exception. Something like:

      if (status == 0) {
          getProject().fireBuildFinished(null);
          System.exit(0);
      }

      with a default status = 1 instead of

      throw ((status == null) ? new BuildException(text) : new ExitStatusException(text, status.intValue()));

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 4 hours
                  4h
                  Remaining:
                  Remaining Estimate - 4 hours
                  4h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified