Wicket
  1. Wicket
  2. WICKET-33

Ant jar target that doesn't depend on tests

    Details

    • Type: Wish Wish
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Won't Fix
    • Affects Version/s: 1.2.3
    • Fix Version/s: None
    • Component/s: wicket
    • Labels:
      None

      Description

      I'd very much appreciate it, if the ant build file could get a jar target that doesn't depend on junit tests (those should be voluntary).

      Possible solutions:

      1) Change "jar"-target dependency from "test" to "compile" and introduce a new "all"-target for both combined:
      2) Keep the jar-target and create a new one that "skips" the tests (possible name: "jar-notest")

      A patch snippet for solution one is attached below:

      @@ -114,9 +114,10 @@
      />
      </target>

      • <target name="jar" depends="test" description="o Creates a JAR file for this package">
        + <target name="jar" depends="compile" description="o Creates a JAR file for this package">
        <jar jarfile="$ {final.name}

        .jar"
        excludes="**/package.html"
        basedir="$

        {build.main.classes}

        "/>
        </target>
        + <target name="all" depends="test,jar" description="o Runs the unit tests and creates a JAR file for this package"/>

        Activity

        Hide
        Martijn Dashorst added a comment -

        the build should force you to run the tests from the normal flow... otherwise you won't know if the build is any good, especially from a framework perspective.

        I think a number 3 might be possible (I'm a bit rusty on my ant skills tho) and that is add a condition to the ant test target:

        if "maven.test.skip=true" don't run tests.

        This unifies the builds between maven and ant.

        WDYT?

        Show
        Martijn Dashorst added a comment - the build should force you to run the tests from the normal flow... otherwise you won't know if the build is any good, especially from a framework perspective. I think a number 3 might be possible (I'm a bit rusty on my ant skills tho) and that is add a condition to the ant test target: if "maven.test.skip=true" don't run tests. This unifies the builds between maven and ant. WDYT?
        Hide
        Bernhard Frauendienst added a comment -

        I agree with you, tests are vital when building packages from source. But there should be a possibility for "external" systems to steer the build flow (for example packaging systems on Linux distributions, which often have a test feature the user can enable or disable).

        Your solution sounds like a good compromise between effectiveness and number of changes. It should just require an unless="maven.test.skip" in the test- and test-compile targets (have to be both, because unless doesn't effect dependencies, they get executed before the unless is evaluated).

        Show
        Bernhard Frauendienst added a comment - I agree with you, tests are vital when building packages from source. But there should be a possibility for "external" systems to steer the build flow (for example packaging systems on Linux distributions, which often have a test feature the user can enable or disable). Your solution sounds like a good compromise between effectiveness and number of changes. It should just require an unless="maven.test.skip" in the test- and test-compile targets (have to be both, because unless doesn't effect dependencies, they get executed before the unless is evaluated).
        Hide
        Jean-Baptiste Quenot added a comment -

        I think we can close the issue now, or do we still use Ant?

        Show
        Jean-Baptiste Quenot added a comment - I think we can close the issue now, or do we still use Ant?
        Hide
        Martijn Dashorst added a comment -

        We stopped supplying ant scripts starting Apache wicket 1.3. Wicket 1.2.x is in maintenance mode and I don't want to meddle with build scripts (take too much time).

        Show
        Martijn Dashorst added a comment - We stopped supplying ant scripts starting Apache wicket 1.3. Wicket 1.2.x is in maintenance mode and I don't want to meddle with build scripts (take too much time).

          People

          • Assignee:
            Martijn Dashorst
            Reporter:
            Bernhard Frauendienst
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development