public class MavenImporterImpl extends Object implements MavenImporter, ConfiguredMavenImporter
| Constructor and Description |
|---|
MavenImporterImpl(org.jboss.shrinkwrap.api.Archive<?> archive) |
| Modifier and Type | Method and Description |
|---|---|
<TYPE extends org.jboss.shrinkwrap.api.Assignable> |
as(Class<TYPE> type) |
ConfiguredMavenImporter |
configureFromClassloaderResource(String path)
Optional operation.
|
ConfiguredMavenImporter |
configureFromClassloaderResource(String path,
ClassLoader cl)
Optional operation.
|
ConfiguredMavenImporter |
configureFromFile(File file)
Optional operation.
|
ConfiguredMavenImporter |
configureFromFile(String pathToFile)
Optional operation.
|
PomEquippedMavenImporter |
loadPomFromClassLoaderResource(String pathToPomResource)
Configures the Maven Importer from Project Object Model contained in the POM file located at the specified
ClassLoader resource path, loaded by the current Thread.getContextClassLoader(). |
PomEquippedMavenImporter |
loadPomFromClassLoaderResource(String pathToPomResource,
ClassLoader cl)
Configures the Maven Importer from Project Object Model contained in the POM file located at the specified
ClassLoader resource path, loaded by the specified ClassLoader. |
PomEquippedMavenImporter |
loadPomFromClassLoaderResource(String pathToPomResource,
ClassLoader cl,
String... profiles)
Configures the Maven Importer from Project Object Model contained in the POM file located at the specified
ClassLoader resource path, loaded by the specified ClassLoader. |
PomEquippedMavenImporter |
loadPomFromFile(File pomFile)
Configures the Maven Importer from Project Object Model contained in the specified POM
File. |
PomEquippedMavenImporter |
loadPomFromFile(File pomFile,
String... profiles)
Configures the Maven Importer from Project Object Model contained in the specified POM
File. |
PomEquippedMavenImporter |
loadPomFromFile(String pathToPomFile)
Configures the Maven Importer from Project Object Model contained in the POM file located at the specified path.
|
PomEquippedMavenImporter |
loadPomFromFile(String pathToPomFile,
String... profiles)
Configures the Maven Importer from Project Object Model contained in the POM file located at the specified path.
|
PomlessMavenImporter |
offline()
Sets that resolution should be done in "offline" (ie.
|
PomlessMavenImporter |
offline(boolean offline)
Sets whether resolution should be done in "offline" (ie.
|
public MavenImporterImpl(org.jboss.shrinkwrap.api.Archive<?> archive)
public <TYPE extends org.jboss.shrinkwrap.api.Assignable> TYPE as(Class<TYPE> type)
as in interface org.jboss.shrinkwrap.api.Assignablepublic ConfiguredMavenImporter configureFromClassloaderResource(String path) throws IllegalArgumentException, UnsupportedOperationException, InvalidConfigurationFileException
MavenImporterMavenImporter from the result of
ClassLoader.getResource(String) call using the current Thread.getContextClassLoader()configureFromClassloaderResource in interface MavenImporterResolverSystemIllegalArgumentException - If the either argument is not specified or if the path can not be foundUnsupportedOperationException - If this ConfigurableResolverSystem does not support configuration by
ClassLoader resourceInvalidConfigurationFileException - If the configuration file contents are not in appropriate formatpublic ConfiguredMavenImporter configureFromFile(File file) throws IllegalArgumentException, UnsupportedOperationException, InvalidConfigurationFileException
MavenImporterMavenImporter from the specified settings.xml fileconfigureFromFile in interface MavenImporterResolverSystemIllegalArgumentException - If the file is not specified, is a directory, or does not existUnsupportedOperationException - If this ConfigurableResolverSystem does not support configuration by
FileInvalidConfigurationFileException - If the configuration file contents are not in appropriate formatpublic ConfiguredMavenImporter configureFromFile(String pathToFile) throws IllegalArgumentException, UnsupportedOperationException, InvalidConfigurationFileException
MavenImporterMavenImporter from the specified settings.xml file at the specified
pathconfigureFromFile in interface MavenImporterResolverSystemIllegalArgumentException - If the file is not specified, is a directory, or does not existUnsupportedOperationException - If this ConfigurableResolverSystem does not support configuration by
FileInvalidConfigurationFileException - If the configuration file contents are not in appropriate formatpublic ConfiguredMavenImporter configureFromClassloaderResource(String path, ClassLoader cl) throws IllegalArgumentException, UnsupportedOperationException, InvalidConfigurationFileException
MavenImporterConfigurableResolverSystem from the result of
ClassLoader.getResource(String) using the specified ClassLoaderconfigureFromClassloaderResource in interface MavenImporterResolverSystemIllegalArgumentException - If the either argument is not specified or if the path can not be foundUnsupportedOperationException - If this ConfigurableResolverSystem does not support configuration by
ClassLoader resourceInvalidConfigurationFileException - If the configuration file contents are not in appropriate formatpublic PomEquippedMavenImporter loadPomFromFile(File pomFile) throws IllegalArgumentException, InvalidConfigurationFileException
PomlessMavenImporterFile.loadPomFromFile in interface PomlessMavenImporterIllegalArgumentException - If no file was specified, if the file does not exist or points to a directoryInvalidConfigurationFileException - If the configuration file contents are not in appropriate formatpublic PomEquippedMavenImporter loadPomFromFile(File pomFile, String... profiles) throws IllegalArgumentException, InvalidConfigurationFileException
PomlessMavenImporterFile.loadPomFromFile in interface PomlessMavenImporterprofiles - Active/inactive profilesIllegalArgumentException - If no file was specified, if the file does not exist or points to a directoryInvalidConfigurationFileException - If the configuration file contents are not in appropriate formatpublic PomEquippedMavenImporter loadPomFromFile(String pathToPomFile) throws IllegalArgumentException, InvalidConfigurationFileException
PomlessMavenImporterFile by means of File.File(String)loadPomFromFile in interface PomlessMavenImporterIllegalArgumentException - If no path was specified, or if the path points to a file which does not exist or is a
directoryInvalidConfigurationFileException - If the configuration file contents are not in appropriate formatpublic PomEquippedMavenImporter loadPomFromFile(String pathToPomFile, String... profiles) throws IllegalArgumentException, InvalidConfigurationFileException
PomlessMavenImporterFile by means of File.File(String)loadPomFromFile in interface PomlessMavenImporterprofiles - Active/inactive profilesIllegalArgumentException - If no path was specified, or if the path points to a file which does not exist or is a
directoryInvalidConfigurationFileException - If the configuration file contents are not in appropriate formatpublic PomEquippedMavenImporter loadPomFromClassLoaderResource(String pathToPomResource) throws IllegalArgumentException, InvalidConfigurationFileException
PomlessMavenImporterClassLoader resource path, loaded by the current Thread.getContextClassLoader().loadPomFromClassLoaderResource in interface PomlessMavenImporterIllegalArgumentException - If no path was specified, or if the resource could not be found at the specified pathInvalidConfigurationFileException - If the configuration file contents are not in appropriate formatpublic PomEquippedMavenImporter loadPomFromClassLoaderResource(String pathToPomResource, ClassLoader cl) throws IllegalArgumentException, InvalidConfigurationFileException
PomlessMavenImporterClassLoader resource path, loaded by the specified ClassLoader.loadPomFromClassLoaderResource in interface PomlessMavenImporterIllegalArgumentException - If no path was specified, no ClassLoader was specified, or if the resource could not be
found at the specified pathInvalidConfigurationFileException - If the configuration file contents are not in appropriate formatpublic PomEquippedMavenImporter loadPomFromClassLoaderResource(String pathToPomResource, ClassLoader cl, String... profiles) throws IllegalArgumentException, InvalidConfigurationFileException
PomlessMavenImporterClassLoader resource path, loaded by the specified ClassLoader.loadPomFromClassLoaderResource in interface PomlessMavenImporterprofiles - Active/inactive profilesIllegalArgumentException - If no path was specified, no ClassLoader was specified, any specified profiles are
invalid or null, or if the resource could not be found at the specified pathInvalidConfigurationFileException - If the configuration file contents are not in appropriate formatpublic PomlessMavenImporter offline(boolean offline)
ConfiguredMavenImporteroffline in interface ConfiguredMavenImporterpublic PomlessMavenImporter offline()
ConfiguredMavenImporterConfiguredMavenImporter.offline(boolean), passing true as a parameter.offline in interface ConfiguredMavenImporterCopyright © 2013 JBoss by Red Hat. All rights reserved.