Re: Absolute location of settings files help

2020-07-29 Thread John Patrick
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  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: dev-unsubscr...@maven.apache.org
> > For additional commands, e-mail: dev-h...@maven.apache.org
> >
>

-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



Re: Absolute location of settings files help

2020-07-25 Thread Falko Modler

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: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org





Absolute location of settings files help

2020-07-23 Thread 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: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org