Does anyone have any code that demonstrates using the MavenEmbedder to read the classpath for /META-INF/maven/path/to/pom.xml to expand all dependencies, download if necessary and modify the classpath such that an application can run without copying Jars everywhere. In other words, I want to keep the Jars in the user's .m2 folder and still run an application from anywhere.
I don't know if this is possible, but it would be useful. An even more useful one would be a hard-coded class to copy and paste in a project that does some initial loading of the standard maven jars -then once it gets enough maven, do the rest of the Pom processing. So in other words if I was handed a Jar as an application, it would automatically install Maven2, download Maven2 to the local repository, then process the internal POM of that original jar, such that all dependencies get added to the classpath, and as a final step, run some psvm method specified "somewhere". Maybe I'm talking about Maven v3, but this would be cool.