Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.2.1, 3.0
-
None
Description
For communication between Maven core and plugins, the classes of the Maven API need to be loaded from the Maven core and not the plugin realm. Maven currently tries to accomplish this by filtering out plugin dependencies based on artifact coordinates. Despite the general maintenance issue when we refactor code/modules, this completely fails with errors like below when plugins depend on 3rd party JARs that contain a (non-relocated) copy of the Maven API as recently seen with Flex.
Caused by: org.codehaus.plexus.component.configurator.ComponentConfigurationException: Cannot assign configuration entry 'project' to 'class org.apache.maven.project.MavenProject' from '${project}', which is of type class org.apache.maven.project.MavenProject at org.codehaus.plexus.component.configurator.converters.AbstractConfigurationConverter.fromExpression(AbstractConfigurationConverter.java:149) at org.codehaus.plexus.component.configurator.converters.composite.ObjectWithFieldsConverter.fromConfiguration(ObjectWithFieldsConverter.java:80) at org.codehaus.plexus.component.configurator.converters.ComponentValueSetter.configure(ComponentValueSetter.java:247) at org.codehaus.plexus.component.configurator.converters.composite.ObjectWithFieldsConverter.processConfiguration(ObjectWithFieldsConverter.java:137) at org.codehaus.plexus.component.configurator.BasicComponentConfigurator.configureComponent(BasicComponentConfigurator.java:56) at org.apache.maven.plugin.DefaultPluginManager.populatePluginFields(DefaultPluginManager.java:1357)