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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to