You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Chris Graham (JIRA)" <ji...@codehaus.org> on 2013/05/10 06:20:52 UTC

[jira] (MNG-5476) [REGRESSION] @required parameter not being enforced.

Chris Graham created MNG-5476:
---------------------------------

             Summary: [REGRESSION] @required parameter not being enforced.
                 Key: MNG-5476
                 URL: https://jira.codehaus.org/browse/MNG-5476
             Project: Maven 2 & 3
          Issue Type: Bug
          Components: POM
    Affects Versions: 3.0.5, 3.0.4, 3.0.3, 3.0.2, 3.0.1, 3.0
            Reporter: Chris Graham


For a plugin that has the following parameters defined:

{code}
    /**
     * The message flows to be added to the bar file.
     * @parameter expression="${msgFlows}"
     * @required
     */
    private String[] msgFlows;

    /**
     * The message sets to be added to the bar file.
     * @parameter expression="${msgSets}"
     * @required
     */
    private String[] msgSets;
{code}

and a pom config snippet of (note missing the msgSets):

{code:xml}
                    <configuration>
                        <msgFlows>
                            <msgFlow/>
                        </msgFlows>
                    </configuration>
{code}

maven 2.x (2.09 and 2.2.1) will correctly fail with the following error:

{code}
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] One or more required plugin parameters are invalid/missing for 'message-broker:package-bar-file'

[0] Inside the definition for plugin 'maven-message-broker-plugin' specify the following:

<configuration>
...
<msgSets>VALUE</msgSets>
</configuration>

OR

on the command line, specify: '-DmsgSets=VALUE'
{code}

However, maven 3.x (3.0-beta-1 through to 3.0.5) do NOT enforce this.

I would expect the build to be failed in the same manner as 2.x.


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira