[
https://issues.apache.org/jira/browse/MENFORCER-415?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17680027#comment-17680027
]
Slawomir Jaranowski commented on MENFORCER-415:
-----------------------------------------------
I simply add error message to Exception, so we will have, like:
{code}
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 29.647 s (Wall Clock)
[INFO] Finished at: 2023-01-23T22:12:29+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-enforcer-plugin:3.2.0-SNAPSHOT:enforce
(enforce-test-deps-scope) on project quarkus-hibernate-orm-deployment:
[ERROR] Rule 0: org.apache.maven.enforcer.rules.dependency.BannedDependencies
failed with message:
[ERROR] Found test dependencies with wrong scope:
[ERROR] io.quarkus:quarkus-hibernate-orm-deployment:jar:999-SNAPSHOT
[ERROR] org.assertj:assertj-core:jar:3.24.2 <--- banned via the
exclude/include list
[ERROR]
[ERROR] -> [Help 1]
{code}
> Violation messages can be really hard to find in a multi module project
> -----------------------------------------------------------------------
>
> Key: MENFORCER-415
> URL: https://issues.apache.org/jira/browse/MENFORCER-415
> Project: Maven Enforcer Plugin
> Issue Type: Bug
> Components: Plugin
> Affects Versions: 3.0.0-M3, 3.0.0
> Reporter: Falko Modler
> Assignee: Slawomir Jaranowski
> Priority: Major
>
> In a multi module project, when building with multiple threads (-T) and/or
> --fail-at-end, enforcer rule violation messages can be really hard to find.
> After BUILD FAILURE you just see e.g.
> {noformat}
> Failed to execute goal
> org.apache.maven.plugins:maven-enforcer-plugin:3.0.0-M3:enforce
> (enforce-test-deps-scope) on project quarkus-integration-test-jpa: Some
> Enforcer rules have failed. Look above for specific messages explaining why
> the rule failed. -> [Help 1]
> {noformat}
> You then have to scroll up, past a potentially huge list of SKIPPED reactor
> modules and messages like the following:
> {noformat}
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Skipping Quarkus - Integration Tests - Mailer
> [INFO] This project has been banned from the build due to previous failures.
> [INFO]
> ------------------------------------------------------------------------
> {noformat}
> Then, finally, when reaching the first (from the bottom) potentially relevant
> module outputs, you have find the part with the actual violation messages
> which can be even higher up.
> This only gets worse when building in parallel.
> The idea is to enrich the {{MojoExecutionException}} with the actual
> violation messages, either in general or via a new property/parameter.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)