mirror of
https://gitee.com/dcren/initializr.git
synced 2025-12-02 19:34:05 +08:00
Introduce shared utilities for ProjectRequestPostProcessor
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user