Hi,

for unknown reasons I have seen Konrad's answer to my original post only on the list archive @ lists.apache.org; it didn't arrive in my mailbox...

Anyway. My project is a standalone project, i.e. it doesn't inherit from some other project, and instead only uses (OSS) dependencies.

As suggested by Konrad I tried "mvn help:effective-pom", but the mentioned legacy parameter isn't contained at all in the output. WRT to m-enforcer-p the output of that command is the same as the snippet in my original mail (apart from the omitted groupId) and appears at each module...


Regards

Thorsten



Am 08.08.24 um 09:57 schrieb Thorsten Heit:
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

Reply via email to