Artifactory信息中的lastModified和lastUpdated之间有什么区别?
创始人
2024-11-11 00:30:25
0

在Artifactory中,当存储库中的artifact的元数据发生更改时,即使文件内容没有更改,也会更新相关信息。这些信息包括'lastModified”和'lastUpdated”。

'lastModified”代表文件的最后修改时间戳,指的是在存储库中上载artifact文件的时间戳。

'lastUpdated”代表元数据的最后修改时间戳,指的是存储库元数据上次更新的时间戳。

以下是Java代码示例,可以使用Artifactory API来获取artifact的最后修改时间戳和元数据的最后修改时间戳:

import org.jfrog.artifactory.client.Artifactory;
import org.jfrog.artifactory.client.ArtifactoryClient;
import org.jfrog.artifactory.client.ArtifactoryRequest;
import org.jfrog.artifactory.client.ArtifactoryResponse;

public class ArtifactoryExample {
    public static void main(String[] args) {
        String repoUrl = "http://localhost:8081/artifactory";
        String repoName = "libs-release-local";
        String artifactPath = "com/example/my-library/1.0.0/my-library-1.0.0.jar";
        
		// Create Artifactory client
        Artifactory artifactory = ArtifactoryClient.create(repoUrl, "username", "password");

        // Request the artifact info
        ArtifactoryRequest request = new ArtifactoryRequest.Builder()
                .method(ArtifactoryRequest.Method.GET)
                .apiUrl(String.format("%s/%s/%s", repoUrl, repoName, artifactPath))
                .build();
        ArtifactoryResponse response = artifactory.restCall(request);

        // Get the last modified and last updated timestamps
        long lastModified = response.getLastModified();
        long lastUpdated = response.getLastUpdated();
        
        System.out.println("Last Modified: " + lastModified);
        System.out.println("Last Updated: " + lastUpdated);
    }
}

相关内容

热门资讯

今天上午!wepoker免费辅... 今天上午!wepoker免费辅助器,德普辅助软件,竟然确实有挂(确实有挂)1、德普辅助软件免费脚本咨...
据目击者称!wepoker软件... 据目击者称!wepoker软件靠谱么,德扑之星辅助器app,一直存在有挂(果真有挂)暗藏猫腻,小编详...
第三方辅助!hhpoker有没... 第三方辅助!hhpoker有没有外挂,德普之星透视辅助软件下载,竟然真的有挂(讲解有挂)1、德普之星...
2026版规律!we poke... 2026版规律!we poker免费辅助器,德扑之星透视辅助软件激活码,确实真的是有挂(有挂存在)1...
不少玩家反映!wepoker破... 不少玩家反映!wepoker破解是真的还是假的,德扑之星怎么开辅助,原来确实有挂(有挂细节)不少玩家...
2026版规律!约局吧开挂神器... 2026版规律!约局吧开挂神器是真的吗,德扑圈透视挂,总是是真的有挂(有挂规律)1、超多福利:超高返...
2026版技巧!约局吧游戏挂,... 2026版技巧!约局吧游戏挂,智星德州插件2024最新版,竟然真的是有挂(有挂辅助)1、用户打开应用...
代打辅助挂!wepoker辅助... 代打辅助挂!wepoker辅助真的假的,德扑之星私人局辅助器,一贯存在有挂(今日头条)1、德扑之星私...
现场直击!wepoker破解器... 现场直击!wepoker破解器有用吗,德扑圈透视,一直真的是有挂(有挂解密)1、德扑圈透视透视辅助软...
针对!wepoker永久免费脚... 针对!wepoker永久免费脚本,德普之星透视免费,好像是有挂(了解有挂)1、很好的工具软件,可以解...