ASM jar - Why my java project has a dependency on this?

peakit picture peakit · Nov 25, 2009 · Viewed 17.9k times · Source

I have a Java project and internally it is dependent on asm jar. Strangely, I don't even know why my project somehow is dependent on this library (might be brought in by maven as a transitive dependency)?

Can anyone help me know why some one needs asm jar?

Thanks in advance !

EDIT: Can you also mention for what purposes/use-cases one might need asm jar?

Answer

Pascal Thivent picture Pascal Thivent · Nov 25, 2009

ASM is a bytecode manipulation framework (see this page for a nice introduction) and is used by many things performing... bytecode manipulation: frameworks using proxy generation and reflection (Spring, Hibernate, etc), mocking frameworks (EasyMock, JMock, etc), code analysis tools (PMD, Findbugs, etc). Actually, the ASM project maintains a list of users organized by category, check it out.

As mentioned by Vincent, if you are depending transitively on ASM, the dependency:tree goal or the dependency report (see the PMD and Findbugs links above for examples) can help to analyze the situation and to find out from where its coming from. But this won't take into account dependencies of maven plugins that you are using, only dependencies of your project.