If you're injecting this information into a plugin parameter, you can use the expression '${localRepository}' to get the ArtifactRepository instance, then call getBasePath() from that, IIRC.


Costin Caraivan wrote:
I tried:
Settings set = new Settings();
set.getLocalRepository(); gives me null (probably because I don't have an explicit path in the
settings.xml file).

I also tried:
ArtifactRepository localRepo;
localRepo.getBasedir();
but this doesn't work.


How do I get the path to the local repository? I'm sure that Maven computes
it, because a ${settings.LocalRepository} property in a pom file gets the
right path.

Any clues?

Regards,
Costin.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to