Sonar

Search for library usages

Details

  • Type: New Feature New Feature
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 2.1
  • Component/s: None
  • Labels:
    None
  • Number of attachments :
    4

Description

The idea is to implement a dependency control engine in Sonar which allows to :

  • Search which projects depend on a given Maven artifact (ex: commons-logging version x.x)
  • Create maven dependencies rules on such searches

Here are what can be done to implement the first use case :

  • Use the Maven Dependency plugin to retrieve all dependencies attached to a Maven project/module
  • Each Maven dependency artifact must be declared in the Sonar projects table : qualifier='MAV' and scope='PRJ'
  • Each version of an artifact must be added in the snapshots table : parent_snapshot_id and root_snapshot_id are null. We can even imagine to associate measure to a Maven artifact like : size, sources url, site url, ...
  • A new table snapshot_links must be created with the following columns :
    • id : primary kee
    • from_snapshot_id
    • to_snapshot_id
    • qualifier : MVN for maven dependencies, PKG for packages dependencies, CLA for classes dependencies, ...
    • root_snapshot_id : snapshot whose this link belongs to
    • type : compile, runtime, provided, ... for Maven dependency, association, aggregation, ... for classes dependencies
  • On the fly, when we want to visualize the Maven dependencies graph (and tomorrow the Packages/Classes dependencies graph), all nodes of the graph are loaded (root_snapshot_id) and the edges are (re)built.
  1. Dependencies_search.bmml
    10/Jul/09 10:49 AM
    4 kB
    Freddy Mallet
  2. Dependencies_view.bmml
    10/Jul/09 10:49 AM
    4 kB
    Freddy Mallet
  1. Dependencies_search.png
    45 kB
    10/Jul/09 10:49 AM
  2. Dependencies_view.png
    67 kB
    10/Jul/09 10:50 AM

Issue Links

Activity

Hide
Evgeny Mandrikov added a comment -

In addition to this feature it would be nice to have info about newer versions (See http://mojo.codehaus.org/versions-maven-plugin/).

Show
Evgeny Mandrikov added a comment - In addition to this feature it would be nice to have info about newer versions (See http://mojo.codehaus.org/versions-maven-plugin/).
Hide
Freddy Mallet added a comment -

The first version will not include the maven dependency rule engine but only the search engine.

Show
Freddy Mallet added a comment - The first version will not include the maven dependency rule engine but only the search engine.

People

Vote (6)
Watch (6)

Dates

  • Created:
    Updated:
    Resolved: