Details

    • New Feature
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.0.0
    • 3.2.0, 3.2.1
    • Plugin

    Description

      Allow no rules by adding property similar to http://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#failIfNoTests

      Currently the execution fails

      No rules are configured. Use the skip flag if you want to disable execution.

      For some background, my strategy in dealing with lots of XML is to configure plugin executions upfront with an id, goal, and default properties, and then allow modules to populate them with the minimum e.g.

                <executions>
                  <execution>
                    <id>fail</id>
                    <goals>
                      <goal>enforce</goal>
                    </goals>
                    <configuration>
                      <fail>true</fail>
                    </configuration>
                  </execution>
                  <execution>
                    <id>warn</id>
                    <goals>
                      <goal>enforce</goal>
                    </goals>
                    <configuration>
                      <fail>false</fail>
                    </configuration>
                  </execution>
                </executions>
      

      and then

                  <executions>
                    <execution>
                      <id>warn</id>
                      <configuration>
                        <rules>
                          <requireProperty>
                            <property>remote.name</property>
                            <message>Distribution profile invoked without setting a remote.name: repositories may not be configured correctly</message>
                          </requireProperty>
                        </rules>
                      </configuration>
                    </execution>
                  </executions>
      

      Attachments

        Issue Links

          Activity

            PR are welcome

            sjaranowski Slawomir Jaranowski added a comment - PR are welcome
            raupach Björn Raupach added a comment - Tried another PR. https://github.com/apache/maven-enforcer/pull/178
            hudson Hudson added a comment -

            Build failed in Jenkins: Maven » Maven TLP » maven-enforcer » master #63

            See https://ci-maven.apache.org/job/Maven/job/maven-box/job/maven-enforcer/job/master/63/

            hudson Hudson added a comment - Build failed in Jenkins: Maven » Maven TLP » maven-enforcer » master #63 See https://ci-maven.apache.org/job/Maven/job/maven-box/job/maven-enforcer/job/master/63/

            People

              sjaranowski Slawomir Jaranowski
              delany Delany
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: