support-and-care / mvn-buildcache-issues-migration-test

0 stars 0 forks source link

[MBUILDCACHE-126] [WARNING] Cannot find a Mojo parameter 'commandLineRules' to read for Mojo org.apache.maven.plugins:maven-enforcer-plugin:3.5.0:enforce {execution: enforce-maven}. This parameter should be ignored. #122

Open sos-jira-migration-bot[bot] opened 2 weeks ago

sos-jira-migration-bot[bot] commented 2 weeks ago

Gili opened MBUILDCACHE-126 and commented

When building my project using the Maven Build Cache Extension I get this output:

[INFO] — duplicate-finder:2.0.1:check (default) @ licensed-client — [INFO] Ignoring POM project! [WARNING] Cannot find a Mojo parameter 'commandLineRules' to read for Mojo org.apache.maven.plugins:maven-enforcer-plugin:3.5.0:enforce {execution: enforce-maven}. This parameter should be ignored.

I know that this issue came up in the past (MBUILDCACHE-56) but it is marked as fixed so I'm not sure why I'm getting this warning in version 1.2.0

Is this a regression or am I doing something wrong?


Affects: 1.2.0

sos-jira-migration-bot[bot] commented 2 weeks ago

Gili commented

Ah, now I see where this is coming from: https://github.com/apache/maven-build-cache-extension/blob/dfc6cd93d8040017d3b25a0458eaf005debf9232/src/main/java/org/apache/maven/buildcache/CacheControllerImpl.java#L716

You might want to revisit this wording of this warning because:

  1. It's not obvious that it's coming from the Maven Build Cache Extension, since it shows up while executing a different plugin.
  2. It's not clear that the message is a suggestion for how to fix the problem as opposed to being a bug that the plugin triggered.
  3. It's not necessarily obvious what users are supposed to do to resolve the problem. It might be helpful to mention maven-build-cache-config.xml to point users in the right direction.

For starters, I suggest adding <nolog propertyName="commandLineRules"/> to the sample config file found at https://maven.apache.org/extensions/maven-build-cache-extension/maven-build-cache-config.xml