Re: [DISCUSS] how to get rid of tons of duplicated code

2011-10-25 Thread Mark Struberg
Leo, that's fine, but be aware that I'll go on unifying the codestyle over the next days. So please be aware that you most likely will need to merge this branch manually. LieGrue, strub - Original Message - From: Leonardo Uribe lu4...@gmail.com To: MyFaces Development

Re: [DISCUSS] how to get rid of tons of duplicated code

2011-10-25 Thread Mark Struberg
Oki, just found time to do a  review: 1.) why do we need an own 'parent' module? I think all the basic plugin definitions should stay the same for all myfaces-core project, don't they? 2.) shared-utils : utilities for JSF used in core, but built as an api. what do you mean with 'built as an

Re: [DISCUSS] how to get rid of tons of duplicated code

2011-10-25 Thread Leonardo Uribe
2011/10/25 Mark Struberg strub...@yahoo.de: Oki, just found time to do a  review: 1.) why do we need an own 'parent' module? I think all the basic plugin definitions should stay the same for all myfaces-core project, don't they? To allow release shared-utils or shared module without the

Re: [DISCUSS] how to get rid of tons of duplicated code

2011-10-25 Thread Mark Struberg
Hi Leo! ad 1. To allow release shared-utils or shared module without the burden to release all myfaces core. we don't have any problems with the current structure neither. go to the myfaces/core/shared module and change the parent to the latest released one (usually it is on the current

Re: [DISCUSS] how to get rid of tons of duplicated code

2011-10-24 Thread Mark Struberg
Really that was not solved using maven-shade-plugin. Then we used the maven-shade-plugin the wrong way. See the relocations option [1]. There, there is a profile called synch-myfaces-impl-shared, when it is added, the code is copied and then a manual commit do the trick. I think this is an

Re: [DISCUSS] how to get rid of tons of duplicated code

2011-10-24 Thread Leonardo Uribe
Hi Ok, it is evident we have different opinions here about how to deal with this problem. So, rather than refute the arguments I think it is more productive to show another proposal. In MyFaces Core 2.0.x we have the following layout: api/ assembly/ bundle/ impl/ implee6/ integration-tests/

Re: [DISCUSS] how to get rid of tons of duplicated code

2011-10-24 Thread Mark Struberg
Hi Leo! Yes, this sounds much better, but please give me 2 days to think through it in detail. txs and LieGrue, strub - Original Message - From: Leonardo Uribe lu4...@gmail.com To: MyFaces Development dev@myfaces.apache.org; Mark Struberg strub...@yahoo.de Cc: Sent: Monday,

Re: [DISCUSS] how to get rid of tons of duplicated code

2011-10-24 Thread Leonardo Uribe
Hi I started a branch to try it: http://svn.apache.org/repos/asf/myfaces/core/branches/2.0.x_refactor_shade_duplicate/ just to gain some time. I think it is worth at least to try a prototype. regards, Leonardo Uribe 2011/10/24 Mark Struberg strub...@yahoo.de: Hi Leo! Yes, this sounds much

Re: [DISCUSS] how to get rid of tons of duplicated code

2011-10-24 Thread Leonardo Uribe
Hi Ok, it is done. In the branch it is possible to see how core will look after the change. The other changes are just use maven-shade plugin over myfaces-impl-shared-utils and myfaces-impl-shared internal modules, and do some package relocation in some cases. regards Leonardo Uribe 2011/10/24

Re: [DISCUSS] how to get rid of tons of duplicated code

2011-10-23 Thread Jakob Korherr
Hi Mark, +1 - that's exactly what I have been trying to accomplish some time ago (introducing common-shades [1]). Unfortunately, I was not successful back then. However, there is a slight problem with moving all this stuff into MyFaces shared, which I want to point out: code size. If we really

Re: [DISCUSS] how to get rid of tons of duplicated code

2011-10-23 Thread Mark Struberg
With this approach each MyFaces subproject would be able to pick out only the stuff it really needs. This is not needed if we use the maven-shade-plugin minimizeJar option [1] ! With minimizeJar enabled the dependency classes are analyzed and only the classes which really got used will get

Re: [DISCUSS] how to get rid of tons of duplicated code

2011-10-23 Thread Jakob Korherr
Ah, nice! I did not know that. Great stuff :) Regards, Jakob 2011/10/23 Mark Struberg strub...@yahoo.de: With this approach each MyFaces subproject would be able to pick out only the stuff it really needs. This is not needed if we use the maven-shade-plugin minimizeJar option [1] !

Re: [DISCUSS] how to get rid of tons of duplicated code

2011-10-23 Thread Leonardo Uribe
Hi 2011/10/23 Jakob Korherr jakob.korh...@gmail.com: Hi Mark, +1 - that's exactly what I have been trying to accomplish some time ago (introducing common-shades [1]). Unfortunately, I was not successful back then. It is clear we need to split myfaces-impl into multiple modules. There are

Re: [DISCUSS] how to get rid of tons of duplicated code

2011-10-23 Thread Leonardo Uribe
Hi Ok, let's check the proposal MS So the suggestion is: MS MS 1.) cleanup myfaces-shared. mf-shared has almost no checkstyle rules applied. Yes, sounds good. MS 2.) add unit tests for myfaces-shared. Currently there are not many... Ok, sounds good too. MS 3.) move the shared code parts back

Re: [DISCUSS] how to get rid of tons of duplicated code

2011-10-23 Thread Mark Struberg
I've now read through the old mail archives and understand what the original problem was. But actually I don't think we solved it correctly right now. Of course we solved to original problem, but opened a can of worms causing other problems. The problem as far as I remember has been that

Re: [DISCUSS] how to get rid of tons of duplicated code

2011-10-23 Thread Leonardo Uribe
Hi 2011/10/23 Mark Struberg strub...@yahoo.de: I've now read through the old mail archives and understand what the original problem was. But actually I don't think we solved it correctly right now. Of course we solved to original problem, but opened a can of worms causing other problems.

[DISCUSS] how to get rid of tons of duplicated code

2011-10-22 Thread Mark Struberg
Hi! While working on the mafyces-commons cleanup I figured that we have tons of duplicated code spread over MyFaces. As an example I like to mention myfaces-commons-resourcehandler. There are 43 classes in total, and 35 of them are just 1:1 copied from other projects to provide resource