public final class MavenUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
GROUP_ID_APACHE_MAVEN |
static String |
GROUP_ID_CODEHAUS_MOJO |
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
coalesce(T... objs)
Returns first non null object or null if all objects are null
|
static String |
getPluginSetting(org.apache.maven.project.MavenProject project,
String groupId,
String artifactId,
String optionName,
String defaultValue)
Search for a configuration setting of an other plugin for a configuration setting.
|
static String |
getSourceEncoding(org.apache.maven.project.MavenProject pom) |
public static final String GROUP_ID_APACHE_MAVEN
public static final String GROUP_ID_CODEHAUS_MOJO
@CheckForNull public static String getSourceEncoding(org.apache.maven.project.MavenProject pom)
pom - the project pompublic static String getPluginSetting(org.apache.maven.project.MavenProject project, String groupId, String artifactId, String optionName, @Nullable String defaultValue)
project - the current maven project to get the configuration from.groupId - the group id of the plugin to search forartifactId - the artifact id of the plugin to search foroptionName - the option to get from the configurationdefaultValue - the default value if the configuration was not found@SafeVarargs public static <T> T coalesce(T... objs)
objs - Copyright © 2009–2018. All rights reserved.