You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by tison <wa...@gmail.com> on 2024/02/05 13:34:23 UTC
Re: How to test lifecycle extension?
I found Maven Invoker is a component that can be used [1]. Let me try
to make an example.
Best,
tison.
[1] https://maven.apache.org/shared/maven-invoker/usage.html
tison <wa...@gmail.com> 于2024年1月25日周四 11:09写道:
>
> Hi,
>
> I'm writing a Mojo with an Extension extending
> AbstractMavenLifecycleParticipant.
>
> Now, I'd like to write some tests on the extension logic. Although
> Maven provides docs about writing tests over Mojos[1], it doesn't tell
> how to test if an extension [2] is properly loaded and executed.
>
> Are there some examples of such test cases?
>
> Best,
> tison.
>
> [1] https://maven.apache.org/plugin-developers/plugin-testing.html#using-plexustestcase
> [2] https://maven.apache.org/guides/mini/guide-using-extensions.html
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: How to test lifecycle extension?
Posted by tison <wa...@gmail.com>.
Implemented in https://github.com/tisonspieces/os-detector/pull/4.
Best,
tison.
tison <wa...@gmail.com> 于2024年2月5日周一 21:34写道:
>
> I found Maven Invoker is a component that can be used [1]. Let me try
> to make an example.
>
> Best,
> tison.
>
> [1] https://maven.apache.org/shared/maven-invoker/usage.html
>
> tison <wa...@gmail.com> 于2024年1月25日周四 11:09写道:
> >
> > Hi,
> >
> > I'm writing a Mojo with an Extension extending
> > AbstractMavenLifecycleParticipant.
> >
> > Now, I'd like to write some tests on the extension logic. Although
> > Maven provides docs about writing tests over Mojos[1], it doesn't tell
> > how to test if an extension [2] is properly loaded and executed.
> >
> > Are there some examples of such test cases?
> >
> > Best,
> > tison.
> >
> > [1] https://maven.apache.org/plugin-developers/plugin-testing.html#using-plexustestcase
> > [2] https://maven.apache.org/guides/mini/guide-using-extensions.html
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org