You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Guillaume Boué (JIRA)" <ji...@apache.org> on 2017/01/15 12:21:26 UTC
[jira] [Closed] (MPLUGIN-314) invalid requirement role generated in
plugin.xml
[ https://issues.apache.org/jira/browse/MPLUGIN-314?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Guillaume Boué closed MPLUGIN-314.
----------------------------------
Resolution: Fixed
Assignee: Guillaume Boué
Fix Version/s: 3.5.1
> invalid requirement role generated in plugin.xml
> ------------------------------------------------
>
> Key: MPLUGIN-314
> URL: https://issues.apache.org/jira/browse/MPLUGIN-314
> Project: Maven Plugin Tools
> Issue Type: Bug
> Components: maven-plugin-tools-java
> Affects Versions: 3.4, 3.5
> Reporter: Jimmy Praet
> Assignee: Guillaume Boué
> Fix For: 3.5.1
>
> Attachments: plugin-bug.zip
>
>
> I ran into this issue when attempting to build a fork of the versions-maven-plugin:
> In the plugin.xml the following is generated:
> {code:xml}
> <requirements>
> <requirement>
> <role>org$apache$maven$artifact$resolver$ArtifactResolver</role>
> <field-name>resolver</field-name>
> </requirement>
> </requirements>
> {code}
> The $ should be dots.
> This only seems to happen when your field is declared with a fully qualified classname, and the class is also imported. If I remove the import or the fully qualified classname, the problem disappears.
> {code:java}
> package plugin.bug;
> import org.apache.maven.plugin.AbstractMojo;
> import org.apache.maven.plugin.MojoExecutionException;
> import org.apache.maven.plugin.MojoFailureException;
> import org.apache.maven.artifact.resolver.ArtifactResolver;
> /**
> * @goal foo
> */
> public class FooMojo extends AbstractMojo {
> /**
> * @component
> */
> private org.apache.maven.artifact.resolver.ArtifactResolver resolver;
> public void execute() throws MojoExecutionException, MojoFailureException {
> }
> }
> {code}
> It works in version 3.3.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)