Maven 3.xプラグイン内からローカルリポジトリの場所(URI)を取得するには?
3234 次
4 に答える
6
このブログ投稿で説明されているように、Aether を使用します。
/**
* The current repository/network configuration of Maven.
*
* @parameter default-value="${repositorySystemSession}"
* @readonly
*/
private RepositorySystemSession repoSession;
ローカルレポを取得しますRepositorySystemSession.getLocalRepository()
:
LocalRepository localRepo = repoSession.getLocalRepository();
LocalRepository
これはgetBasedir()
おそらくあなたが望むものです。
于 2011-09-15T11:01:16.140 に答える