Find Usages Of Maven Dependency Deosn't Find Item In Spring.xml

I have a dependency defined in maven

<dependency>
    <groupId>c3p0</groupId>
    <artifactId>c3p0</artifactId>
    <version>0.9.1.2</version>
</dependency>


And  it is used in a Spring xml config.

<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close">
   <property name="driverClass" value="${jdbc.driverClassName}"/>
   <property name="jdbcUrl" value="${jdbc.url}"/>
   <property name="user" value="${jdbc.username}"/>
   <property name="password" value="${jdbc.password}"/>
   <property name="maxPoolSize" value="50"/>
</bean>


Alt-F7 from the pom doesn't find the spring xml and neither does Analyze Backward Dependencies.

What I am trying to do is identify which dependecies in my pom are no longer used.
mvn dependecy:analyze gives false results.

Is there any way for IDEA to find the orphans?

1 comment
Comment actions Permalink

Hello.

Seems that no direct way, sorry. This is more common problem than Maven+Spring. You need feature(s) to perform two steps:
1. Finding IDEA library, built by pom dependency, from this dependency. I don't know a way to do it other than manually. My request is this: http://youtrack.jetbrains.com/issue/IDEA-118604 but you can suggest something else.
2. Finding library usage in module's sources and configs. Seems that also impossible. Only usages of individual class / file, or library usages in module _dependencies_ are found, not library usages in individual file. I failed to find an issue in tracker (however I suppose that somebody else could request this during all these years).

Regards,
Alexander.

0

Please sign in to leave a comment.