public class MojoUtils extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
MojoUtils.Attribute
Attribute wrapper class
|
static class |
MojoUtils.Attributes
Collection of attributes wrapper class
|
static class |
MojoUtils.Element
Element wrapper class for configuration elements
|
| Modifier and Type | Field and Description |
|---|---|
static String |
JAVA_EXTENSION |
static String |
KOTLIN_EXTENSION |
static String |
QUARKUS_VERSION_PROPERTY |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
checkProjectForMavenBuildPlugin(org.apache.maven.project.MavenProject project) |
static org.codehaus.plexus.util.xml.Xpp3Dom |
configuration(MojoUtils.Element... elements)
Builds the configuration for the goal using Elements
|
static String |
credentials(org.apache.maven.model.Dependency d) |
static String |
get(String key) |
static Map<String,String> |
getAllProperties() |
static String |
getBomArtifactId() |
static String |
getMavenWrapperVersion() |
static String |
getPluginArtifactId() |
static String |
getPluginGroupId() |
static String |
getPluginVersion() |
static String |
getProposedMavenVersion() |
static boolean |
hasDependency(org.apache.maven.model.Model model,
String groupId,
String artifactId)
Checks whether the project has the dependency
|
static Optional<org.apache.maven.model.Plugin> |
hasPlugin(org.apache.maven.project.MavenProject project,
String pluginKey)
Checks whether or not the given project has a plugin with the given key.
|
static List<Extension> |
loadExtensions() |
static org.apache.maven.model.Dependency |
parse(String dependency) |
static org.apache.maven.model.Plugin |
plugin(String groupId,
String artifactId)
Defines the plugin without its version or extensions.
|
static org.apache.maven.model.Plugin |
plugin(String groupId,
String artifactId,
String version)
Defines a plugin without extensions.
|
static org.apache.maven.model.Plugin |
plugin(String groupId,
String artifactId,
String version,
List<org.apache.maven.model.Dependency> dependencies)
Defines a plugin.
|
static String[] |
readGavFromPom(InputStream resourceAsStream) |
static String[] |
readGavFromSettingsGradle(ByteArrayInputStream buildFileInputStream,
String[] gavIn) |
static org.apache.maven.model.Model |
readPom(File pom) |
static org.apache.maven.model.Model |
readPom(InputStream resourceAsStream) |
static void |
write(org.apache.maven.model.Model model,
File outputFile) |
static void |
write(org.apache.maven.model.Model model,
OutputStream fileOutputStream) |
public static final String JAVA_EXTENSION
public static final String KOTLIN_EXTENSION
public static final String QUARKUS_VERSION_PROPERTY
public static String getPluginArtifactId()
public static String getPluginGroupId()
public static String getPluginVersion()
public static String getBomArtifactId()
public static String getProposedMavenVersion()
public static String getMavenWrapperVersion()
public static Optional<org.apache.maven.model.Plugin> hasPlugin(org.apache.maven.project.MavenProject project, String pluginKey)
project - the projectpluginKey - the pluginpublic static boolean hasDependency(org.apache.maven.model.Model model,
String groupId,
String artifactId)
model - - the project to check existence of dependencygroupId - - the dependency groupIdartifactId - - the dependency artifactIdpublic static org.apache.maven.model.Dependency parse(String dependency)
public static org.codehaus.plexus.util.xml.Xpp3Dom configuration(MojoUtils.Element... elements)
elements - A list of elements for the configuration sectionpublic static org.apache.maven.model.Plugin plugin(String groupId, String artifactId)
groupId - The group idartifactId - The artifact idpublic static org.apache.maven.model.Plugin plugin(String groupId, String artifactId, String version)
groupId - The group idartifactId - The artifact idversion - The plugin versionpublic static org.apache.maven.model.Plugin plugin(String groupId, String artifactId, String version, List<org.apache.maven.model.Dependency> dependencies)
groupId - The group idartifactId - The artifact idversion - The plugin versiondependencies - The plugin extensionspublic static org.apache.maven.model.Model readPom(File pom) throws IOException
IOExceptionpublic static org.apache.maven.model.Model readPom(InputStream resourceAsStream) throws IOException
IOExceptionpublic static String[] readGavFromPom(InputStream resourceAsStream) throws IOException
IOExceptionpublic static void write(org.apache.maven.model.Model model,
File outputFile)
throws IOException
IOExceptionpublic static void write(org.apache.maven.model.Model model,
OutputStream fileOutputStream)
throws IOException
IOExceptionpublic static String credentials(org.apache.maven.model.Dependency d)
public static boolean checkProjectForMavenBuildPlugin(org.apache.maven.project.MavenProject project)
public static String[] readGavFromSettingsGradle(ByteArrayInputStream buildFileInputStream, String[] gavIn)
Copyright © 2019 JBoss by Red Hat. All rights reserved.