17.6.3. Overriding the Default Lifecycle
Something unclear in the book at chapter 17.6.3. Overriding the Default Lifecycle:
It gave me the impression that I could override the default (or any) lifecycle but what it really does is create a whole new lifecycle. It does not override the "default" lifecycle.
To put things in context: I have two plugins and I want them to contribute to the same "custom" lifecycle. I thought I would be able to define the custom lifecycle in both plugins by providing the components.xml file as described (both one with <role-hint>mypackaging</role-hint> with different phase-goal mappings but what it seems to be doing is to only take in consideration the packaging declaration of the first plugin and ignore the second (depending of the order of declaration in the callingpom). In other words, only the goals of the first plugin are invoked.
My question: is it possible to have two plugins declaring the same packaging type using the components.xml method and have both plugins goals invoked?
I can achieve the same result by declaring the execution of the goals in the calling pom for the second plugin and only specify a components.xml file in the first but that means I cannot use my second plugin alone as, in that case, the packaging type will not be declared.
Hope I am clear enough...
Thanks
It gave me the impression that I could override the default (or any) lifecycle but what it really does is create a whole new lifecycle. It does not override the "default" lifecycle.
To put things in context: I have two plugins and I want them to contribute to the same "custom" lifecycle. I thought I would be able to define the custom lifecycle in both plugins by providing the components.xml file as described (both one with <role-hint>mypackaging</role-hint> with different phase-goal mappings but what it seems to be doing is to only take in consideration the packaging declaration of the first plugin and ignore the second (depending of the order of declaration in the callingpom). In other words, only the goals of the first plugin are invoked.
My question: is it possible to have two plugins declaring the same packaging type using the components.xml method and have both plugins goals invoked?
I can achieve the same result by declaring the execution of the goals in the calling pom for the second plugin and only specify a components.xml file in the first but that means I cannot use my second plugin alone as, in that case, the packaging type will not be declared.
Hope I am clear enough...
Thanks
1
person has this question
I have this question, too!
Tell me when someone answers.
The more people who ask this question, the more it gets noticed.
The more people who ask this question, the more it gets noticed.
Loading Profile...


