[
https://issues.apache.org/jira/browse/MNGSITE-379?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16958677#comment-16958677
]
Andreas Brieg commented on MNGSITE-379:
---------------------------------------
[~hboutemy] thanks for pointing me there.
I had a look at this. Building and running this project works for me too.
However I found out that this also never tests in the integration tests that
the {{ExecutionListener}} is actually insantiated and listening to events. The
build fails after applying patch [^test-execution-listener-logging.patch]
since there is no output of the execution listener in the captured log. Since I
would like to create an extension with an execution listener listening this
seems to be a problem with some maven component.
> Unable to get example of Maven 3 lifecycle extension to work
> ------------------------------------------------------------
>
> Key: MNGSITE-379
> URL: https://issues.apache.org/jira/browse/MNGSITE-379
> Project: Maven Project Web Site
> Issue Type: Bug
> Reporter: Andreas Brieg
> Priority: Major
> Attachments: maven-extension-usage.zip,
> test-execution-listener-logging.patch, test-extension.zip
>
>
> I'm trying to create an extension for maven following the description on
> [https://maven.apache.org/examples/maven-3-lifecycle-extensions.html.]
> However I'm unable to get this to work. I have attached the extension I
> created based on the example description as [^test-extension.zip].
> After running {{mvn install}} on the extension and trying to use the
> extension in an example project like in [^maven-extension-usage.zip] the
> execution listener implemented in the extension is not loaded nor listening
> to any event.
> When looking in the artifact created for the extension I see that there is a
> generated {{META-INF/plexus/components.xml}} contained as expected.
> {code}
> <?xml version="1.0" encoding="UTF-8"?>
> <component-set>
> <components>
> <component>
> <role>org.apache.maven.execution.ExecutionListener</role>
> <role-hint>default</role-hint>
> <implementation>org.example.testextension.Foo</implementation>
> <description />
> <isolated-realm>false</isolated-realm>
> </component>
> </components>
> </component-set>
> {code}
> Maven also tries to download the extension from the repo when building
> {{maven-extension-usage}}.
> Where is the error here and what should the example page for a maven
> extension better document?
--
This message was sent by Atlassian Jira
(v8.3.4#803005)