Is there any possibility to include some kind of dependency metada inside Jars?
What I mean is something like pom.xml files from maven that could be used to determine wich library dependencies are needed with one jar. Maybe the pom.xml could be added inside the jars.
Jar dependency data is necessary for each new project and maven pom files are becoming a standard. However pom files are separate from jars, which makes them easy to edit but difficult to mantain with or distribute with jars.
I'm asking if it's possible to make it standard. So each jar would be like a "integrated circuit" that can be plugged on my application if I have the necessary "connectors" (or dependencies).
For example, any jar could be verified by the VM when loading to check missing, duplicated or wrong jar versions.
-The added metadata should tell information about the jar itself, and about dependencies (just like maven does).
-The metadata should be calculated (or gathered) when assembling a new jar, based just on neccessary dependencies, not every dependency available on classpath.
What do you think? Flaws or strengths?