[ 
https://issues.apache.org/jira/browse/MNG-8525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17914158#comment-17914158
 ] 

Sandra Parsick commented on MNG-8525:
-------------------------------------

Yes, release cycle problem can be an issue.

I tried to implement a 
[sample|https://github.com/support-and-care/maven/tree/mng8524-it-mavendiplugin/its/core-it-suite/src/test/resources/mng-8525-maven-di-plugin]
 based on the [JSR330Plugin 
sample|https://github.com/apache/maven-integration-testing/tree/master/core-it-suite/src/test/resources/mng-5382]
 and your link.

Currently, it is not working because some bindings fail:


{code:shell}
[INFO] 
--------------------------------------------------------------------------------------------------------------------
[ERROR] Failed to execute goal 
org.apache.maven.plugins:mavendi-maven-plugin:0.0.1-SNAPSHOT:hello 
(default-cli) on project mavendi-maven-plugin: Execution default-cli of goal 
org.apache.maven.plugins:mavendi-maven-plugin:0.0.1-SNAPSHOT:hello failed: 
Unable to lookup Mojo: No binding to construct an instance for key 
@Named("org.apache.maven.plugins:mavendi-maven-plugin:0.0.1-SNAPSHOT:hello") 
HelloMojo.  Existing bindings:
[ERROR]  - @Named MavenDIComponent
[ERROR]  - @Named Object
[ERROR]  - 
@Named("org.apache.maven.plugins:mavendi-maven-plugin:0.0.1-SNAPSHOT:help") 
HelpMojo
[ERROR]  - 
@Named("org.apache.maven.plugins:mavendi-maven-plugin:0.0.1-SNAPSHOT:help") 
HelpMojoFactory
[ERROR]  - 
@Named("org.apache.maven.plugins:mavendi-maven-plugin:0.0.1-SNAPSHOT:help") Mojo
[ERROR]  - 
@Named("org.apache.maven.plugins:mavendi-maven-plugin:0.0.1-SNAPSHOT:help") 
Object
[ERROR]  - HelpMojo
[ERROR]  - HelpMojoFactory
[ERROR]  - Log
[ERROR]  - MavenDIComponent
[ERROR]  - Mojo
[ERROR]  - MojoExecution
[ERROR]  - Object
[ERROR]  - Project
[ERROR]  - ProtoSession
[ERROR]  - Session
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the '-e' 
switch
[ERROR] Re-run Maven using the '-X' switch to enable verbose output
[ERROR]
[ERROR] For more information about the errors and possible solutions, please 
read the following articles:
[ERROR] [Help 1] 
http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException
{code}

So it is still in progress.

> Add an integration test with Maven 4 Plugin Sample
> --------------------------------------------------
>
>                 Key: MNG-8525
>                 URL: https://issues.apache.org/jira/browse/MNG-8525
>             Project: Maven
>          Issue Type: Improvement
>          Components: Documentation: Guides, Integration Tests
>            Reporter: Sandra Parsick
>            Priority: Trivial
>
> To show how to use Maven DI in plugins, a sample code is helpful. To ensure 
> that the sample code is valid, it should be implemented as an integration 
> test.
> see also the integration test MNG-5382 for 
> [JSR330Plugins|https://github.com/apache/maven-integration-testing/tree/master/core-it-suite/src/test/resources/mng-5382]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to