[jira] Created: (JIBX-191) Maven plugin: generated JiBX_mappingFactory class doesn't contain bindings defined in sub-project(s)

View: New views
3 Messages — Rating Filter:   Alert me  

[jira] Created: (JIBX-191) Maven plugin: generated JiBX_mappingFactory class doesn't contain bindings defined in sub-project(s)

by JIRA jira@codehaus.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Maven plugin: generated JiBX_mappingFactory class doesn't contain bindings defined in sub-project(s)
----------------------------------------------------------------------------------------------------

                 Key: JIBX-191
                 URL: http://jira.codehaus.org/browse/JIBX-191
             Project: JiBX
          Issue Type: Bug
          Components: maven plugin
    Affects Versions: JiBX 1.1.5
         Environment: all
            Reporter: Jeff Deppen
            Priority: Blocker


Assume there are 2 sub projects, named B and C, underneath a parent project named A.  If there is a binding file in both B and C.  The mapping file in C <includes> the mapping file in B.  JiBX creates only one JiBX_mappingFactory and places it into the B project.

There a few problems with this, the worst (show stopper) is that the JiBX_mappingFactory in project B is updated AFTER maven has JARed the contents of B.  As a result, the installed/deployed JiBX_mappingFactory in B is NOT current and "knows" nothing about the classes in C.

The solution is actually quite simple.   There are 2 steps, they are a configuration setting and a jibx code change, as outlined below:
1. add a "package" attribute to the binding file in C  (this will cause JiBX to create a 2nd JiBX_mappingFactory)
2. change Utility.findMappedClass to search from the bottom up.  This causes JiBX factory creation logic to "skip" past the <included> binding file and look only at bindings that are in the dependent maven project (in this case, project "C").

All of this is to say - please change the loop in Utility.findClass

from:
  for (int i = 0; i < childs.size(); i++) {

to:
  for (int i = childs.size() - 1; i >=0; i--) {

This shouldn't break any existing functionality and have the needed "side-effect" of making the maven plugin more useful.

--
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

       

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
jibx-devs mailing list
jibx-devs@...
https://lists.sourceforge.net/lists/listinfo/jibx-devs

[jira] Resolved: (JIBX-191) Maven plugin: generated JiBX_mappingFactory class doesn't contain bindings defined in sub-project(s)

by JIRA jira@codehaus.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ http://jira.codehaus.org/browse/JIBX-191?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dennis Sosnoski resolved JIBX-191.
----------------------------------

         Assignee: Dennis Sosnoski
       Resolution: Fixed
    Fix Version/s: JiBX 1.1.6

Committed requested change for JiBX 1.1.6

> Maven plugin: generated JiBX_mappingFactory class doesn't contain bindings defined in sub-project(s)
> ----------------------------------------------------------------------------------------------------
>
>                 Key: JIBX-191
>                 URL: http://jira.codehaus.org/browse/JIBX-191
>             Project: JiBX
>          Issue Type: Bug
>          Components: maven plugin
>    Affects Versions: JiBX 1.1.5
>         Environment: all
>            Reporter: Jeff Deppen
>            Assignee: Dennis Sosnoski
>            Priority: Blocker
>             Fix For: JiBX 1.1.6
>
>   Original Estimate: 1 hour
>  Remaining Estimate: 1 hour
>
> Assume there are 2 sub projects, named B and C, underneath a parent project named A.  If there is a binding file in both B and C.  The mapping file in C <includes> the mapping file in B.  JiBX creates only one JiBX_mappingFactory and places it into the B project.
> There a few problems with this, the worst (show stopper) is that the JiBX_mappingFactory in project B is updated AFTER maven has JARed the contents of B.  As a result, the installed/deployed JiBX_mappingFactory in B is NOT current and "knows" nothing about the classes in C.
> The solution is actually quite simple.   There are 2 steps, they are a configuration setting and a jibx code change, as outlined below:
> 1. add a "package" attribute to the binding file in C  (this will cause JiBX to create a 2nd JiBX_mappingFactory)
> 2. change Utility.findMappedClass to search from the bottom up.  This causes JiBX factory creation logic to "skip" past the <included> binding file and look only at bindings that are in the dependent maven project (in this case, project "C").
> All of this is to say - please change the loop in Utility.findClass
> from:
>   for (int i = 0; i < childs.size(); i++) {
> to:
>   for (int i = childs.size() - 1; i >=0; i--) {
> This shouldn't break any existing functionality and have the needed "side-effect" of making the maven plugin more useful.

--
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

       

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
jibx-devs mailing list
jibx-devs@...
https://lists.sourceforge.net/lists/listinfo/jibx-devs

[jira] Closed: (JIBX-191) Maven plugin: generated JiBX_mappingFactory class doesn't contain bindings defined in sub-project(s)

by JIRA jira@codehaus.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ http://jira.codehaus.org/browse/JIBX-191?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dennis Sosnoski closed JIBX-191.
--------------------------------


> Maven plugin: generated JiBX_mappingFactory class doesn't contain bindings defined in sub-project(s)
> ----------------------------------------------------------------------------------------------------
>
>                 Key: JIBX-191
>                 URL: http://jira.codehaus.org/browse/JIBX-191
>             Project: JiBX
>          Issue Type: Bug
>          Components: maven plugin
>    Affects Versions: JiBX 1.1.5
>         Environment: all
>            Reporter: Jeff Deppen
>            Assignee: Dennis Sosnoski
>            Priority: Blocker
>             Fix For: JiBX 1.1.6
>
>   Original Estimate: 1 hour
>  Remaining Estimate: 1 hour
>
> Assume there are 2 sub projects, named B and C, underneath a parent project named A.  If there is a binding file in both B and C.  The mapping file in C <includes> the mapping file in B.  JiBX creates only one JiBX_mappingFactory and places it into the B project.
> There a few problems with this, the worst (show stopper) is that the JiBX_mappingFactory in project B is updated AFTER maven has JARed the contents of B.  As a result, the installed/deployed JiBX_mappingFactory in B is NOT current and "knows" nothing about the classes in C.
> The solution is actually quite simple.   There are 2 steps, they are a configuration setting and a jibx code change, as outlined below:
> 1. add a "package" attribute to the binding file in C  (this will cause JiBX to create a 2nd JiBX_mappingFactory)
> 2. change Utility.findMappedClass to search from the bottom up.  This causes JiBX factory creation logic to "skip" past the <included> binding file and look only at bindings that are in the dependent maven project (in this case, project "C").
> All of this is to say - please change the loop in Utility.findClass
> from:
>   for (int i = 0; i < childs.size(); i++) {
> to:
>   for (int i = childs.size() - 1; i >=0; i--) {
> This shouldn't break any existing functionality and have the needed "side-effect" of making the maven plugin more useful.

--
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

       

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
jibx-devs mailing list
jibx-devs@...
https://lists.sourceforge.net/lists/listinfo/jibx-devs
LightInTheBox - Buy quality products at wholesale price