I'm taking my first crack at developing a plugin. I'm trying to read/resolve the license for a particular dependency. I've read tons of code but can't seem to pull it all together. I've read dependency plugin resolve code, I've see the the MavenProject does have license information, but the basic Dependency object does not have this information. I presume I need to:
1) Grab hold of the Dependency object. 2) Reach back out and retrieve the pom.xml for that file. 3) Convert that pom.xml to a MavenProject object 4) Get the license for the MavenProject. Alternatively, I was going to just do an HTTP GET on the pom.xml for a given dependency, parse it and find the license. But surely there is a clean way to do this. Can anyone shoot me a code fragment that does this. Thank in advance for any help. Adam