开发者

How to get m2repo directory in java?

开发者 https://www.devze.com 2023-03-09 10:05 出处:网络
To make my code flexible I would like to find a 开发者_开发技巧way to get the maven 2 repository directory via a function like System.getProperty(\"m2repo\") or something, as we do for the classpath S

To make my code flexible I would like to find a 开发者_开发技巧way to get the maven 2 repository directory via a function like System.getProperty("m2repo") or something, as we do for the classpath System.getProperty("java.class.path").

Is this possible?


You can inject this value into your Mojo like this:

/**
* @parameter expression="${settings.localRepository}"
*/
private String localRepository;
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号