maven-mvnd
maven-mvnd copied to clipboard
Log warning splits on multiple lines
Affected version
1.0.3
Bug description
Hello team. If I run:
mvn help:evaluate -Dexpression=project.artifactId
...
[WARNING] This build will only read from the build cache, since the clean lifecycle is not part of the build invocation.
[WARNING] The POM for org.apache.camel:camel-package-maven-plugin:jar:4.17.0-SNAPSHOT is missing, no dependency information available
[WARNING] Failed to retrieve plugin descriptor for org.apache.camel:camel-package-maven-plugin:4.17.0-SNAPSHOT: Plugin org.apache.camel:camel-package-maven-plugin:4.17.0-SNAPSHOT or one of its dependencies could not be resolved: The following artifacts could not be resolved: org.apache.camel:camel-package-maven-plugin:jar:4.17.0-SNAPSHOT (absent): Could not find artifact org.apache.camel:camel-package-maven-plugin:jar:4.17.0-SNAPSHOT
the warning is shown in a single line. However, when running in mvnd, the log is splitted:
mvnd help:evaluate -Dexpression=project.artifactId
...
[WARNING] The POM for org.apache.camel:camel-package-maven-plugin:jar:4.17.0-SNAPSHOT is missing, no dependency information available
[WARNING] Failed to retrieve plugin descriptor for org.apache.camel:camel-package-maven-plugin:4.17.0-SNAPSHOT: Plugin org.apache.camel:camel-package-maven-plugin:4.17.0-SNAPSHOT or one of its dependencies could not be resolved:
Could not find artifact org.apache.camel:camel-package-maven-plugin:jar:4.17.0-SNAPSHOT
[WARNING] The POM for org.apache.camel:camel-repackager-maven-plugin:jar:4.17.0-SNAPSHOT is missing, no dependency information available
[WARNING] Failed to retrieve plugin descriptor for org.apache.camel:camel-repackager-maven-plugin:4.17.0-SNAPSHOT: Plugin org.apache.camel:camel-repackager-maven-plugin:4.17.0-SNAPSHOT or one of its dependencies could not be resolved:
Could not find artifact org.apache.camel:camel-repackager-maven-plugin:jar:4.17.0-SNAPSHOT
Considering the the tool can be used by script and CI, it would be convenient to keep the log output as expected, above all maintaining the same line or at least adding the line header (in this case, [WARNING]).
I think this is because you're using an outdated version of Maven:
> mvn help:evaluate -Dexpression=project.artifactId -V
Apache Maven 3.9.11 (3e54c93a704957b63ee3494413a2b544fd3d825b)
Maven home: /Users/gnodet/.sdkman/candidates/maven/3
Java version: 21.0.9, vendor: Oracle Corporation, runtime: /Users/gnodet/.sdkman/candidates/java/21.0.9-graal
Default locale: fr_FR, platform encoding: UTF-8
OS name: "mac os x", version: "26.1", arch: "aarch64", family: "mac"
[INFO] Maveniverse Nisse 0.6.2 loaded
[INFO] Nisse injecting 20 properties into User Properties
[INFO] Scanning for projects...
[INFO] No need for inlining
[WARNING] This build will only read from the build cache, since the clean lifecycle is not part of the build invocation.
[WARNING] The POM for org.apache.camel:camel-package-maven-plugin:jar:4.17.0-SNAPSHOT is missing, no dependency information available
[WARNING] Failed to retrieve plugin descriptor for org.apache.camel:camel-package-maven-plugin:4.17.0-SNAPSHOT: Plugin org.apache.camel:camel-package-maven-plugin:4.17.0-SNAPSHOT or one of its dependencies could not be resolved:
Could not find artifact org.apache.camel:camel-package-maven-plugin:jar:4.17.0-SNAPSHOT