[
https://issues.apache.org/jira/browse/MENFORCER-482?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17724624#comment-17724624
]
Slawomir Jaranowski commented on MENFORCER-482:
-----------------------------------------------
Your example has not connection with enforcer plugin, simply it is Maven
specific.
You can have configuration in plugin/configuration or in
plugin/executions/execution.
Maven configure plugin during execution - depends on where you put
configuration and how you execute plugin by - Maven phase build or by cli call.
Please read:
https://maven.apache.org/guides/mini/guide-configuring-plugins.html#configuring-build-plugins
> enforcer:enforce is unable to find rules but works when installing
> ------------------------------------------------------------------
>
> Key: MENFORCER-482
> URL: https://issues.apache.org/jira/browse/MENFORCER-482
> Project: Maven Enforcer Plugin
> Issue Type: Bug
> Components: Plugin
> Affects Versions: 3.3.0
> Reporter: Javier A. Ortiz
> Priority: Major
>
> I have a normal project configured as follows:
> {code:java}
> <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>{code}
> Running _mvn install_ runs the plugin as expected but doing mvn
> enforcer:enforce leads to:
> {code}
> 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]
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)