public class EnvUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
MAVEN_PROPERTY_REGEXP |
| Modifier and Type | Method and Description |
|---|---|
static List<String> |
extractFromPropertiesAsList(String prefix,
Properties properties)
Extract from given properties a list of string values.
|
static Map<String,String> |
extractFromPropertiesAsMap(String prefix,
Properties properties)
Extract part of given properties as a map.
|
static String |
extractLargerVersion(String versionA,
String versionB)
Compare to version strings and return the larger version strings.
|
static String |
extractMavenPropertyName(String propName)
Extract from a Maven property which is in the form ${name} the name.
|
static String |
extractUrl(String dockerHost) |
static String |
findRegistry(String... checkFirst) |
static String |
getCertPath(String certPath) |
static File |
prepareAbsoluteOutputDirPath(MojoParameters params,
String dir,
String path) |
static File |
prepareAbsoluteSourceDirPath(MojoParameters params,
String path) |
static List<String[]> |
splitOnLastColon(List<String> listToSplit)
Splits every element in the given list on the last colon in the name and returns a list with
two elements: The left part before the colon and the right part after the colon.
|
static String[] |
splitOnSpaceWithEscape(String toSplit) |
static String |
stringJoin(List list,
String separator)
Join a list of objects to a string with a given separator by calling Object.toString() on the elements.
|
public static final String MAVEN_PROPERTY_REGEXP
public static String extractLargerVersion(String versionA, String versionB)
Float.parseFloat(String).
If either version is null, the other version is returned (which can be null as well)versionA - first version numberversionB - second version numberpublic static List<String[]> splitOnLastColon(List<String> listToSplit)
listToSplit - list of strings to splitpublic static String stringJoin(List list, String separator)
list - to joinseparator - separator to usepublic static Map<String,String> extractFromPropertiesAsMap(String prefix, Properties properties)
prefix - prefix which specifies the part which should be extracted as mapproperties - properties to extract frompublic static List<String> extractFromPropertiesAsList(String prefix, Properties properties)
prefix - for selecting the properties from which the list should be extractedproperties - properties from which to extract frompublic static String extractMavenPropertyName(String propName)
propName - property name to extratpublic static File prepareAbsoluteOutputDirPath(MojoParameters params, String dir, String path)
public static File prepareAbsoluteSourceDirPath(MojoParameters params, String path)
Copyright © 2016. All Rights Reserved.