public class MavenUtil extends Object
Constructor and Description |
---|
MavenUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
createArchive(File sourceDir,
File destinationFile,
org.codehaus.plexus.archiver.jar.JarArchiver archiver) |
static void |
createArchive(File sourceDir,
File destinationFile,
org.codehaus.plexus.archiver.tar.TarArchiver archiver) |
static void |
createArchive(File sourceDir,
File destinationFile,
org.codehaus.plexus.archiver.zip.ZipArchiver archiver) |
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 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 URLClassLoader |
getTestClassLoader(org.apache.maven.project.MavenProject project) |
static String |
getVersion(String groupId,
String artifactId)
Returns the version from the list of pre-configured versions of common groupId/artifact pairs
|
static boolean |
hasAllClasses(org.apache.maven.project.MavenProject project,
String... classNames)
Returns true if all the given class names could be found on the given class loader
|
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
IOException
public static File extractKubernetesJson(File f, Path dir) throws IOException
IOException
public 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 boolean hasAllClasses(org.apache.maven.project.MavenProject project, String... classNames)
public static org.apache.maven.project.MavenProject getRootProject(org.apache.maven.project.MavenProject project)
public static void createArchive(File sourceDir, File destinationFile, org.codehaus.plexus.archiver.tar.TarArchiver archiver) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
public static void createArchive(File sourceDir, File destinationFile, org.codehaus.plexus.archiver.zip.ZipArchiver archiver) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
public static void createArchive(File sourceDir, File destinationFile, org.codehaus.plexus.archiver.jar.JarArchiver archiver) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
public static String getVersion(String groupId, String artifactId) throws IOException
IOException
Copyright © 2017. All rights reserved.