'Maven artifact - How to obtain all statistics (Not only download on Maven central)?
I created and deployed on Maven Central a Maven artifact. Is it possible to obtain information on each use? Whenever a user uses this archetype Maven I would like a request to be sent to one of my server with the data entered by the user (groupId, artifactId, version, ...)
Solution 1:[1]
It depends on what you used to deploy your artifact to Maven Central repository. I deployed mine though Nexus Repository manager. On that site, if you log in, you can go to the "Central Statistics" tab, and there you can see the number of downloads and number of IPs from which downloads where performed.
Solution 2:[2]
Currently, mvnrepository.com does not provide download statistics details. But you will be able to its popularity and usage statistics. See the screen shot below. For example, commons-lang3, you can only it is used by how many artifacts.
You can also check this link for reference. https://www.reddit.com/r/java/comments/3u9sf0/why_no_public_stats_on_maven/
Solution 3:[3]
What you asked for seems impossible to obtain :
- there is no executable code in an archetype, so you cannot send yourself a request to one of your server,
- as far as I know Maven itself does not collect those kind of usage statistics (and if it did I dare to hope that it would be a public and known information).
So I think the best you can obtain is the number of downloads and the number of unique IPs for your archetype through Nexus Repository manager, as explained by Michael Gantman.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Michael Gantman |
| Solution 2 | Sambit |
| Solution 3 | Marc Wrobel |


