简体   繁体   English

jfrog人工项目CLI使用从jar推断的设置在maven人工项目仓库中部署jar

[英]jfrog artifactory CLI deploy a jar in maven artifactory repo with inferred setting from jar

I am using Visual Studio Artifactory deployer to deploy jar files built by maven to Artifactory maven repo. 我正在使用Visual Studio Artifactory部署程序将maven构建的jar文件部署到Artifactory Maven存储库。 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. 如果我使用maven人工插件,则jar文件将部署到正确的文件夹结构中,并且maven设置将按照jar保留,但是如果我将jar文件推送到CLI中,则将通过CLI进行部署,它只会作为jar文件部署到我指定的文件夹中。 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. 使用CLI推送一个artifact.jar到libs-snapshot / com / foo / bar作为目标,将文件上传到libs-snapshot / com / foo / bar,而artifactory没有关于jar版本,组ID和工件ID的信息。 I could not find any options on the CLI to specify those. 我在CLI上找不到用于指定这些选项的任何选项。

  • While using Maven Artifactory plugin, a pushed jar ends up in 使用Maven Artifactory插件时,推送的jar最终会出现在
    libs-snapshot/com/foo/bar/artifact/version folder and maven libs-snapshot / com / foo / bar / artifact / version文件夹和Maven
    properties stay intact 物业完好无损

How do I achieve same behaviour from CLI as maven artifactory plugin does. 我如何通过CLI实现与Maven人工插件相同的行为。

Just to make sure, how do you use the CLI for the deployment? 只是为了确保您如何使用CLI进行部署? In order to have it deployed to Artifactory using the CLI, you will have to specify the right Maven coordinates. 为了使用CLI将其部署到Artifactory,您将必须指定正确的Maven坐标。 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. 这将把快照文件部署到Artifactory和Artifactory,根据您的存储库配置,将使用时间戳替换“ SNAPSHOT”。

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. 如果您想将5个不同的文件部署到5个不同的路径,并且希望JFrog CLI提取Maven布局并通过它进行部署,那么使用CLI不可能做到这一点。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM