diff --git a/configservice-sdk/src/main/java/no/cantara/jau/serviceconfig/dto/DownloadItem.java b/configservice-sdk/src/main/java/no/cantara/jau/serviceconfig/dto/DownloadItem.java index 3b867ddc..41fc35d0 100644 --- a/configservice-sdk/src/main/java/no/cantara/jau/serviceconfig/dto/DownloadItem.java +++ b/configservice-sdk/src/main/java/no/cantara/jau/serviceconfig/dto/DownloadItem.java @@ -7,7 +7,7 @@ public class DownloadItem { public String url; public String username; public String password; - public String filename; + private String filename; public MavenMetadata metadata; @@ -28,6 +28,16 @@ public DownloadItem(String url, String username, String password, MavenMetadata this.metadata = metadata; } + public String filename() { + if (filename != null) { + return filename; + } + if (metadata != null) { + return metadata.filename(); + } + return null; + } + @Override public String toString() { return "DownloadItem{" + diff --git a/configservice-sdk/src/main/java/no/cantara/jau/serviceconfig/dto/MavenMetadata.java b/configservice-sdk/src/main/java/no/cantara/jau/serviceconfig/dto/MavenMetadata.java index ebd0ea8c..faf89881 100644 --- a/configservice-sdk/src/main/java/no/cantara/jau/serviceconfig/dto/MavenMetadata.java +++ b/configservice-sdk/src/main/java/no/cantara/jau/serviceconfig/dto/MavenMetadata.java @@ -16,9 +16,7 @@ private MavenMetadata() { } public MavenMetadata(String groupId, String artifactId, String version) { - this.groupId = groupId; - this.artifactId = artifactId; - this.version = version; + this(groupId, artifactId, version, "jar"); } public MavenMetadata(String groupId, String artifactId, String version, String packaging) { this.groupId = groupId;