public class MavenProjectUtil extends Object
| Constructor and Description |
|---|
MavenProjectUtil() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
doesPluginGoalExecutionExist(org.apache.maven.project.MavenProject project,
String pluginKey,
String goal)
Checks that the plugin exists for the given pluginKey.
|
static int |
getMajorPluginVersion(org.apache.maven.project.MavenProject project,
String pluginKey)
Get major plugin version
|
static File |
getManifestFile(org.apache.maven.project.MavenProject proj,
String pluginArtifactId)
Get manifest file from plugin configuration
|
static String |
getPluginConfiguration(org.apache.maven.project.MavenProject proj,
String pluginGroupId,
String pluginArtifactId,
String key)
Get a configuration value from a plugin
|
static String |
getPluginExecutionConfiguration(org.apache.maven.project.MavenProject proj,
String pluginGroupId,
String pluginArtifactId,
String executionId,
String key)
Get a configuration value from an execution of a plugin
|
static String |
getPluginGoalConfigurationString(org.apache.maven.project.MavenProject project,
String pluginKey,
String goal,
String configName)
Get a configuration value from a goal from a plugin
|
static org.apache.maven.model.PluginExecution |
getPluginGoalExecution(org.apache.maven.project.MavenProject project,
String pluginKey,
String goal)
Get an execution of a plugin
|
static org.apache.maven.model.PluginExecution |
getPluginGoalExecution(org.apache.maven.model.Plugin plugin,
String goal)
Get an execution of a plugin
|
static Map<String,String> |
getWebResourcesConfiguration(org.apache.maven.project.MavenProject proj)
Get directory and targetPath configuration values from the Maven WAR plugin
|
public static String getPluginConfiguration(org.apache.maven.project.MavenProject proj, String pluginGroupId, String pluginArtifactId, String key)
proj - the Maven projectpluginGroupId - the plugin group idpluginArtifactId - the plugin artifact idkey - the configuration key to get frompublic static String getPluginExecutionConfiguration(org.apache.maven.project.MavenProject proj, String pluginGroupId, String pluginArtifactId, String executionId, String key)
proj - the Maven projectpluginGroupId - the plugin group idpluginArtifactId - the plugin artifact idexecutionId - the plugin execution idkey - the configuration key to get frompublic static Map<String,String> getWebResourcesConfiguration(org.apache.maven.project.MavenProject proj)
proj - the Maven projectpublic static String getPluginGoalConfigurationString(org.apache.maven.project.MavenProject project, String pluginKey, String goal, String configName) throws io.openliberty.tools.common.plugins.util.PluginScenarioException
project - pluginKey - goal - configName - io.openliberty.tools.common.plugins.util.PluginScenarioExceptionpublic static boolean doesPluginGoalExecutionExist(org.apache.maven.project.MavenProject project,
String pluginKey,
String goal)
public static org.apache.maven.model.PluginExecution getPluginGoalExecution(org.apache.maven.model.Plugin plugin,
String goal)
throws io.openliberty.tools.common.plugins.util.PluginScenarioException
plugin - goal - io.openliberty.tools.common.plugins.util.PluginScenarioExceptionpublic static org.apache.maven.model.PluginExecution getPluginGoalExecution(org.apache.maven.project.MavenProject project,
String pluginKey,
String goal)
throws io.openliberty.tools.common.plugins.util.PluginScenarioException
project - pluginKey - goal - io.openliberty.tools.common.plugins.util.PluginScenarioExceptionpublic static File getManifestFile(org.apache.maven.project.MavenProject proj, String pluginArtifactId)
proj - pluginArtifactId - public static int getMajorPluginVersion(org.apache.maven.project.MavenProject project,
String pluginKey)
throws io.openliberty.tools.common.plugins.util.PluginScenarioException
project - pluginKey - io.openliberty.tools.common.plugins.util.PluginScenarioExceptionCopyright © 2021 the original author or authors.