chore(release-script): run notice:check + license:check in preflight#559
Merged
Merged
Conversation
Problem: the styling phase ran 'mvn notice:generate license:format
javadoc:fix' and treated a clean git diff afterward as proof of no
drift. That left two failure paths uncovered:
1. notice:generate writes to target/, not the root NOTICE. After
a dependency was dropped from pom.xml the root NOTICE stayed
stale, the script's diff check found nothing, and the drift
only surfaced when mvn release:prepare's `clean verify` invoked
notice:check mid-release.
2. license:format only updates files that have a header to update.
Files added without a header (the script's own omission of an
Apache header on release-portlet.sh in PR uPortal-Project#557 is the canonical
case) slipped through entirely. license:check would have caught
it; the script never ran it.
Both failure modes hit the SimpleContentPortlet 3.4.3 release today
and each cost a round of mvn release:clean + manual prep commit +
push + retry.
Goal: run notice:check and license:check during preflight. If
notice:check fails and target/NOTICE.expected has the correct content,
auto-sync it to the root NOTICE and re-verify (matches the documented
'review changes and commit' workflow). If either check still fails,
abort with the log tail. If working tree has any auto-fixed changes,
abort with the diff so the operator commits 'chore: pre-release prep'
before retrying.
Changes:
- replace the diff-only styling verification with explicit invocations
of notice:check and license:check after the formatters run
- auto-copy target/NOTICE.expected over NOTICE when notice:check
reports drift, then re-verify
- preserve the existing operator-review-then-commit-then-rerun loop
for any remaining auto-fixed working-tree changes
ChristianMurphy
approved these changes
May 13, 2026
Member
ChristianMurphy
left a comment
There was a problem hiding this comment.
Script looks fine, does Maven not have a built in way to chain these commands together?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
notice:checkandlicense:checkduring preflight instead of just running the formatters and trustinggit diffto detect drifttarget/NOTICE.expectedover rootNOTICEwhennotice:checkreports drift, then re-verify (matches the documented "review changes and commit" workflow)Why
The 3.4.3 release (cut today via this script) hit two failure paths that the preflight should have caught but didn't:
NOTICE drift:
notice:generatewrites totarget/, not the rootNOTICE. After a dependency was dropped frompom.xml(theresource-server-contentoverlay in refactor: CKEditor webjar swap + drop resource-server-content overlay #554), the rootNOTICEstayed stale, the script'sgit diffcheck found nothing, and the drift only surfaced whenmvn release:prepare'sclean verifyinvokednotice:checkmid-release.Missing license header:
license:formatonly updates files that have a header to update.release-portlet.shwas committed in chore: add release-portlet.sh (Maven release preflight + cut script) #557 without an Apache header at all and slipped past the script's styling pass entirely.license:checkwould have caught it; the script never ran it.Both failures cost a full
mvn release:clean+ manual prep commit + push + retry per occurrence.Test plan
NOTICE(e.g. delete a known-current line), runrelease-portlet.sh --release X --next Yand confirm Phase 5 auto-syncstarget/NOTICE.expected → NOTICEand aborts with the diff for operator reviewlicense:checkoutput rather than proceeding to the destructive release plugin