Introduce shared utilities for ProjectRequestPostProcessor

This commit is contained in:
Stephane Nicoll
2018-02-14 14:10:23 +01:00
parent 378623fcc0
commit aad08e0c21
9 changed files with 128 additions and 96 deletions

View File

@@ -483,15 +483,21 @@ public class Dependency extends MetadataElement implements Describable {
}
public static Dependency withId(String id, String groupId, String artifactId,
String version) {
String version, String scope) {
Dependency dependency = new Dependency();
dependency.setId(id);
dependency.groupId = groupId;
dependency.artifactId = artifactId;
dependency.version = version;
dependency.scope = (scope != null ? scope : SCOPE_COMPILE);
return dependency;
}
public static Dependency withId(String id, String groupId, String artifactId,
String version) {
return withId(id, groupId, artifactId, version, null);
}
public static Dependency withId(String id, String groupId, String artifactId) {
return withId(id, groupId, artifactId, null);
}