Actually I think it might be a side-effect of the following feature/improvement
made for M3:
https://issues.sonatype.org/browse/SISU-58
where the code to handle arrays was made more consistent wrt. the handling of
collections.
On 6 May 2013, at 12:35, Hervé BOUTEMY wrote:
> looks like a subtle change in injection when moving from Plexus to Guice
>
> Regards,
>
> Hervé
>
> Le lundi 6 mai 2013 23:06:49 Chris Graham a écrit :
>> Hey All.
>>
>> I'm not sure if I've found a regression issue with Maven 3.0.x (tried with
>> all versions beta-1 onwards to 3.0.5) or not. V3.x behaves differently to
>> 2.09, 2.0.11 and 2.2.1.
>>
>> I've written a plugin for WebSphere Message Broker; basically it's a
>> wrapper for the underlying mqsicreatebar tool.
>>
>> Amongst other things, it takes zero or more message sets and message flows.
>> To handle this, I defined the parameters as an array.
>>
>> Here is the snippet from the plugin's source:
>> /**
>> * 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;
>>
>> and here is an example configuration section from a pom that uses the
>> plugin:
>>
>> <configuration>
>> <skipApplyOverrides>false</skipApplyOverrides>
>> <isV60>true</isV60>
>> <workspace>${wmbtk.workspace.root}/24a</workspace>
>> <msgFlows>
>>
>> <msgFlow>MFP_Project/com/blah/MFL_DiagFlow.msgflow</msgFlow>
>> </msgFlows>
>> <msgSets>
>> <msgSet />
>> </msgSets>
>> </configuration>
>>
>> So we have one message flow, but no message sets.
>>
>> Here is where the differences are seen.
>>
>> Maven 2.0.9, 2.0.11 and 2.2.1 will initialise the msgSets as null.
>>
>> Maven 3.0 (beta-1 to 3.0.5) will initialise msgSets as a single element of
>> null.
>>
>> My question boils down to: is this the desired behaviour?
>>
>> I've had to adjust my code to work under Maven 3.x (which I didn't think
>> that I had too).
>>
>> From memory, I can not supply an empty <msgSets/> element (but I need to
>> check that).
>>
>> -Chris
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]