Refactor DeclaredRepository to library

This commit is contained in:
Jonathan Leitschuh
2021-02-10 11:41:50 -05:00
parent 21b6f35ddc
commit 3b92f97967
3 changed files with 18 additions and 28 deletions

View File

@@ -365,6 +365,17 @@ class PomProperty extends PomElement {
PomProperty() { getParent() instanceof PomProperties }
}
/**
* A repository block inside of a maven pom.
*/
class DeclaredRepository extends PomElement {
DeclaredRepository() {
this.getName() = ["repository", "snapshotRepository", "pluginRepository"]
}
string getUrl() { result = getAChild("url").(PomElement).getValue() }
}
/**
* A folder that represents a maven local repository using the standard layout. Any folder called
* "repository" with a parent name ".m2" is considered to be a maven repository.