src/main/java/com/redhat/rcm/maven/plugin/buildmetadata/AbstractBuildMojo.java
/**
   * Adds the information as build properties for each provider.
   *
   * @param buildMetaDataProperties the build meta data properties to add to.
   * @param scmInfo the information for the SCM provided to the build plugin.
   * @param providers the providers to iterate over.
   * @param runAtEndOfBuild checks if the provider is configured to be run at
   *          the end of the build. If a provider matches this value, it is run.
   * @throws MojoExecutionException on any problem running on the providers.
   */
Adds the information as build properties for each provider.
@param buildMetaDataProperties the build meta data properties to add to.
@param scmInfo the information for the SCM provided to the build plugin.
@param providers the providers to iterate over.
@param runAtEndOfBuild checks if the provider is configured to be run at
the end of the build. If a provider matches this value, it is run.
@throws MojoExecutionException on any problem running on the providers.
Adds the information as build properties for each provider . @param buildMetaDataProperties the build meta data properties to add to . @param scmInfo the information for the SCM provided to the build plugin . @param providers the providers to iterate over . @param runAtEndOfBuild checks if the provider is configured to be run at the end of the build . If a provider matches this value it is run . @throws MojoExecutionException on any problem running on the providers .
protected final void provideBuildMetaData(
      final Properties buildMetaDataProperties, final ScmInfo scmInfo,
      final List<Provider> providers, final boolean runAtEndOfBuild)
    throws MojoExecutionException
  {
    if (providers != null && !providers.isEmpty())
    {
      final MetaDataProviderBuilder builder =
          new MetaDataProviderBuilder(project, session, runtime, scmInfo);
      for (final Provider providerConfig : providers)
      {
        if (providerConfig.isRunAtEndOfBuild() == runAtEndOfBuild)
        {
          final MetaDataProvider provider = builder.build(providerConfig);
          provider.provideBuildMetaData(buildMetaDataProperties);
        }
      }
    }
  }
protected final void provideBuildMetaData ( final Properties buildMetaDataProperties , final ScmInfo scmInfo , final List < Provider > providers , final boolean runAtEndOfBuild ) throws MojoExecutionException { if ( providers != null && ! providers . isEmpty ( ) ) { final MetaDataProviderBuilder builder = new MetaDataProviderBuilder ( project , session , runtime , scmInfo ) ; for ( final Provider providerConfig : providers ) { if ( providerConfig . isRunAtEndOfBuild ( ) == runAtEndOfBuild ) { final MetaDataProvider provider = builder . build ( providerConfig ) ; provider . provideBuildMetaData ( buildMetaDataProperties ) ; } } } }
Adds the information as build properties for each provider.
Adds the information as build properties for each provider .