KWON BYUNGCHANG created BIGTOP-4543:
---------------------------------------

             Summary: hadoop: mvn site intermittently fails under parallel build
                 Key: BIGTOP-4543
                 URL: https://issues.apache.org/jira/browse/BIGTOP-4543
             Project: Bigtop
          Issue Type: Bug
            Reporter: KWON BYUNGCHANG


When Bigtop builds hadoop with Maven parallel mode (-T), the site goal 
intermittently fails:

{code}
[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-site-plugin:3.9.1:site (default-site) on project 
hadoop-aws: Execution default-site of goal 
org.apache.maven.plugins:maven-site-plugin:3.9.1:site failed: Cannot invoke 
"String.length()" because "s" is null -> [Help 1]
{code}

Root cause: the site mojo in maven-site-plugin 3.9.1 is not marked @threadSafe:

{code}
@Mojo( name = "site", requiresDependencyResolution = ResolutionScope.TEST, 
requiresReports = true )
{code}

With -T, Maven only warns about non-thread-safe plugins and still runs them in 
parallel. Concurrent site executions across modules race on shared components 
(Doxia SiteRenderer, Velocity, plexus), which surfaces as the NPE above. The 
failure is non-deterministic and the failing module varies between runs.

Fix: in the hadoop do-component-build, run the mvn site invocation with -T 1, 
keeping parallelism for the main build.




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to