|
Forge - Parent 1.2.3-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DependencyFacet
Nested Class Summary | |
---|---|
static class |
DependencyFacet.KnownRepository
|
Method Summary | |
---|---|
void |
addDirectDependency(Dependency dep)
Add the given Dependency to this Project 's immediate list of dependencies. |
void |
addDirectManagedDependency(Dependency dep)
Add the given managed Dependency to this Project 's immediate list of managed dependencies. |
void |
addManagedDependency(Dependency managedDependency)
Add the given managed Dependency to this Project 's immediate list of managed dependencies. |
void |
addRepository(DependencyFacet.KnownRepository repository)
Add a DependencyFacet.KnownRepository to the project build system. |
void |
addRepository(String name,
String url)
Add a repository to the project build system. |
List<Dependency> |
getDependencies()
Return an immutable list of all direct Dependencies contained within this project. |
List<Dependency> |
getDependenciesInScopes(ScopeType... scopes)
Get a list of this Project 's dependencies of the given ScopeType .. |
Dependency |
getDirectDependency(Dependency dependency)
Attempt to locate the given Dependency , if it exists in the Project direct dependency list, and
return it. |
List<Dependency> |
getEffectiveDependencies()
Return an immutable list of all Dependencies contained anywhere within this project's dependency
hierarchy. |
List<Dependency> |
getEffectiveDependenciesInScopes(ScopeType... scopes)
Get a list of this Project 's dependencies of the given ScopeType , from anywhere in the dependency
hierarchy. |
Dependency |
getEffectiveDependency(Dependency dependency)
Attempt to locate the given Dependency , if it exists anywhere in the Project dependency hierarchy,
and return it. |
Dependency |
getEffectiveManagedDependency(Dependency manDep)
Searches Project and returns a managed dependency matching the given Dependency at any level of
the project hierarchy; return null otherwise. |
List<Dependency> |
getManagedDependencies()
Return an immutable list of all direct managed Dependencies contained within this project. |
Dependency |
getManagedDependency(Dependency managedDependency)
Attempt to locate the given managed Dependency , if it exists in the Project , and return it. |
Map<String,String> |
getProperties()
Return a list of all build dependency properties.(Build properties such, as ${my.version}, can be used anywhere in a dependency, and will be expanded during building to their property value.) |
String |
getProperty(String name)
Get a build property by name. |
List<DependencyRepository> |
getRepositories()
Get the list of repositories for which this project is currently configured to use in dependency resolution. |
boolean |
hasDirectDependency(Dependency dependency)
Return true if this Project contains a dependency matching the given Dependency ; return false
otherwise. |
boolean |
hasDirectManagedDependency(Dependency managedDependency)
Return true if this Project contains a managed dependency matching the given Dependency ; return
false otherwise. |
boolean |
hasEffectiveDependency(Dependency dependency)
Return true if the given Dependency exists anywhere in the project dependency hierarchy. |
boolean |
hasEffectiveManagedDependency(Dependency managedDependency)
Return true if this Project contains a managed dependency matching the given Dependency at any
level of the project hierarchy; return false otherwise. |
boolean |
hasRepository(DependencyFacet.KnownRepository repository)
Return true if the given DependencyFacet.KnownRepository is already registered in this project's build system. |
boolean |
hasRepository(String url)
Return true if the given repository URL is already registered in this project's build system. |
void |
removeDependency(Dependency dependency)
Remove the given Dependency from this facet's Project . |
void |
removeManagedDependency(Dependency managedDependency)
Remove the given managed Dependency from this facet's Project . |
String |
removeProperty(String name)
Remove a build property by name. |
DependencyRepository |
removeRepository(String url)
Remove the given DependencyRepository from the current project. |
List<Dependency> |
resolveAvailableVersions(Dependency dep)
Given a Dependency with a populated groupId, versionId, and version range, identify the available
artifacts in all known repositories for this project. |
List<Dependency> |
resolveAvailableVersions(DependencyQuery query)
Using the given DependencyQuery , identify and resolve all matching Dependency results in
configured DependencyRepository instances for this Project . |
List<Dependency> |
resolveAvailableVersions(String gavs)
Given a groupid:versionid:version-range, identify and resolve all matching artifacts in all known DependencyRepository instances for this Project . |
Dependency |
resolveProperties(Dependency dependency)
Resolve properties in the given dependency, converting them to their actual values. |
void |
setProperty(String name,
String value)
Set a build dependency property. |
Methods inherited from interface org.jboss.forge.project.Facet |
---|
getProject, install, isInstalled, setProject, uninstall |
Method Detail |
---|
void addDirectDependency(Dependency dep)
Dependency
to this Project
's immediate list of dependencies. This method does not
check for existence of dependencies in the hierarchy, instead, directly adds or replaces a direct dependency.
See also: DependencyBuilder
.
void addManagedDependency(Dependency managedDependency)
Dependency
to this Project
's immediate list of managed dependencies. This
method first calls hasEffectiveManagedDependency(Dependency)
before making changes to the managed
dependency list.
See also: DependencyBuilder
.
void addDirectManagedDependency(Dependency dep)
Dependency
to this Project
's immediate list of managed dependencies. This
method does not check for existence of managed dependencies in the hierarchy, instead, directly adds or replaces a
direct managed dependency.
See also: DependencyBuilder
.
void addRepository(DependencyFacet.KnownRepository repository)
DependencyFacet.KnownRepository
to the project build system. This is where dependencies can be found, downloaded,
and installed to the project build script.
void addRepository(String name, String url)
List<Dependency> getDependencies()
Dependencies
contained within this project. (i.e.: all dependencies
for which hasDirectDependency(Dependency)
returns true;
List<Dependency> getDependenciesInScopes(ScopeType... scopes)
Project
's dependencies of the given ScopeType
.. See also:
DependencyBuilder
. See also: #getDependency(Dependency)
.
Dependency getDirectDependency(Dependency dependency)
Dependency
, if it exists in the Project
direct dependency list, and
return it.
See also: DependencyBuilder
. See also: hasDirectDependency(Dependency)
. #hasDependency(Dependency)
may return true.
List<Dependency> getEffectiveDependencies()
Dependencies
contained anywhere within this project's dependency
hierarchy. (i.e.: all dependencies for which hasEffectiveDependency(Dependency)
returns
true;
List<Dependency> getEffectiveDependenciesInScopes(ScopeType... scopes)
Project
's dependencies of the given ScopeType
, from anywhere in the dependency
hierarchy. See also: DependencyBuilder
. See also: getEffectiveDependency(Dependency)
.
Dependency getEffectiveDependency(Dependency dependency)
Dependency
, if it exists anywhere in the Project
dependency hierarchy,
and return it.
See also: DependencyBuilder
. See also: hasEffectiveDependency(Dependency)
.
Dependency getEffectiveManagedDependency(Dependency manDep)
Project
and returns a managed dependency matching the given Dependency
at any level of
the project hierarchy; return null otherwise. This method ignores Dependency.getScopeType()
See also: DependencyBuilder
.
Notice: This method checks the entire project managed dependency structure, meaning that if a managed
dependency is declared somewhere else in the hierarchy, it will not be detected by
getManagedDependency(Dependency)
and will not be removable via
removeManagedDependency(Dependency)
.
List<Dependency> getManagedDependencies()
Dependencies
contained within this project. (i.e.: all
managed dependencies for which ManagedDependencyFacet#hasManagedDependency(Dependency)
returns true;
Dependency getManagedDependency(Dependency managedDependency)
Dependency
, if it exists in the Project
, and return it.
See also: DependencyBuilder
. See also: hasEffectiveManagedDependency(Dependency)
.
Map<String,String> getProperties()
String getProperty(String name)
List<DependencyRepository> getRepositories()
boolean hasDirectDependency(Dependency dependency)
Project
contains a dependency matching the given Dependency
; return false
otherwise. This method ignores Dependency.getScopeType()
See also: DependencyBuilder
.
Notice: This method checks only the immediate project dependencies, meaning that if a dependency is
declared somewhere else in the hierarchy, it will not be detected by this method, even though by
#hasDependency(Dependency)
may return true.
boolean hasEffectiveDependency(Dependency dependency)
Dependency
exists anywhere in the project dependency hierarchy. See also:
DependencyBuilder
. See also: getEffectiveDependency(Dependency)
.
boolean hasEffectiveManagedDependency(Dependency managedDependency)
Project
contains a managed dependency matching the given Dependency
at any
level of the project hierarchy; return false otherwise. This method ignores Dependency.getScopeType()
See also: DependencyBuilder
.
Notice: This method checks the entire project managed dependency structure, meaning that if a managed
dependency is declared somewhere else in the hierarchy, it will not be detected by
#hasManagedDependency(Dependency)
and will not be removable via
removeManagedDependency(Dependency)
.
boolean hasDirectManagedDependency(Dependency managedDependency)
Project
contains a managed dependency matching the given Dependency
; return
false otherwise. This method ignores Dependency.getScopeType()
See also: DependencyBuilder
.
Notice: This method checks only the immediate project managed dependencies, meaning that if a managed
dependency is declared somewhere else in the hierarchy, it will not be detected by this method, even though
hasEffectiveManagedDependency(Dependency)
may return true.
boolean hasRepository(DependencyFacet.KnownRepository repository)
DependencyFacet.KnownRepository
is already registered in this project's build system.
boolean hasRepository(String url)
void removeDependency(Dependency dependency)
Dependency
from this facet's Project
. This method ignores
Dependency.getScopeType()
See also: DependencyBuilder
.
Notice: This method operates only the immediate project dependencies, meaning that if a dependency is
declared somewhere else in the hierarchy, it will not be removable by this method. You should call
hasDirectDependency(Dependency)
first in order to check if the dependency exists in this projects
immediate dependencies.
void removeManagedDependency(Dependency managedDependency)
Dependency
from this facet's Project
. This method ignores
Dependency.getScopeType()
See also: DependencyBuilder
.
Notice: This method operates only the immediate project managed dependencies, meaning that if a managed
dependency is declared somewhere else in the hierarchy, it will not be removable by this method. You should call
#hasManagedDependency(Dependency)
first in order to check if the managed dependency exists in this
projects immediate managed dependencies.
String removeProperty(String name)
DependencyRepository removeRepository(String url)
DependencyRepository
from the current project. Return true if the repository was removed;
return false otherwise. Return the removed repository, or null if no repository was removed.
List<Dependency> resolveAvailableVersions(Dependency dep)
Dependency
with a populated groupId, versionId, and version range, identify the available
artifacts in all known repositories for this project. By default, SNAPSHOT versions are excluded.
See resolveAvailableVersions(String)
. For more comprehensive resolution features, see
DependencyResolver
List<Dependency> resolveAvailableVersions(String gavs)
DependencyRepository
instances for this Project
. By default, SNAPSHOT versions are excluded. For
example:
dependencyFacet.resolveAvailableVersions("org.jboss.forge:example:[1.0.0,]");
dependencyFacet.resolveAvailableVersions("org.jboss.forge:example:[1.0.0,)");
dependencyFacet.resolveAvailableVersions("org.jboss.forge:example:(1.0.0,3.0.0]");
dependencyFacet.resolveAvailableVersions("org.jboss.forge:example:[1.0.0,3.0.0]");
For more comprehensive resolution features, see resolveAvailableVersions(DependencyQuery)
or
DependencyResolver
List<Dependency> resolveAvailableVersions(DependencyQuery query)
DependencyQuery
, identify and resolve all matching Dependency
results in
configured DependencyRepository
instances for this Project
. See also,
resolveAvailableVersions(String)
and resolveAvailableVersions(Dependency)
Dependency resolveProperties(Dependency dependency)
void setProperty(String name, String value)
|
Forge - Parent 1.2.3-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |