Skip to content

Links with incorrect double slash in "Deployed Maven Artifacts" #758

Open

Description

Describe the bug
Links on a Jenkins project page under "Deployed Maven Artifacts" have a double slash between the repository name and the artifact path. This seems to occur only in scripted pipeline project and worked for some reason with older artifactory versions, but not after upgrading to latest. Using the example with declarative pipeline or checking the URL in the logs, the generated links are always correct.

To Reproduce
Create a simple Maven project, eg.:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>

	<groupId>com.example</groupId>
	<artifactId>artifactory-plugin-test</artifactId>
	<version>1.0.0-SNAPSHOT</version>
	<name>Artifactory Plugin Test</name>
	<packaging>jar</packaging>
</project>

Create a scripted pipeline as in https://github.com/jfrog/project-examples/blob/master/jenkins-examples/pipeline-examples/scripted-examples/maven-example/Jenkinsfile

Pipeline Step:

server = Artifactory.server "Artifactory"

rtMaven = Artifactory.newMavenBuild()
rtMaven.tool = "MVN3" // Tool name from Jenkins configuration
rtMaven.deployer releaseRepo: "release", snapshotRepo: "libs-snapshot", server: server
rtMaven.resolver releaseRepo: "libs-release", snapshotRepo: "libs-snapshot", server: server
rtMaven.deployer.deployArtifacts = false // Disable artifacts deployment during Maven run

buildInfo = Artifactory.newBuildInfo()

rtMaven.run pom: 'pom.xml', goals: 'clean test'

rtMaven.run pom: 'pom.xml', goals: 'package', buildInfo: buildInfo

rtMaven.deployer.deployArtifacts buildInfo

Expected behavior
Correct links without double slash.

Screenshots
image

Versions

  • Jenkins Artifactory plugin version: 3.18.0
  • Jenkins operating system: RHEL 7.3
  • Artifactory Version: 7.49.6
  • Jenkins Version: 2.387.1

Additional context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions