is there a tool that can list third party "packages" that contain (third party) classes referenced in the JAR ? Let say that it would recognize what is "home" package from JAR file definition and it would print out a list of fully qualified names of third party classes up to 3rd level that were referenced within the JAR.
org.apache.commons
org.apache.maven
javax.servlet.jsp
org.eclipse.persistence
org.apache.jackrabbit
the purpose is that I need to find maven dependencies for that JAR file and deploy it as a maven artifact.
This might be an alternative for this tool. But it doesn't list referenced classes. The last number determines "package level".
Problem is, that this way it is impossible to get referenced classes out of class definitions. So the only way possible seems to be do it in JAVA.
So the question is: Is there any Java tool that can do it ?
EDIT:
I found what I needed : M2eclipse has a feature called Class search
In the maven repositories view, right click a repository and enable full index
Then Navigate > Open type from maven - there you can look through all artifacts available based on java package convention
There is a new tool since JDK 8:
jdeps
https://wiki.openjdk.java.net/display/JDK8/Java+Dependency+Analysis+Tool
If yours is a maven based project
Look at the below link http://maven.apache.org/plugins/maven-dependency-plugin/build-classpath-mojo.html
May be in your case
Tattleltale is a tool from JBoss which does this
tattletale.jboss.org/
JarAnalyzer:
If you use maven (as I understood), you can simply use Maven Dependency plugin.
First you need to write a basic pom.xml with all your jars, you can copy this example (i use hibernate as example), and substitute your jars :
then open terminal, go into the containing folder of the pom.xml above and run this command :
mvn dependency:tree
this will print a list of dependencies...
or if you want download and copy in a folder all dependencies run the following command :
mvn dependency:copy-dependencies
you'll find all your dependencies in folder ./target/dependencies