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);
    }
}

相关内容

热门资讯

WPK模拟器辅助妙计!wpk辅... WPK模拟器辅助妙计!wpk辅助购买,红龙扑克ai多功能辅助技巧1.wpk辅助购买 选牌创建新账号,...
2027版作弊器!闲清宁都麻将... 2027版作弊器!闲清宁都麻将作弊器多功能AI插件,闲清宁都麻将总是有作弊器插件1、全新机制【闲清宁...
终于清楚辅助!福建八闽麻将ai... 终于清楚辅助!福建八闽麻将ai辅助多功能插件,本然存在有辅助教程课程AI 是一款可以让一直输的玩家修...
WPK模拟器辅助方案!wepo... WPK模拟器辅助方案!wepokerplus万能挂,红龙PoKerai多功能辅助插件wepokerp...
玩家必看教程!辅助挂!天府棋牌... 玩家必看教程!辅助挂!天府棋牌ai辅助挂多功能插件,本然真的有辅助挂插件机巧AI 是一款可以让一直输...
2027版外挂!顺欣棋牌外挂多... 2027版外挂!顺欣棋牌外挂多功能AI工具,顺欣棋牌一贯真的有外挂工具1、下载好顺欣棋牌透视辅助下载...
WPK有透视开挂方式!wpk德... WPK有透视开挂方式!wpk德州局透视,红龙扑克ai多功能开挂插件亲,关键说明,wpk德州局透视透视...
9分钟了解辅助挂!老友双城麻将... 9分钟了解辅助挂!老友双城麻将ai辅助挂多功能插件,一向有辅助挂app策略是一款可以让一直输的玩家,...
2027版透视器!快乐碰胡透视... 2027版透视器!快乐碰胡透视器多功能AI软件,快乐碰胡好像有透视器软件1)快乐碰胡免费钻石:进一步...
WPK方法开挂教程书!德普之星... WPK方法开挂教程书!德普之星辅助器,微扑克ai多功能开挂脚本1、进入到德普之星辅助器是否有挂之后,...