goldfrapp04
goldfrapp04

Reputation: 2356

For a maven dependency, how to find out which import in which Java class comes from it?

my_project has upstream_project as a dependency in its pom.xml, but I have no idea why this is necessary. How can I find out which class in my_project is importing from upstream_project, using either Maven command-line or IntelliJ?

I'm using Maven 3.3.3 and IntelliJ 14.1.

Upvotes: 0

Views: 3411

Answers (2)

Talijanac
Talijanac

Reputation: 1157

Comment-out your upstream_project dependency, and try running maven compile on command-line. If your project is missing classes from upstream_project you will get compilation errors for missing symbolic names.

Upvotes: 1

ltalhouarne
ltalhouarne

Reputation: 4636

Quick and dirty trick:

Remove the dependency from your pom file.

Run mvn clean install -U and see what breaks.

Upvotes: 2

Related Questions