thanks Falko, I've been able to raise the PR to enhance a plugin now. John
On Sat, 25 Jul 2020 at 21:37, Falko Modler <[email protected]> wrote: > > Inject the MavenSession: > > @Parameter(defaultValue ="${session}", readonly = true) > private MavenSession mavenSession; > > and then: > > mavenSession.getRequest() -> getUserSettingsFile() or getGlobalSettingsFile() > > > Cheers, > > Falko > > Am 23.07.2020 um 13:42 schrieb John Patrick: > > From within a plugin, how can I obtain the global settings and user > > settings??? > > > > Not the effective settings object, the real location of the files > > being used, so what SettingsXmlConfigurationProcessor works out. > > > > I've worked out that either MavenExecutionRequest or > > SettingsBuildingRequest contain this information, but can't work out > > how to get access to these from within the plugin. > > > > Is there a method or interface or annotation that I can use, or do I > > need to register for the EventSpyDispatcher? > > > > I've looked in most org.apache.maven.plugins but can't find what I'm > > looking for. Google just gives me the source or javadoc of these files > > and stackoverflow gives irrelevant answers. > > > > Cheers, > > John > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [email protected] > > For additional commands, e-mail: [email protected] > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
