'/mvnw test' fails with Checkstyle NoHttp errors referencing .advisor/errors/*.log after a failed 'advisor upgrade-plan apply'
search cancel

'/mvnw test' fails with Checkstyle NoHttp errors referencing .advisor/errors/*.log after a failed 'advisor upgrade-plan apply'

book

Article ID: 427261

calendar_today

Updated On:

Products

VMware Tanzu Spring Runtime

Issue/Introduction

After running Application Advisor, subsequent '/mvnw test' fail with Checkstyle errors similar to:

There are XXX errors reported by Checkstyle ... NoHttp: http:// URLs are not allowed...

The reported file paths point to Advisor-generated files, for example:

.advisor/errors/2026....log

The offending URLs are often standard Maven help links (for example, the DependencyResolutionException help page, E.g http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException) or third-party metadata URLs.

When this happens

This commonly occurs when advisor 'upgrade-plan apply' fails on its first run(s) (for example, due to missing/invalid Maven repository credentials), but it still writes failure output into .advisor/errors/*.log. For example, the failure may occur during the “Validating the license of rewrite artifacts” step and Maven reports a 401 Unauthorized while attempting to download Advisor/Rewrite artifacts from Broadcom Artifactory. 

Those '.advisor/errors/*.log' files can contain http:// strings (for example, Maven’s help link and dependency metadata URLs ).
If your project’s Checkstyle configuration scans the whole working tree (or includes .advisor/), it may parse those logs and fail the build.

Environment

Spring Application Advisor

Cause

 

  1. advisor upgrade-plan apply invokes Maven (for example, to perform a license check / SBOM-like analysis).

  2. If Maven cannot authenticate to the Broadcom repositories (for example, token missing/expired), Advisor fails and writes diagnostic output into .advisor/errors/*.log.

  3. Those logs include http://... strings.

  4. Checkstyle’s NoHttp rule later scans the .advisor/errors log file(s) and flags every http:// occurrence.

Resolution

Option 1 (quickest): delete Advisor error logs and rebuild

rm -rf .advisor/errors ./mvnw test
 

Option 2 (recommended): exclude .advisor/** from Checkstyle inputs

Update your Checkstyle plugin configuration set so it only scans src/** (or explicitly excludes .advisor/**). E.g, in pom.xml section under nohttp checkstyle validation, it could look like below

<excludes>**/.advisor/**/*,**/.git/**/*,**/.idea/**/*,**/target/**/,**/.flattened-pom.xml,**/*.class</excludes>