|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.smartics.maven.util.eclipse.WorkspaceUtils
public final class WorkspaceUtils
This utility class provides functions that deal with the eclipse workspace useful for Maven plugins.
Method Summary | |
---|---|
static Set<String> |
fetchMavenProjectIds(MavenContext context, File workspaceDir, Set<String> includes, Set<String> excludes, boolean filterSubprojects) Returns the set of IDs of Maven projects found in the given workspace directory. |
static Set<MavenProject> |
fetchMavenProjects(MavenContext context, File workspaceDir, Set<String> includes, Set<String> excludes) Returns the set of Maven projects found in the given workspace directory. |
static Set<MavenProject> |
fetchMavenProjects(MavenContext context, File workspaceDir, Set<String> includes, Set<String> excludes, boolean filterSubprojects) Returns the set of Maven projects found in the given workspace directory. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Set<MavenProject> fetchMavenProjects(MavenContext context, File workspaceDir, Set<String> includes, Set<String> excludes)
This method looks for POM files in the root directory (named pom.xml
). If it finds one this will be read and added to the set if it provides a group and artifact identifier.
If it references submodules this references will not be followed. Submodules may, however, be found by other means, that is they are not especially excluded.
context
- provides information required by this service.
workspaceDir
- the workspace directory to search POM files.
includes
- the set of directories (not
pom.xml
files) as
String
s to include in the search. May be and should be
null
in which case only the direct contents of the workspace directories are scanned.
excludes
- the set of excludes as
String
s to exclude from search. May be
null
in which case nothing is excluded.
MavenProject
projects found.
public static Set<MavenProject> fetchMavenProjects(MavenContext context, File workspaceDir, Set<String> includes, Set<String> excludes, boolean filterSubprojects)
This method looks for POM files in the root directory (named pom.xml
). If it finds one this will be read and added to the set if it provides a group and artifact identifier.
If it references submodules this references will not be followed.
context
- provides information required by this service.
workspaceDir
- the workspace directory to search POM files.
includes
- the set of directories (not
pom.xml
files) as
String
s to include in the search. May be and should be
null
in which case only the direct contents of the workspace directories are scanned.
excludes
- the set of excludes as
String
s to exclude from search. May be
null
in which case nothing is excluded.
filterSubprojects
- if this flag is set to
true
sub projects (referenced as modules from a project) are removed from the list of projects, otherwise the returned set of projects is not filtered.
MavenProject
projects found.
public static Set<String> fetchMavenProjectIds(MavenContext context, File workspaceDir, Set<String> includes, Set<String> excludes, boolean filterSubprojects)
This method looks for POM files in the root directory (named pom.xml
). If it finds one this will be read and added to the set if it provides a group and artifact identifier.
If it references submodules this references will not be followed.
context
- provides information required by this service.
workspaceDir
- the workspace directory to search POM files.
includes
- the set of directories (not
pom.xml
files) as
String
s to include in the search. May be and should be
null
in which case only the direct contents of the workspace directories are scanned.
excludes
- the set of excludes as
String
s to exclude from search. May be
null
in which case nothing is excluded.
filterSubprojects
- if this flag is set to
true
sub projects (referenced as modules from a project) are removed from the list of projects, otherwise the returned set of projects is not filtered.
String
s) found.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |