-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
bugSomething isn't workingSomething isn't workingpriority:blockerBlocks development and/or testing work, production could not runBlocks development and/or testing work, production could not run
Description
Affected version
Maven 4.0.0-SNAPSHOT
Bug description
Following the integration of #10926, I tried to use the new factory in the Maven Clean Plugin. The following field has been added to the CleanMojo class:
@Inject
private PathMatcherFactory matcherFactory;It works at JUnit execution time: the factory is correctly injected. But when executing integration tests, I get the following exception:
org.apache.maven.di.impl.DIException: No binding to construct an instance for key PathMatcherFactory. Existing bindings:
- @Named("org.apache.maven.plugins:maven-clean-plugin:4.0.0-beta-3-SNAPSHOT:clean") CleanMojo
- @Named("org.apache.maven.plugins:maven-clean-plugin:4.0.0-beta-3-SNAPSHOT:clean") CleanMojoFactory
- @Named("org.apache.maven.plugins:maven-clean-plugin:4.0.0-beta-3-SNAPSHOT:clean") Mojo
- @Named("org.apache.maven.plugins:maven-clean-plugin:4.0.0-beta-3-SNAPSHOT:clean") Object
- @Named("org.apache.maven.plugins:maven-clean-plugin:4.0.0-beta-3-SNAPSHOT:help") HelpMojo
- @Named("org.apache.maven.plugins:maven-clean-plugin:4.0.0-beta-3-SNAPSHOT:help") HelpMojoFactory
- @Named("org.apache.maven.plugins:maven-clean-plugin:4.0.0-beta-3-SNAPSHOT:help") Mojo
- @Named("org.apache.maven.plugins:maven-clean-plugin:4.0.0-beta-3-SNAPSHOT:help") Object
- CleanMojo
- CleanMojoFactory
- HelpMojo
- HelpMojoFactory
- Log
- Mojo
- MojoExecution
- Object
- Project
- ProtoSession
- Session
at org.apache.maven.di.impl.InjectorImpl.doGetCompiledBinding(InjectorImpl.java:262)
at org.apache.maven.di.impl.InjectorImpl.getCompiledBinding(InjectorImpl.java:200)
(...snip...)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2(MojoExecutor.java:346)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute(MojoExecutor.java:310)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:214)
(...snip...)
Steps to reproduce:
- Apply Add PathMatcherFactory.includesAll() #10964 and backport to the
maven-4.0.xbranch. - Clone https://github.com/Geomatys/maven-clean-plugin/tree/maven-4.0.0
mvn clean installusing Maven 4.0.0-SNAPSHOT. The JUnit tests pass.mvn-snapshot -P run-its verifyusing Maven 4.0.0-SNAPSHOT.
I tried to get the factory registered in different way, shown in this commit, but none of them worked. I'm sure that I did something wrong, but haven't identified what yet...
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingpriority:blockerBlocks development and/or testing work, production could not runBlocks development and/or testing work, production could not run