Programmatically resolving Maven dependencies outside of a plugin - get RepositorySystemSession and RepositorySystem

前端 未结 6 681
Happy的楠姐
Happy的楠姐 2020-12-24 08:55

Maybe this is going to be a larger task than I had originally thought, but regardless, I\'m trying to load a MavenProject from a file and then resolve its depen

6条回答
  •  粉色の甜心
    2020-12-24 09:24

    There is a nice set of standalone examples for Eclipses Aether API which is used in the latest Maven (3.1.1) and it can be found here.

    Note: Maven 3.1.X still uses Aether 0.9.0.M2 (and the latest version which us used in the examples is 0.9.0.M3). So to run these examples inside a Maven plugin, version M2 is required, and a standalone application can use the latest M3 version.

提交回复
热议问题