code: public static void afterForkedLifecycleEnter( MavenProject project, List<MavenProject> reactorProjects,
                                                    Map<String, String> additionalProjectPropertiesMap )
      {
          File classesDirectory = new File( project.getBuild().getOutputDirectory() );
          File scoverageClassesDirectory =
              new File( classesDirectory.getParentFile(), "scoverage-" + classesDirectory.getName() );
  
          project.getArtifact().setFile( null );
          project.getBuild().setOutputDirectory( scoverageClassesDirectory.getAbsolutePath() );
  
          if ( additionalProjectPropertiesMap != null )
          {
              for ( Map.Entry<String, String> entry: additionalProjectPropertiesMap.entrySet() )
              {
                  project.getProperties().put( entry.getKey(), entry.getValue() );
              }
          }
  
          for ( MavenProject reactorProject : reactorProjects )
          {
              if ( reactorProject != project )
              {
                  if ( reactorProject.getProperties().containsKey( PROP_FORKED_OUTPUT_DIRECTORY ) )
                  {
                      String forkedOutputDirectory =
                          (String) reactorProject.getProperties().remove/* get */( PROP_FORKED_OUTPUT_DIRECTORY );
                      reactorProject.getProperties().put( PROP_ORIG_OUTPUT_DIRECTORY,
                                                          reactorProject.getBuild().getOutputDirectory() );
                      reactorProject.getBuild().setOutputDirectory( forkedOutputDirectory );
                  }
  
                  if ( reactorProject.getProperties().containsKey( PROP_FORKED_ARTIFACT_FILE ) )
                  {
                      String forkedArtifactFilePath =
                          (String) reactorProject.getProperties().remove/* get */( PROP_FORKED_ARTIFACT_FILE );
                      File originalArtifactFile = reactorProject.getArtifact().getFile();
                      reactorProject.getProperties().put( PROP_ORIG_ARTIFACT_FILE,
                                                          originalArtifactFile == null ? ""
                                                                          : originalArtifactFile.getAbsolutePath() );
                      reactorProject.getArtifact().setFile( "".equals( forkedArtifactFilePath ) ? null
                                                                            : new File( forkedArtifactFilePath ) );
                  }
              }
          }
      }
docs: Configures project and dependent modules in multi-module project when entering forked {@code scoverage}
  life cycle.
  
  @param project Maven project in {@code scoverage} forked life cycle.
  @param reactorProjects all reactor Maven projects.
  @param additionalProjectPropertiesMap additional project properties to set.