1
votes

I am using Visual Studio Artifactory deployer to deploy jar files built by maven to Artifactory maven repo. If I use maven artifactory plugin the jar file gets deployed to right folder structure and maven setting stay as per the jar but from CLI if i push the jar file, it only get deployed as a jar file to the folder I specify. For example

  • Using CLI push a artifact.jar to target libs-snapshot/com/foo/bar gets file uploaded to libs-snapshot/com/foo/bar and artifactory has no information about jar version, group id , artifact id. I could not find any options on the CLI to specify those.

  • While using Maven Artifactory plugin, a pushed jar ends up in
    libs-snapshot/com/foo/bar/artifact/version folder and maven
    properties stay intact

How do I achieve same behaviour from CLI as maven artifactory plugin does.

1
@Andy-MSFT I see that you removed TFS tag, but the problem is kind of related to TFS build. I am using Atifactorydeployer step from TFS build and it uses Jfrong CLI to push the file to Artifactory. I wish Out of maven output it will deploy by extracting the maven layout into artifactory. - gamepop

1 Answers

4
votes

Just to make sure, how do you use the CLI for the deployment? In order to have it deployed to Artifactory using the CLI, you will have to specify the right Maven coordinates. For example:

jfrog rt u mySnapshot-1.0.0-SNAPSHOT.jar “libs-snapshot-local/path/to/folder/mySnapshot/1.0.0-SNAPSHOT/”

This will deploy your snapshot file to Artifactory and Artifactory, base on your repository configuration will replace the “SNAPSHOT” with a timestamp.

If you meant that you want to deploy 5 different files, to 5 different paths and that you wish that the JFrog CLI to extract the maven layout and deploy by it, then this is not possible by using the CLI.