使用此博客文章中描述的Aether .
/**
* The current repository/network configuration of Maven.
*
* @parameter default-value="${repositorySystemSession}"
* @readonly
*/
private RepositorySystemSession repoSession;
Run Code Online (Sandbox Code Playgroud)
现在通过RepositorySystemSession.getLocalRepository()以下方式获取当地的回购:
LocalRepository localRepo = repoSession.getLocalRepository();
Run Code Online (Sandbox Code Playgroud)
LocalRepository有一个getBasedir()方法,这可能是你想要的.
| 归档时间: |
|
| 查看次数: |
2694 次 |
| 最近记录: |