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.Assignable
public ConfiguredMavenImporter configureFromClassloaderResource(String path) throws IllegalArgumentException, UnsupportedOperationException, InvalidConfigurationFileException
MavenImporter
MavenImporter
from the result of
ClassLoader.getResource(String)
call using the current Thread.getContextClassLoader()
configureFromClassloaderResource
in interface MavenImporter
path
- A ClassLoader
path to a settings.xml file this MavenImporter
should be configured from.MavenImporter
IllegalArgumentException
- 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
MavenImporter
MavenImporter
from the specified settings.xml fileconfigureFromFile
in interface MavenImporter
file
- A settings.xml File
this MavenImporter
should be configured from.MavenImporter
IllegalArgumentException
- If the file is not specified, is a directory, or does not existUnsupportedOperationException
- If this ConfigurableResolverSystem
does not support configuration by
File
InvalidConfigurationFileException
- If the configuration file contents are not in appropriate formatpublic ConfiguredMavenImporter configureFromFile(String pathToFile) throws IllegalArgumentException, UnsupportedOperationException, InvalidConfigurationFileException
MavenImporter
MavenImporter
from the specified settings.xml file at the specified
pathconfigureFromFile
in interface MavenImporter
pathToFile
- A path to a settings.xml file this MavenImporter
should be configured from.MavenImporter
IllegalArgumentException
- If the file is not specified, is a directory, or does not existUnsupportedOperationException
- If this ConfigurableResolverSystem
does not support configuration by
File
InvalidConfigurationFileException
- If the configuration file contents are not in appropriate formatpublic ConfiguredMavenImporter configureFromClassloaderResource(String path, ClassLoader cl) throws IllegalArgumentException, UnsupportedOperationException, InvalidConfigurationFileException
MavenImporter
ConfigurableResolverSystem
from the result of
ClassLoader.getResource(String)
using the specified ClassLoader
configureFromClassloaderResource
in interface MavenImporter
path
- A ClassLoader
path to a settings.xml file this MavenImporter
should be configured from.cl
- A ClassLoader
MavenImporter
IllegalArgumentException
- 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
PomlessMavenImporter
File
.loadPomFromFile
in interface PomlessMavenImporter
pomFile
- 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
PomlessMavenImporter
File
.loadPomFromFile
in interface PomlessMavenImporter
pomFile
- 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
PomlessMavenImporter
File
by means of File(String)
loadPomFromFile
in interface PomlessMavenImporter
pathToPomFile
- 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
PomlessMavenImporter
File
by means of File(String)
loadPomFromFile
in interface PomlessMavenImporter
pathToPomFile
- 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
PomlessMavenImporter
ClassLoader
resource path, loaded by the current Thread.getContextClassLoader()
.loadPomFromClassLoaderResource
in interface PomlessMavenImporter
pathToPomResource
- 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
PomlessMavenImporter
ClassLoader
resource path, loaded by the specified ClassLoader
.loadPomFromClassLoaderResource
in interface PomlessMavenImporter
pathToPomResource
- A ClassLoader
resource path to a POM filee the maven Importer should be configured from.cl
- A ClassLoader
IllegalArgumentException
- 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
PomlessMavenImporter
ClassLoader
resource path, loaded by the specified ClassLoader
.loadPomFromClassLoaderResource
in interface PomlessMavenImporter
pathToPomResource
- A ClassLoader
resource path to a POM filee the maven Importer should be configured from.cl
- A ClassLoader
profiles
- 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)
PomlessMavenImporter
offline
in interface PomlessMavenImporter
offline
- Whether resolution should be done in "offline". By default, resolution is done in online mode.PomlessMavenImporter
instancepublic PomlessMavenImporter offline()
PomlessMavenImporter
PomlessMavenImporter.offline(boolean)
, passing true
as a parameter.offline
in interface PomlessMavenImporter
PomlessMavenImporter
instanceCopyright © 2021 JBoss by Red Hat. All rights reserved.