docs: protected List<Dependency> createFlattenedDependencies( Model effectiveModel )
      {
  
          List<Dependency> flattenedDependencies = new ArrayList<Dependency>();
          // resolve all direct and inherited dependencies...
          createFlattenedDependencies( effectiveModel, flattenedDependencies );
          if ( isEmbedBuildProfileDependencies() )
          {
              Model projectModel = this.project.getModel();
              Dependencies modelDependencies = new Dependencies();
              modelDependencies.addAll( projectModel.getDependencies() );
              for ( Profile profile : projectModel.getProfiles() )
              {
                  // build-time driven activation (by property or file)?
                  if ( isBuildTimeDriven( profile.getActivation() ) )
                  {
                      List<Dependency> profileDependencies = profile.getDependencies();
                      for ( Dependency profileDependency : profileDependencies )
                      {
                          if ( modelDependencies.contains( profileDependency ) )
                          {
                              // our assumption here is that the profileDependency has been added to model because of
                              // this build-time driven profile. Therefore we need to add it to the flattened POM.
                              // Non build-time driven profiles will remain in the flattened POM with their dependencies
                              // and
                              // allow dynamic dependencies due to OS or JDK.
                              flattenedDependencies.add( profileDependency );
                          }
                      }
                  }
              }
              getLog().debug( "Resolved " + flattenedDependencies.size() + " dependency/-ies for flattened POM." );
          }
          return flattenedDependencies;
      }