You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Brett Porter (JIRA)" <ji...@codehaus.org> on 2008/12/18 01:53:19 UTC

[jira] Commented: (MNG-3835) Incorrect parameter injection

    [ http://jira.codehaus.org/browse/MNG-3835?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=158388#action_158388 ] 

Brett Porter commented on MNG-3835:
-----------------------------------

is this a regression in 2.1.0-M1, or was it also the case in 2.0.9?

> 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 = [com.cerner.engineering.maven.osgi.Value@1cb048e]
> [DEBUG]   (s) name = Eclipse-LazyStart
> [DEBUG]   (s) name = true
> [DEBUG]   (s) values = [com.cerner.engineering.maven.osgi.Value@1983ad7]
> [DEBUG]   (s) name = Eclipse-BuddyPolicy
> [DEBUG]   (s) name = registered
> [DEBUG]   (s) values = [com.cerner.engineering.maven.osgi.Value@13f348b]
> [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 = [com.cerner.engineering.maven.osgi.Value@92997e, com.cerner.engineering.maven.osgi.Value@9b601d]
> [DEBUG]   (s) name = Eclipse-RegisterBuddy
> [DEBUG]   (s) name = com.cerner.client.wrapper.osgi.jaxb
> [DEBUG]   (s) directives = {singleton=true}
> [DEBUG]   (s) values = [com.cerner.engineering.maven.osgi.Value@c3362f]
> 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