[
https://issues.apache.org/jira/browse/YETUS-221?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15049287#comment-15049287
]
Chris Nauroth commented on YETUS-221:
-------------------------------------
Darn, Maven makes this harder than I expected.
I tested this patch with the repro I described above, and it didn't work. The
problem is the behavior of {{--fail-at-end}} is to "ban" subsequent modules in
the reactor that have a dependency on the earlier one that failed. Since
hadoop-yarn-server-resourcemanager has a dependency on hadoop-hdfs, it still
didn't run hadoop-yarn-server-resourcemanager:
{code}
[INFO] ------------------------------------------------------------------------
[INFO] Skipping Apache Hadoop YARN Server Tests
[INFO] This project has been banned from the build due to previous failures.
[INFO] ------------------------------------------------------------------------
{code}
The dependency check and ban here is somewhat bogus IMO, because for RAT, we
just want to do some simple static analysis that license headers are in place.
I don't see a way to change this behavior of Maven though.
{{--fail-never}} has the behavior that it really tries to build everything.
Unfortunately, then we'll always get a zero exit code and report asflicense as
successful.
The options as I see it at this point:
# Use {{--fail-never}}. Don't trust the exit code. Instead, trust the grep
counts of the output.
# Resolve it as Won't Fix. Having a license violation checked in to a codebase
is a rare edge case, and it always gets corrected quickly. Maybe it's not
worth the complexity trying to solve for it.
Thoughts?
> asflicense check exits multi-module Maven build early if there are
> pre-existing license problems.
> -------------------------------------------------------------------------------------------------
>
> Key: YETUS-221
> URL: https://issues.apache.org/jira/browse/YETUS-221
> Project: Yetus
> Issue Type: Bug
> Components: Test Patch
> Reporter: Chris Nauroth
> Assignee: Allen Wittenauer
> Attachments: YETUS-221.00.patch
>
>
> The asflicense check runs {{mvn apache-rat:check}} from the root of the
> project (unless told otherwise). For a multi-module build, the build exits
> with failure after the first occurrence of a module with a license problem.
> It won't check subsequent modules. If the patch in question is touching one
> of those subsequent modules, then asflicense won't check it. A reviewer
> might incorrectly conclude that the patch is fine, because the pre-existing
> license problems are unrelated.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)