开发者

Is there a way to know how many times my jar (in public Maven repository) is downloaded through Maven?

开发者 https://www.devze.com 2022-12-28 19:52 出处:网络
For statistical reasons, we need to know how often our library (jar) is used. When users downl开发者_Go百科oad the jar from our website, we have a built-in script that counts the downloads. We have re

For statistical reasons, we need to know how often our library (jar) is used. When users downl开发者_Go百科oad the jar from our website, we have a built-in script that counts the downloads. We have recently also included the jar in the Maven public repository. Is there a way to get statistics on how often the jar is actually downloaded through Maven?


You're not alone, see MNG-3615. But as explained in the same issue, this is not part of Maven's job. In other words, apart from using grep and wc on a (possibly) aggregated access.log (yeah, mirrors) of the central repository, I don't see how you could get a count (and obviously, not anybody can do this).

Funnily, Jazon Van Zyl also blogged about this in Nexus: Improving Maven Central and Supporting the Maven Ecosystem a few months ago:

Next we’re thinking about ways to make statistics for a given project’s artifacts available to the project’s developers. We have already implemented user signup in Nexus and we are currently working on project signup as well. What this means is that projects can register with a given groupId, or set of groupIds, and optionally be provisioned a repository which can be operated by a set of users. Once a project registers we will know what slice, or slices, of the statistics they need to see. Our initial thought is that project statistics, number of downloads should only be made available to the public with the permission of each individual project. Brian and I along with Greg Luck and Dain Sundstrom have been working on a simple statistics mechanism that we hopefully can provide to projects early this year.

Why not leaving a comment to get some update?

0

精彩评论

暂无评论...
验证码 换一张
取 消