public final class MavenDependencies extends Object
MavenDependency
instancesModifier and Type | Method and Description |
---|---|
static MavenDependency |
createDependency(MavenCoordinate coordinate,
ScopeType scope,
boolean optional,
MavenDependencyExclusion... exclusions)
Creates a new
MavenDependency instance from the specified properties. |
static MavenDependency |
createDependency(String canonicalForm,
ScopeType scope,
boolean optional,
MavenDependencyExclusion... exclusions)
Creates a new
MavenDependency instance from the specified, required canonical form in format
<groupId>:<artifactId>[:<packagingType>[:<classifier>]][:<version>] , with the additional, optional
properties. |
static MavenDependencyExclusion |
createExclusion(String canonicalForm)
Creates a new
MavenDependencyExclusion instance from the specified, required canonical form in format
<groupId>:<artifactId> |
static MavenDependencyExclusion |
createExclusion(String groupId,
String artifactId)
Creates a new
MavenDependencyExclusion instance from the specified, required arguments |
public static MavenDependency createDependency(String canonicalForm, ScopeType scope, boolean optional, MavenDependencyExclusion... exclusions) throws IllegalArgumentException, CoordinateParseException
MavenDependency
instance from the specified, required canonical form in format
<groupId>:<artifactId>[:<packagingType>[:<classifier>]][:<version>]
, with the additional, optional
properties. If no ScopeType
is specified, default will be ScopeType.COMPILE
.canonicalForm
- A canonical form in format <groupId>:<artifactId>[:<packagingType>[:<classifier>]][:<version>]
of the new MavenDependency
instance.scope
- A scope of the new MavenDependency
instance. Default will be ScopeType.COMPILE
.optional
- Whether or not this MavenDependency
has been marked as optional; defaults to false
.exclusions
- Exclusions of the new MavenDependency
instance.MavenDependency
instance.IllegalArgumentException
- If the canonical form is not suppliedCoordinateParseException
- If the specified canonical form is not validpublic static MavenDependency createDependency(MavenCoordinate coordinate, ScopeType scope, boolean optional, MavenDependencyExclusion... exclusions) throws IllegalArgumentException, CoordinateParseException
MavenDependency
instance from the specified properties. If no ScopeType
is
specified, default will be ScopeType.COMPILE
.coordinate
- A coordinate of the new MavenDependency
instance.scope
- A scope of the new MavenDependency
instance. Default will be ScopeType.COMPILE
.optional
- Whether or not this MavenDependency
has been marked as optional; defaults to false
.exclusions
- Exclusions of the new MavenDependency
instance.MavenDependency
instance.IllegalArgumentException
- If the coordinate is not suppliedCoordinateParseException
- If the specified canonical form is not validpublic static MavenDependencyExclusion createExclusion(String canonicalForm) throws IllegalArgumentException, CoordinateParseException
MavenDependencyExclusion
instance from the specified, required canonical form in format
<groupId>:<artifactId>
canonicalForm
- A canonical form in format <groupId>:<artifactId>
MavenDependencyExclusion
instance.IllegalArgumentException
- If the canonical form is not suppliedCoordinateParseException
- If the canonical form is not in the correct formatpublic static MavenDependencyExclusion createExclusion(String groupId, String artifactId) throws IllegalArgumentException
MavenDependencyExclusion
instance from the specified, required argumentsgroupId
- A groupId of the new MavenDependencyExclusion
instance.artifactId
- An artifactId of the new MavenDependencyExclusion
instance.MavenDependencyExclusion
instance.IllegalArgumentException
- If either argument is not specifiedCopyright © 2022 JBoss by Red Hat. All rights reserved.