Uploaded image for project: 'Maven Enforcer Plugin'
  1. Maven Enforcer Plugin
  2. MENFORCER-482

enforcer:enforce is unable to find rules but works when installing

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • 3.3.0
    • None
    • Plugin
    • None

    Description

      I have a normal project configured as follows:

          <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-enforcer-plugin</artifactId>
             <version>3.3.0</version>
              <executions>
                <execution>
                  <id>enforce-versions</id>
                  <goals>
                    <goal>enforce</goal>
                  </goals>
                  <configuration>
                    <rules>
                      <dependencyConvergence/>
                      <requireMavenVersion>
                        <version>[3.9.0,)</version>
                      </requireMavenVersion>
                      <requireJavaVersion>
                        <version>11</version>
                      </requireJavaVersion>
                    </rules>
                  </configuration>
                </execution>
              </executions>
            </plugin>

      Running mvn install runs the plugin as expected but doing mvn enforcer:enforce leads to:

      Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:3.3.0:enforce (default-cli) on project p14c-api-tests: No rules are configured. Use the skip flag if you want to disable execution. -> [Help 1]
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            javydreamercsw Javier A. Ortiz
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: