Hi Thorsten,
Please check your effective POM via mvn help:effective-pom 
(https://maven.apache.org/plugins/maven-help-plugin/effective-pom-mojo.html).
The legacy configuration parameter is probably inherited from some parent.

Regards,
Konrad

> On 8. Aug 2024, at 09:57, Thorsten Heit <th...@gmx.de.INVALID> wrote:
> 
> Hi,
> 
> in a multi-module build I have added the enforcer plugin in the
> top-level pom.xml using the following configuration:
> 
> 
> <plugin>
>    <groupId>org.apache.maven.plugins</groupId>
>    <artifactId>maven-enforcer-plugin</artifactId>
>    <version>3.5.0</version>
>    <executions>
>        <execution>
>            <id>enforce-versions</id>
>            <goals>
>                <goal>enforce</goal>
>            </goals>
>            <configuration>
>                <rules>
>                    <requireMavenVersion>
>                        <version>3.9.4</version>
>                    </requireMavenVersion>
>                    <requireJavaVersion>
>                        <version>[21,)</version>
>                    </requireJavaVersion>
>                </rules>
>            </configuration>
>         </execution>
>    </executions>
> </plugin>
> 
> 
> When I execute "mvn clean verify" I see the following warning message in
> the console on each module that is being built:
> 
> 
> [WARNING] Cannot find a Mojo parameter 'commandLineRules' to read for
> Mojo org.apache.maven.plugins:maven-enforcer-plugin:3.5.0:enforce
> {execution: enforce-versions}. This parameter should be ignored.
> 
> 
> I don't use "commandLineRules" (that is deprecated according to the
> enforce mojo documentation), and the above snippet is similar to the
> example shown in the usage documentation ([1]). So why is this printed
> at all? Is this intentionally? Or a bug^H^H^Hfeature?
> 
> 
> Environment (if that matters):
> - Maven 3.9.8
> - Java 22.0.2 (from adoptium.net)
> - Windows 11
> 
> [1] https://maven.apache.org/enforcer/maven-enforcer-plugin/usage.html
> 
> 
> Regards
> 
> Thorsten
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
> 

Reply via email to