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.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
ResolverSystem
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
ResolverSystem
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
ResolverSystem
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
ResolverSystem
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
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
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.File(String)
loadPomFromFile
in interface PomlessMavenImporter
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.File(String)
loadPomFromFile
in interface PomlessMavenImporter
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
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
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
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)
ConfiguredMavenImporter
offline
in interface ConfiguredMavenImporter
public PomlessMavenImporter offline()
ConfiguredMavenImporter
ConfiguredMavenImporter.offline(boolean)
, passing true
as a parameter.offline
in interface ConfiguredMavenImporter
Copyright © 2013 JBoss by Red Hat. All rights reserved.