Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-4895

Plugins depending on 3rd party JARs that contain the Maven API can't be configured/run due to type incompatibilities

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.2.1, 3.0
    • 3.0.1
    • Plugins and Lifecycle
    • 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)
      

      Attachments

        Activity

          People

            bentmann Benjamin Bentmann
            bentmann Benjamin Bentmann
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: