JBehave
  1. JBehave
  2. JBEHAVE-317

Allow system property to ignore failures in Maven

    Details

    • Type: Improvement Improvement
    • Status: Open Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Maven Plugin
    • Labels:
      None
    • Environment:
      Maven 2
    • Number of attachments :
      0

      Description

      Please add the ability to specify a system property for the Mojo to ignore failures.

      In our environment we have a QA department who require the final artifact (installer) even though jbehave and junit tests fail. If our continuous build environment doesn't complete the build because of a test failure, then these people cannot test the product.

      Why not just change the pom.xml? Because our development department depends on it failing.
      Why not just create a profile? We have many projects and the administration in getting profiles created is much more effort than just using a system property.

      Normally I would just send a patch, but corporate life eats my time like the cookie monster.

        Activity

        Hide
        Mauro Talevi added a comment -

        Can you use command-line properties, e.g. mvn install -Dignore.failure=true?
        If so you can easily configure the Maven plugins to use these to override the default behaviour.

        Show
        Mauro Talevi added a comment - Can you use command-line properties, e.g. mvn install -Dignore.failure=true? If so you can easily configure the Maven plugins to use these to override the default behaviour.
        Hide
        Alwyn Schoeman added a comment -

        I haven't thought about that, but it would mean that even when you don't want to ignore failures you always have to execute with -Dignore.failure=false right?

        Show
        Alwyn Schoeman added a comment - I haven't thought about that, but it would mean that even when you don't want to ignore failures you always have to execute with -Dignore.failure=false right?
        Hide
        Mauro Talevi added a comment -

        Yes, provided you've configured the use of Maven properties in the plugin. E.g.

        <plugin>
        ...
        <configuration>
        <ignore.failure>$

        {ignore.failure}

        </ignore.failure> <!-- picks up value from property -->
        </configuration>
        </plugin>
        ...
        <properties>
        <ignore.failure>false</ignore.failure> <!-- this is the default value that is overridden by command-line -Dignore.failure=true -->
        </properties>

        Show
        Mauro Talevi added a comment - Yes, provided you've configured the use of Maven properties in the plugin. E.g. <plugin> ... <configuration> <ignore.failure>$ {ignore.failure} </ignore.failure> <!-- picks up value from property --> </configuration> </plugin> ... <properties> <ignore.failure>false</ignore.failure> <!-- this is the default value that is overridden by command-line -Dignore.failure=true --> </properties>

          People

          • Assignee:
            Unassigned
            Reporter:
            Alwyn Schoeman
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: