Re: Access project properties in non-plugin code

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: Access project properties in non-plugin code

Ilya Basin
Thanks Robert.


25.02.2018 17:58, Robert Scholte пишет:

> The preferred way is to change or extend the plugin.
> It should be possible to do this:
>
> public class CustomMojo extends OtherMojo {
>
>   @Parameter
>   private String whatever;
> }
>
> if the OtherMojo is accessible enough.
>
> Any other solution might become a hard fight.
>
> Robert
>
> On Sun, 25 Feb 2018 15:28:28 +0100, Basin Ilya <[hidden email]> wrote:
>
>> I want to add custom configuration options to a library used by a plugin
>> without modifying the plugin code. After that I want to add an explicit
>> plugin dependency (changing the default library version) in my pom and
>> also define some configuration for the library in the same pom.
>>
>>
>> 25.02.2018 17:09, Robert Scholte пишет:
>>> The answer should be 'no'.
>>> It often helps if you're describing the usecase.
>>> What are you trying to achieve?
>>>
>>> Robert
>>>
>>> On Sun, 25 Feb 2018 15:05:08 +0100, Basin Ilya <[hidden email]>
>>> wrote:
>>>
>>>> Hi
>>>>
>>>> Can a plugin dependency (which is not a plugin itself) access the
>>>> plugin
>>>> configuration when it's called by the plugin? Or at least access the
>>>> current maven project properties? Through some thread-local or static
>>>> member.
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: [hidden email]
>>>> For additional commands, e-mail: [hidden email]
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [hidden email]
>>> For additional commands, e-mail: [hidden email]

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