Skip to content

Support Artifactory publishing without the maven product info in the path #198

Open
@tabboud

Description

@tabboud

What happened?

The Artifactory publisher only allows publishing to a destination that includes the full Maven product info as part of the path

https://artifactory.p.b/artifactory/<publish-repo>/<group>/<product>/<version>/<artifact>

Link to source where this is gathered:

productPath := publisher.MavenProductPath(productTaskOutputInfo, groupID)

The group-id is also a required argument, but I assume the reason it is required is due to the fact that it's always included in the destination path, as seen above.

groupID, err := publisher.GetRequiredGroupID(flagVals, productTaskOutputInfo)

What did you want to happen?

It should be possible to publish artifacts to artifactory with just the desired publish-repo rather than force the destination path to include the Maven product info.

Possible Solution

We can introduce another flag to the Artifactory publisher that allows it to publish to a flat hierarchy rather than inject the product info in the path.

https://artifactory.p.b/artifactory/<publish-repo>/<artifact>

By default, this flag can be false in that the existing behavior would be used. If set to true, then we would no longer inject the product info and just concatenate the desired published-repo with the artifact name.
We can continue to keep the group-id required in both situations, but it would only be used in the existing code path.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions