我如何找出Maven工件的最后修改时间? [英] How do I find out the last-modified time of a Maven artifact?

查看:106
本文介绍了我如何找出Maven工件的最后修改时间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每个上传到Maven Central的工件都有一个last modified时间.您可以通过在

Each artifact uploaded to Maven Central has a last modified time associated with it. You can see an example of this by drilling into an artifact's details on search.maven.org.

如何使用Aether检索工件的last modified时间?

How do I retrieve an artifact's last modified time using Aether?

我仅出于供人类使用而检索此信息(即该项目发布多久了?正在积极维护吗?".)

I am retrieving this information purely for human consumption (i.e. "How long ago did this project make a release? Is it being actively maintained?").

推荐答案

检索此信息的一种方法(尽管不受官方支持)是构造工件的URI 并发出HTTP HEAD来检索Last-Modified标头.

One way to retrieve this information (though not officially supported) is to construct the Artifact's URI and issue an HTTP HEAD to retrieve the Last-Modified header.

我不知道有任何官方API可以做到这一点(建议!)

I'm not aware of any official API to do this (suggestions welcome!)

这篇关于我如何找出Maven工件的最后修改时间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆