Incorrect parameter injection
-----------------------------
Key: MNG-3835
URL: http://jira.codehaus.org/browse/MNG-3835
Project: Maven 2
Issue Type: Bug
Components: Plugin API
Affects Versions: 2.1.0-M1
Environment: Maven version: 2.1.0-M1
Java version: 1.5.0_16
Default locale: en_US, platform encoding: Cp1252
OS name: "windows vista" version: "6.0" arch: "x86" family: "windows"
Reporter: Matthew Beermann
Priority: Critical
Consider the following configuration fragment. Header is a bean with a list of
values; Value is a bean with a map of directives.
<headers>
<header>
<name>Bundle-SymbolicName</name>
<values>
<value>
<name>${project.name}</name>
<directives>
<singleton>true</singleton>
</directives>
</value>
</values>
</header>
<header>
<name>Eclipse-LazyStart</name>
<values>
<value>
<name>true</name>
</value>
</values>
</header>
<header>
<name>Eclipse-BuddyPolicy</name>
<values>
<value>
<name>registered</name>
</value>
</values>
</header>
<header>
<name>Require-Bundle</name>
<append>true</append>
<values>
<value>
<name>com.cerner.client.wrapper.osgi.jaxb</name>
</value>
<value>
<name>com.cerner.client.wrapper.osgi.msvc</name>
</value>
</values>
</header>
<header>
<name>Eclipse-RegisterBuddy</name>
<values>
<value>
<name>com.cerner.client.wrapper.osgi.jaxb</name>
</value>
</values>
</header>
</headers>
But here's what actually gets sent to the mojo (output from mvn -X):
[DEBUG] (s) name = Bundle-SymbolicName
[DEBUG] (s) name = jaxb-clinrpt-template
[DEBUG] (s) directives = {singleton=true}
[DEBUG] (s) values = [EMAIL PROTECTED]
[DEBUG] (s) name = Eclipse-LazyStart
[DEBUG] (s) name = true
[DEBUG] (s) values = [EMAIL PROTECTED]
[DEBUG] (s) name = Eclipse-BuddyPolicy
[DEBUG] (s) name = registered
[DEBUG] (s) values = [EMAIL PROTECTED]
[DEBUG] (s) name = Require-Bundle
[DEBUG] (s) append = true
[DEBUG] (s) name = com.cerner.client.wrapper.osgi.jaxb
[DEBUG] (s) name = com.cerner.client.wrapper.osgi.msvc
[DEBUG] (s) values = [EMAIL PROTECTED], [EMAIL PROTECTED]
[DEBUG] (s) name = Eclipse-RegisterBuddy
[DEBUG] (s) name = com.cerner.client.wrapper.osgi.jaxb
[DEBUG] (s) directives = {singleton=true}
[DEBUG] (s) values = [EMAIL PROTECTED]
Note the second, duplicate occurance of <directives> at the end, associated
with the wrong header. Where on earth did that come from? It wasn't in the
configuration. Even more mysteriously, if you rearrange the order and put the
offending <header> at the end of the list, the problem vanishes.
I'm not quite sure what's going on here, but it's causing some of our custom
goals to produce invalid output (GIGO).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira