public class PluginUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
PLUGIN_SPEC_PATH |
| Constructor and Description |
|---|
PluginUtils() |
| Modifier and Type | Method and Description |
|---|---|
static Set<URL> |
getDefaultMavenRepositories() |
static File |
getM2Path(File m2Dir,
PluginCoordinates coordinates)
Find the plugin artifact in the local .m2 directory.
|
static String |
getMavenPath(PluginCoordinates coordinates)
Calculates the relative path of the artifact from the given coordinates.
|
static String |
getPluginRelativePath(PluginCoordinates coordinates)
Returns the relative path (within a plugin registry's plugins directory) where
the plugin with the given coordinates can be found.
|
static File |
getUserM2Repository()
Gets the user's local m2 directory or null if not found.
|
static PluginSpec |
readPluginSpecFile(URL pluginSpec)
Reads a plugin spec file and returns a
PluginSpec. |
public static final String PLUGIN_SPEC_PATH
public static Set<URL> getDefaultMavenRepositories()
public static String getPluginRelativePath(PluginCoordinates coordinates)
coordinates - the coordinatespublic static PluginSpec readPluginSpecFile(URL pluginSpec) throws Exception
PluginSpec.pluginSpec - the plugin specException - when an unhandled exception occurspublic static File getUserM2Repository()
public static File getM2Path(File m2Dir, PluginCoordinates coordinates)
m2Dir - the maven m2 directorycoordinates - the coordinatespublic static String getMavenPath(PluginCoordinates coordinates)
coordinates - the coordinatesCopyright © 2015 JBoss, a division of Red Hat. All rights reserved.