public class MavenUtil extends Object
| Constructor and Description |
|---|
MavenUtil() |
| Modifier and Type | Method and Description |
|---|---|
static String |
createDefaultResourceName(org.apache.maven.project.MavenProject project,
String... suffixes) |
static File |
extractKubernetesJson(File f,
Path dir) |
static URLClassLoader |
getCompileClassLoader(org.apache.maven.project.MavenProject project) |
static Properties |
getPropertiesFile(org.apache.maven.project.MavenProject project,
String propertiesFileName)
Returns the given properties file on the project classpath if found or an empty properties object if not
|
static org.apache.maven.project.MavenProject |
getRootProject(org.apache.maven.project.MavenProject project)
Returns the root maven project or null if there is no maven project
|
static Properties |
getSpringBootApplicationProperties(org.apache.maven.project.MavenProject project)
Returns the spring boot `application.properties` or an empty properties object if not found
|
static URLClassLoader |
getTestClassLoader(org.apache.maven.project.MavenProject project) |
static boolean |
hasClass(org.apache.maven.project.MavenProject project,
String... classNames)
Returns true if any of the given class names could be found on the given class loader
|
static boolean |
hasDependency(org.apache.maven.project.MavenProject project,
String groupId)
Returns true if the maven project has a dependency with the given groupId
|
static boolean |
hasKubernetesJson(File f) |
static boolean |
hasPlugin(org.apache.maven.project.MavenProject project,
String plugin) |
static boolean |
isKubernetesJsonArtifact(String classifier,
String type) |
public static boolean isKubernetesJsonArtifact(String classifier, String type)
public static boolean hasKubernetesJson(File f) throws IOException
IOExceptionpublic static File extractKubernetesJson(File f, Path dir) throws IOException
IOExceptionpublic static URLClassLoader getCompileClassLoader(org.apache.maven.project.MavenProject project)
public static URLClassLoader getTestClassLoader(org.apache.maven.project.MavenProject project)
public static String createDefaultResourceName(org.apache.maven.project.MavenProject project, String... suffixes)
public static boolean hasDependency(org.apache.maven.project.MavenProject project,
String groupId)
public static boolean hasPlugin(org.apache.maven.project.MavenProject project,
String plugin)
public static boolean hasClass(org.apache.maven.project.MavenProject project,
String... classNames)
public static Properties getSpringBootApplicationProperties(org.apache.maven.project.MavenProject project)
public static Properties getPropertiesFile(org.apache.maven.project.MavenProject project, String propertiesFileName)
public static org.apache.maven.project.MavenProject getRootProject(org.apache.maven.project.MavenProject project)
Copyright © 2016. All rights reserved.