Reputation: 22171
Suppose we have :
Why doesn't transitive mecanism apply with Eclipse IDE so that A knows about commons-collections.jar even without specifying it in its own .classpath file.
I know that Maven can provide this feature but why an IDE like Eclipse (or IntelliJ ;)) don't by default ?
Are there cons? Is it for avoiding performance degradation due to inspection of every elements in classpath ?
Upvotes: 1
Views: 603
Reputation: 645
Actually you'd better import your pom.xml into your favorite IDE (IntelliJ of course) and let the Maven plugin do the job of interpreting the poms and creating correct dependencies for you instead of doing it by hand. FYI IntelliJ build core is based on Maven since a few versions.
Upvotes: 1
Reputation: 9245
Well, by default it's not applied, but you should use the "Order and Export" tab under "Java Build Path" in "Properties" of your Eclipse project. Check the desired dependency to become transitive.
Why isn't it set by default? There might be dependencies that aren't needed in run-time, for instance (also called "provided")... You don't to create a little war file from your project and end up with a gigantic archive.
Upvotes: 5