fixed import/url; added default artifact ext: xml

This commit is contained in:
2023-08-16 12:36:50 -04:00
parent fee4032208
commit 9a0b7207c0

View File

@@ -69,10 +69,12 @@ public abstract class AbstractBanConfiguration implements BanConfiguration {
for (Xpp3Dom child : importDom.getChildren()) { for (Xpp3Dom child : importDom.getChildren()) {
BanConfigurationDownloader downloader = null; BanConfigurationDownloader downloader = null;
if (child.getName().equals("url")) { if (child.getName().equals("url")) {
String url = StringUtils.trimToNull(importDom.getValue()); String url = StringUtils.trimToNull(child.getValue());
downloader = new BanConfigurationDownloader(this.session, this.artifactResolver, url); downloader = new BanConfigurationDownloader(this.session, this.artifactResolver, url);
} else if (child.getName().equals("artifact")) { } else if (child.getName().equals("artifact")) {
Artifact artifact = new DefaultArtifact(child.getValue()); Artifact artifact = new DefaultArtifact(child.getValue());
if (artifact.getExtension() == null)
artifact = new DefaultArtifact(artifact.getGroupId(), artifact.getArtifactId(), artifact.getClassifier(), "xml", artifact.getVersion());
ArtifactRequest request = new ArtifactRequest(artifact, this.session.getCurrentProject().getRemoteProjectRepositories(), null); ArtifactRequest request = new ArtifactRequest(artifact, this.session.getCurrentProject().getRemoteProjectRepositories(), null);
try { try {