[ https://jira.codehaus.org/browse/MNG-5476?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Karl Heinz Marbaise updated MNG-5476: ------------------------------------- Affects Version/s: 3.2 3.1.0 3.1.1 > [REGRESSION] @required parameter not being enforced for arrays > -------------------------------------------------------------- > > Key: MNG-5476 > URL: https://jira.codehaus.org/browse/MNG-5476 > Project: Maven 2 & 3 > Issue Type: Bug > Components: POM > Affects Versions: 3.0, 3.0.1, 3.0.2, 3.0.3, 3.0.4, 3.0.5, 3.1.0, 3.1.1, 3.2 > 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 was sent by Atlassian JIRA (v6.1.6#6162)