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()
Optional operation.
|
PomlessMavenImporter |
offline(boolean offline)
Optional operation.
|
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 MavenImporterpath - A ClassLoader path to a settings.xml file this MavenImporter should be configured from.MavenImporterIllegalArgumentException - 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 MavenImporterfile - A settings.xml File this MavenImporter should be configured from.MavenImporterIllegalArgumentException - 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 MavenImporterpathToFile - A path to a settings.xml file this MavenImporter should be configured from.MavenImporterIllegalArgumentException - 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 MavenImporterpath - A ClassLoader path to a settings.xml file this MavenImporter should be configured from.cl - A ClassLoaderMavenImporterIllegalArgumentException - 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 PomlessMavenImporterpomFile - A POM File the maven Importer should be configured from.IllegalArgumentException - 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 PomlessMavenImporterpomFile - A POM File the maven Importer should be configured from.profiles - 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(String)loadPomFromFile in interface PomlessMavenImporterpathToPomFile - A path to a POM file the maven Importer should be configured from.IllegalArgumentException - 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(String)loadPomFromFile in interface PomlessMavenImporterpathToPomFile - A path to a POM file the maven Importer should be configured from.profiles - 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 PomlessMavenImporterpathToPomResource - A ClassLoader resource path to a POM filee the maven Importer should be configured from.IllegalArgumentException - 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 PomlessMavenImporterpathToPomResource - A ClassLoader resource path to a POM filee the maven Importer should be configured from.cl - A ClassLoaderIllegalArgumentException - 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 PomlessMavenImporterpathToPomResource - A ClassLoader resource path to a POM filee the maven Importer should be configured from.cl - A ClassLoaderprofiles - 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)
PomlessMavenImporteroffline in interface PomlessMavenImporteroffline - Whether resolution should be done in "offline". By default, resolution is done in online mode.PomlessMavenImporter instancepublic PomlessMavenImporter offline()
PomlessMavenImporterPomlessMavenImporter.offline(boolean), passing true as a parameter.offline in interface PomlessMavenImporterPomlessMavenImporter instanceCopyright © 2025 JBoss by Red Hat. All rights reserved.