maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthew Beermann (JIRA)" <j...@codehaus.org>
Subject [jira] Commented: (MNG-3835) Incorrect parameter injection
Date Wed, 12 Nov 2008 19:25:13 GMT

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

Matthew Beermann commented on MNG-3835:
---------------------------------------

Other variations on the theme: 

* Only the /first/ <directive> gets duplicated; any additional ones behave as they should.

* The issue arises for the <header> in any position other than the end of the configuration.
* The issue /might/ be specific to Maps, since we have other plugins that use Lists and we've
never noticed anything like this.

> 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

        

Mime
View raw message