File tree 1 file changed +30
-0
lines changed
src/main/java/org/scoverage/plugin
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" ) )
513
513
}
514
514
}
515
515
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
+
516
546
/* Empty report must be generated or top-level site will contain invalid link to non-existent Scoverage report
517
547
if ( scoverageDataDirs.isEmpty() )
518
548
{
You can’t perform that action at this time.
0 commit comments