In a previous question I got an answer for downloading an artifact from the Maven repository. This works well for me, but I need to read the MavenProject for the downloaded artifact.
What is the best way for me to read the MavenProject for the downloaded artifact in my plugin?
You can use the MavenProjectBuilder to resolve the artifact and read the downloaded pom into a MavenProject. The buildFromRepository() method will obtain the artifact (if needed) from the remote repositories so there is no need to download it before reading.
These are the changes needed to the previous answer resolve the maven project: