Re: Need a way to extend a plugin before build

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Need a way to extend a plugin before build

Hunter C Payne
 I don't believe it is possible to change the POM during a single build.  However, are you sure this is what you need.  Perhaps you instead need to the dependency scope of your dependency. 

Maven – Introduction to the Dependency Mechanism

|
|
|  |
Maven – Introduction to the Dependency Mechanism

Brett Porter Trygve Laugstol Karl Heinz Marbaise


 |

 |

 |


Hunter

    On Friday, April 17, 2020, 12:02:22 PM PDT, 雾月政变 <[hidden email]> wrote:  
 
 Hello:
&nbsp; &nbsp; &nbsp; &nbsp;We have tried many ways to extend maven plugins, and we need a plugin that could process before build that we could change some dependency. Is there a way to do this with a maven plugin?  
Reply | Threaded
Open this post in threaded view
|

Re: Need a way to extend a plugin before build

Andreas Aronsson
It is possible if you are using maven-3.3.1 or newer.

Look at the extension mechanism here
http://takari.io/2015/03/19/core-extensions.html



On Sat 18 Apr 2020, 00:48 Hunter C Payne, <[hidden email]>
wrote:

>  I don't believe it is possible to change the POM during a single build.
> However, are you sure this is what you need.  Perhaps you instead need to
> the dependency scope of your dependency.
>
> Maven – Introduction to the Dependency Mechanism
>
> |
> |
> |  |
> Maven – Introduction to the Dependency Mechanism
>
> Brett Porter Trygve Laugstol Karl Heinz Marbaise
>
>
>  |
>
>  |
>
>  |
>
>
> Hunter
>
>     On Friday, April 17, 2020, 12:02:22 PM PDT, 雾月政变 <[hidden email]>
> wrote:
>
>  Hello:
> &nbsp; &nbsp; &nbsp; &nbsp;We have tried many ways to extend maven
> plugins, and we need a plugin that could process before build that we could
> change some dependency. Is there a way to do this with a maven plugin?