File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed
src/main/java/org/scoverage/plugin Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -479,6 +479,36 @@ else if ( !module.getPackaging().equals( "pom" ) )
479479 }
480480 }
481481
482+ if (null == topLevelModule )
483+ {
484+ for ( MavenProject module : reactorProjects )
485+ {
486+ if ( !module .hasParent () )
487+ {
488+ continue ;
489+ }
490+
491+ MavenProject parent = module .getParent ();
492+ while ( parent .hasParent () )
493+ {
494+ parent = parent .getParent ();
495+ }
496+ if ( null != topLevelModule )
497+ {
498+ if (topLevelModule .getBasedir ().getAbsolutePath ().length ()
499+ < parent .getBasedir ().getAbsolutePath ().length ())
500+ {
501+ continue ;
502+ }
503+ }
504+ topLevelModule = parent ;
505+ }
506+ if ( null == topLevelModule )
507+ {
508+ topLevelModule = project ;
509+ }
510+ }
511+
482512 /* Empty report must be generated or top-level site will contain invalid link to non-existent Scoverage report
483513 if ( scoverageDataDirs.isEmpty() )
484514 {
You can’t perform that action at this time.
0 commit comments