# I wish I knew my consumers - Maven Reverse Dependency

DevFeed: [I wish I knew my consumers - Maven Reverse Dependency](<https://devfeed.tech/articles/i-wish-i-knew-my-consumers-maven-reverse-dependency-31972.md>)

Original publisher: [Read original article](<https://tech.finn.no2013/01/31/i-wish-i-knew-my-consumers-maven-reverse-dependency/>)

Author: roar

Published: 2013-01-31T12:49:05Z

Content type: article

Language: en

Sources: [Finn.no](<https://devfeed.tech/sources/finn-no.md>)

Topics: [Reverse Dependencies](<https://devfeed.tech/topics/reverse-dependencies.md>), [Maven](<https://devfeed.tech/topics/maven.md>), [Neo4j](<https://devfeed.tech/topics/neo4j.md>), [graph-database](<https://devfeed.tech/topics/graph-database.md>), [Library](<https://devfeed.tech/topics/library.md>), [bug](<https://devfeed.tech/topics/bug.md>)

Tags: [bug](<https://devfeed.tech/tags/bug.md>), [dependency](<https://devfeed.tech/tags/dependency.md>), [graph-database](<https://devfeed.tech/tags/graph-database.md>), [libraries](<https://devfeed.tech/tags/libraries.md>), [maven](<https://devfeed.tech/tags/maven.md>), [reverse-dependencies](<https://devfeed.tech/tags/reverse-dependencies.md>)

## AI overview

The article describes a Maven plugin that records project dependencies in a Neo4j graph database and examines reverse dependencies to identify applications using a Maven project, including the versions they use. The plugin was created to help developers notify users when shared libraries are fixed or changed.

## Source excerpt

At FINN.no being a developer fixing bugs in a library is a breeze. Getting every user of your library to use the fix, however, is a different story. How to know who to notify? I mean, I know my library's dependencies, but who "out there" has dependency to the component where I just fixed a bug? I wish. Enter maven-dependency-graph. The idea was born on the plane back home from a Copenhagen hosted conference. Graph database. Download neo4j and start dabbling at a maven plugin. Flying time Copenhagen - Oslo was too short, all of a sudden. From there, the idea slept for a couple of years. Until the need arose somewhere among the developers. With 100+ different applications running with common core services and libraries, everybody suddenly needed to know who depended on their code which had recently been bugfixed. So the old idea was dusted off and once more saw the light of day. We needed to upgrade the server installation and the API to neo4j - which took some time to grasp; but after some playing around, it became obvious and easy. The idea was to have every project report its dependencies to a graph database, building the tree of dependencies on each commit. This constitutes one half of the plugin. Over time, all projects will have reported their dependencies, and from there on part two of the plugin comes into use. It will examine the reverse dependencies to the current maven project, and report all incoming dependencies to it in the maven log. Hey, presto! We now know who out there uses us! And even which version they are using, thanks to two different keys into the built-in lucene index engine. The plugin is published on github @ Finn Technology's account. Feel free! @gardleopard and @roarjoh Usage examples Dependencies to current maven project: mvn no.finntech:dependency-mapper-maven-plugin:read [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building greenpages thrift-client 3.4.5-SN