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 @@ -513,6 +513,36 @@ else if ( !module.getPackaging().equals( "pom" ) )
513513 }
514514 }
515515
516+ if (null == topLevelModule )
517+ {
518+ for ( MavenProject module : reactorProjects )
519+ {
520+ if ( !module .hasParent () )
521+ {
522+ continue ;
523+ }
524+
525+ MavenProject parent = module .getParent ();
526+ while ( parent .hasParent () )
527+ {
528+ parent = parent .getParent ();
529+ }
530+ if ( null != topLevelModule )
531+ {
532+ if (topLevelModule .getBasedir ().getAbsolutePath ().length ()
533+ < parent .getBasedir ().getAbsolutePath ().length ())
534+ {
535+ continue ;
536+ }
537+ }
538+ topLevelModule = parent ;
539+ }
540+ if ( null == topLevelModule )
541+ {
542+ topLevelModule = project ;
543+ }
544+ }
545+
516546 /* Empty report must be generated or top-level site will contain invalid link to non-existent Scoverage report
517547 if ( scoverageDataDirs.isEmpty() )
518548 {
You can’t perform that action at this time.
0 commit comments