![JAR search and dependency download from the Maven repository](/logo.png)
de.smartics.maven.plugin.buildmetadata.data.Provider Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of buildmetadata-maven-plugin Show documentation
Show all versions of buildmetadata-maven-plugin Show documentation
Generates metadata on a project collected on build time.
The newest version!
/*
* Copyright 2006-2019 smartics, Kronseder & Reiner GmbH
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package de.smartics.maven.plugin.buildmetadata.data;
import java.util.Map;
/**
* Configuration instance to create instances of
* {@link de.smartics.maven.plugin.buildmetadata.data.MetaDataProvider} by the
* {@link de.smartics.maven.plugin.buildmetadata.data.MetaDataProviderBuilder}.
*/
public class Provider {
// ********************************* Fields *********************************
// --- constants ------------------------------------------------------------
/**
* The name of the property to indicate that a provider is to be run with the
* build point mojo. Usually this kind of provider export the build
* information to a backend system or measures time at a given point of the
* build.
*
* The value of this constant is {@value}.
*
*/
public static final String RUN_AT_BUILD_POINT = "runAtBuildPoint";
// --- members --------------------------------------------------------------
/**
* The class to instantiate.
*/
private String type;
/**
* Properties to set.
*/
private Map properties;
// ****************************** Initializer *******************************
// ****************************** Constructors ******************************
// ****************************** Inner Classes *****************************
// ********************************* Methods ********************************
// --- init -----------------------------------------------------------------
// --- get&set --------------------------------------------------------------
/**
* Returns the class to instantiate.
*
* @return the class to instantiate.
*/
public final String getType() {
return type;
}
/**
* Returns the value for properties.
*
* Properties to set.
*
*
* @return the value for properties.
*/
public final Map getProperties() {
return properties;
}
/**
* Checks if the provider is configured to be run at the end of the build.
* Usually this kind of provider export the build information to a backend
* system.
*
* @return true
if the provider runs at the end of the build,
* false
if it runs at the start.
*/
public final boolean isRunAtEndOfBuild() {
return ("true".equals(properties.get(RUN_AT_BUILD_POINT)));
}
// --- business -------------------------------------------------------------
// --- object basics --------------------------------------------------------
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy