public class ArtifactIsolatedClassLoaderBuilder extends Object
ClassPathUrlProvider
: defines the initial classpath to be classified, it consists in a List
of
URL
'sClassPathClassifier
: classifies the classpath URLs and builds the List
or URL
s for each
ClassLoader
ArtifactClassLoaderHolder
that references the
ArtifactClassLoader
for the application, plugins and container.Constructor and Description |
---|
ArtifactIsolatedClassLoaderBuilder() |
Modifier and Type | Method and Description |
---|---|
ArtifactClassLoaderHolder |
build()
Builds the
ArtifactClassLoaderHolder with the
ArtifactClassLoader s for application, plugins and container. |
ArtifactIsolatedClassLoaderBuilder |
setApplicationLibCoordinates(Set<String> applicationLibCoordinates)
Sets the
Set of Maven coordinates in format <groupId>:<artifactId> or <groupId>:<artifactId>:<classifier>
in order to be added to the application ArtifactClassLoader |
ArtifactIsolatedClassLoaderBuilder |
setApplicationSharedLibCoordinates(Set<String> applicationSharedLibCoordinates)
Sets the
Set of Maven coordinates in format <groupId>:<artifactId> or <groupId>:<artifactId>:<classifier>
in order to be added to the sharedLib ArtifactClassLoader |
ArtifactIsolatedClassLoaderBuilder |
setClassPathClassifier(ClassPathClassifier classPathClassifier)
Sets the
ClassPathClassifier implementation to be used by the builder. |
ArtifactIsolatedClassLoaderBuilder |
setClassPathUrlProvider(ClassPathUrlProvider classPathUrlProvider)
Sets the
ClassPathUrlProvider implementation to be used by the builder. |
ArtifactIsolatedClassLoaderBuilder |
setExcludedArtifacts(Set<String> excludedArtifacts)
Sets the Maven artifacts to be excluded from artifact class loaders created here due to they are going to be added as boot
packages.
|
ArtifactIsolatedClassLoaderBuilder |
setExportPluginClasses(Set<Class> exportPluginClasses)
|
ArtifactIsolatedClassLoaderBuilder |
setExtensionMetadataGeneration(boolean extensionMetadataGenerationEnabled)
Sets to
true if while building the a plugin ArtifactClassLoader
for an Extension the metadata should be generated. |
ArtifactIsolatedClassLoaderBuilder |
setExtraBootPackages(List<String> extraBootPackages)
|
ArtifactIsolatedClassLoaderBuilder |
setExtraPrivilegedArtifacts(Set<String> extraPrivilegedArtifacts)
|
ArtifactIsolatedClassLoaderBuilder |
setPluginResourcesFolder(File pluginResourcesFolder)
Sets the
File where resources for classification will be created. |
ArtifactIsolatedClassLoaderBuilder |
setProvidedExclusions(Set<String> providedExclusions)
Sets Maven artifacts to be excluded from the
provided scope direct dependencies of the rootArtifact. |
ArtifactIsolatedClassLoaderBuilder |
setRootArtifactClassesFolder(File rootArtifactClassesFolder)
Sets the
File rootArtifactClassesFolder to be used by the classification process. |
ArtifactIsolatedClassLoaderBuilder |
setTestExclusions(Set<String> testExclusions)
Sets the
Set of exclusion Maven coordinates to be excluded from test dependencies of rootArtifact. |
ArtifactIsolatedClassLoaderBuilder |
setTestInclusions(Set<String> testInclusions)
Sets the
Set of inclusion Maven coordinates to be included from test dependencies of rootArtifact. |
ArtifactIsolatedClassLoaderBuilder |
setTestRunnerExportedLibCoordinates(Set<String> testRunnerExportedLibCoordinates)
Sets the
Set of Maven coordinates in format <groupId>:<artifactId> or <groupId>:<artifactId>:<classifier>
in order to be exported on the test runner's ArtifactClassLoader in addition to test classes and resources from the
module being tested |
ArtifactIsolatedClassLoaderBuilder |
setTestRunnerPluginUrls(List<URL> testRunnerPluginUrls)
Sets a
List of URL s to be appended to the application
ArtifactClassLoader in addition to the ones classified. |
public ArtifactIsolatedClassLoaderBuilder setApplicationSharedLibCoordinates(Set<String> applicationSharedLibCoordinates)
Set
of Maven coordinates in format <groupId>:<artifactId>
or <groupId>:<artifactId>:<classifier>
in order to be added to the sharedLib ArtifactClassLoader
applicationSharedLibCoordinates
- List
of Maven coordinates to addpublic ArtifactIsolatedClassLoaderBuilder setApplicationLibCoordinates(Set<String> applicationLibCoordinates)
Set
of Maven coordinates in format <groupId>:<artifactId>
or <groupId>:<artifactId>:<classifier>
in order to be added to the application ArtifactClassLoader
applicationLibCoordinates
- List
of Maven coordinates to addpublic ArtifactIsolatedClassLoaderBuilder setTestRunnerExportedLibCoordinates(Set<String> testRunnerExportedLibCoordinates)
Set
of Maven coordinates in format <groupId>:<artifactId>
or <groupId>:<artifactId>:<classifier>
in order to be exported on the test runner's ArtifactClassLoader
in addition to test classes and resources from the
module being testedtestRunnerExportedLibCoordinates
- List
of Maven coordinates to addpublic ArtifactIsolatedClassLoaderBuilder setClassPathClassifier(ClassPathClassifier classPathClassifier)
ClassPathClassifier
implementation to be used by the builder.classPathClassifier
- ClassPathClassifier
implementation to be used by the builder.public ArtifactIsolatedClassLoaderBuilder setClassPathUrlProvider(ClassPathUrlProvider classPathUrlProvider)
ClassPathUrlProvider
implementation to be used by the builder.classPathUrlProvider
- ClassPathUrlProvider
implementation to be used by the builder.public ArtifactIsolatedClassLoaderBuilder setRootArtifactClassesFolder(File rootArtifactClassesFolder)
File
rootArtifactClassesFolder to be used by the classification process.rootArtifactClassesFolder
- File
rootArtifactClassesFolder to be used by the classification process.public ArtifactIsolatedClassLoaderBuilder setPluginResourcesFolder(File pluginResourcesFolder)
File
where resources for classification will be created.pluginResourcesFolder
- File
where resources for classification will be created.public ArtifactIsolatedClassLoaderBuilder setExcludedArtifacts(Set<String> excludedArtifacts)
[groupId]:[artifactId]:[extension]:[classifier]:[version]
.excludedArtifacts
- Maven artifacts to be excluded from artifact class loaders created here due to they are going to be
added as boot packages. In format [groupId]:[artifactId]:[extension]:[classifier]:[version]
.public ArtifactIsolatedClassLoaderBuilder setExtraBootPackages(List<String> extraBootPackages)
public ArtifactIsolatedClassLoaderBuilder setExtraPrivilegedArtifacts(Set<String> extraPrivilegedArtifacts)
public ArtifactIsolatedClassLoaderBuilder setProvidedExclusions(Set<String> providedExclusions)
provided
scope direct dependencies of the rootArtifact. In format
[groupId]:[artifactId]:[extension]:[classifier]:[version]
.
providedExclusions
- Maven artifacts to be excluded from the provided
scope direct dependencies of the
rootArtifact. In format [groupId]:[artifactId]:[extension]:[classifier]:[version]
.public ArtifactIsolatedClassLoaderBuilder setTestExclusions(Set<String> testExclusions)
Set
of exclusion Maven coordinates to be excluded from test dependencies of rootArtifact. In format
[groupId]:[artifactId]:[extension]:[classifier]:[version]
.testExclusions
- Set
of exclusion Maven coordinates to be excluded from test dependencies of rootArtifact. In
format [groupId]:[artifactId]:[extension]:[classifier]:[version]
.public ArtifactIsolatedClassLoaderBuilder setTestInclusions(Set<String> testInclusions)
Set
of inclusion Maven coordinates to be included from test dependencies of rootArtifact. In format
[groupId]:[artifactId]:[extension]:[classifier]:[version]
.testInclusions
- Set
of inclusion Maven coordinates to be excluded from test dependencies of rootArtifact. In
format [groupId]:[artifactId]:[extension]:[classifier]:[version]
.public ArtifactIsolatedClassLoaderBuilder setExportPluginClasses(Set<Class> exportPluginClasses)
Set
of Class
es to be exported by rootArtifact (if it is a Mule plugin) in addition to their APIs,
for testing purposes only.exportPluginClasses
- of Class
es to be exported by rootArtifact (if it is a Mule plugin) in addition to their
APIs, for testing purposes only.public ArtifactIsolatedClassLoaderBuilder setExtensionMetadataGeneration(boolean extensionMetadataGenerationEnabled)
true
if while building the a plugin ArtifactClassLoader
for an Extension
the metadata should be generated.extensionMetadataGenerationEnabled
- boolean
to enable Extension metadata generation.public ArtifactIsolatedClassLoaderBuilder setTestRunnerPluginUrls(List<URL> testRunnerPluginUrls)
List
of URL
s to be appended to the application
ArtifactClassLoader
in addition to the ones classified.{@link
- List} of URL
s to be appended to the application
ArtifactClassLoader
in addition to the ones classified.public ArtifactClassLoaderHolder build()
ArtifactClassLoaderHolder
with the
ArtifactClassLoader
s for application, plugins and container.ArtifactClassLoaderHolder
as output of the classification process.{@link
- IOException} if there was an error while creating the classification context{@link
- NullPointerException} if any of the required attributes is not set to this builderCopyright © 2018. All rights reserved.