Skip to content

Commit 3206abd

Browse files
committed
Improve upload archive progress bar
Signed-off-by: Michael Sverdlov <michaelsv@jfrog.com>
1 parent 5800aac commit 3206abd

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

artifactory/utils/maven/settingsxml.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"github.com/apache/camel-k/v2/pkg/util/maven"
88
"os"
99
"path/filepath"
10+
"strings"
1011
)
1112

1213
// ArtifactoryMirrorID is the ID used for the Artifactory mirror.
@@ -44,7 +45,9 @@ func (sxm *SettingsXmlManager) loadSettings() error {
4445
if err != nil {
4546
if os.IsNotExist(err) {
4647
// If file does not exist, initialize with empty settings
47-
sxm.settings = maven.Settings{}
48+
sxm.settings = maven.Settings{
49+
XMLName: xml.Name{Local: "settings"},
50+
}
4851
return nil
4952
}
5053
return fmt.Errorf("failed to read settings file %s: %w", sxm.path, err)
@@ -83,7 +86,7 @@ func (sxm *SettingsXmlManager) updateMirror(artifactoryUrl, repoName string) err
8386
ID: ArtifactoryMirrorID,
8487
Name: repoName,
8588
MirrorOf: "*",
86-
URL: artifactoryUrl,
89+
URL: strings.TrimSuffix(artifactoryUrl, "/") + "/" + repoName,
8790
}
8891

8992
// Find if the mirror already exists

0 commit comments

Comments
 (0)