Return-Path: Delivered-To: apmail-myfaces-dev-archive@www.apache.org Received: (qmail 99688 invoked from network); 8 Nov 2010 09:51:31 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 8 Nov 2010 09:51:31 -0000 Received: (qmail 14449 invoked by uid 500); 8 Nov 2010 09:52:02 -0000 Delivered-To: apmail-myfaces-dev-archive@myfaces.apache.org Received: (qmail 14331 invoked by uid 500); 8 Nov 2010 09:52:01 -0000 Mailing-List: contact dev-help@myfaces.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "MyFaces Development" Delivered-To: mailing list dev@myfaces.apache.org Received: (qmail 14323 invoked by uid 99); 8 Nov 2010 09:52:00 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Nov 2010 09:52:00 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of gerhard.petracek@gmail.com designates 74.125.82.43 as permitted sender) Received: from [74.125.82.43] (HELO mail-ww0-f43.google.com) (74.125.82.43) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Nov 2010 09:51:56 +0000 Received: by wwb13 with SMTP id 13so3583889wwb.0 for ; Mon, 08 Nov 2010 01:51:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type; bh=Rk+0dUlAst0XYdfseXgZw1Gd8EROZ0W7ihafLeDZQCk=; b=ZrKQLlVurMQRN8uYaXRI+ZTpb24ASkNr30M7h8aL24J5peveIU/Rnh3xurhl6OPX6w N8hKrGKQ68r8q3U3OZ3iHBJTSuvxfDb90FA4eqD2MikbI9KO47XP3NtD9WLspsDTdfYo 0ZVsHlS/+Dz5jYOJ5f6anuRgly6RcA0P2gVss= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=i6nt6bJpUazGGz/EYTfwNlFEqfnYJdaVxbRx0ZVeVwzzamhE8aRGV42QcRYUDpPN2T egRqc27P+8RVXg/DQZyvf+INJOoJmq0p0HRNWfZkAS5at4dIOY5CaqzRHLsaIbN5JYpG ap83RTKyQoUVRtB+AJWSzv+KEr0XebTECjrnI= Received: by 10.227.143.79 with SMTP id t15mr164405wbu.151.1289209893871; Mon, 08 Nov 2010 01:51:33 -0800 (PST) MIME-Version: 1.0 Received: by 10.227.147.83 with HTTP; Mon, 8 Nov 2010 01:51:13 -0800 (PST) In-Reply-To: References: <2682374A-016C-4A65-B2EF-280BA38FB91D@gmail.com> From: Gerhard Date: Mon, 8 Nov 2010 10:51:13 +0100 Message-ID: Subject: Re: Use maven-shade-plugin to prevent duplicate code To: MyFaces Development Content-Type: multipart/alternative; boundary=00163683359ac3e2f804948791de --00163683359ac3e2f804948791de Content-Type: text/plain; charset=ISO-8859-1 hi @ all, imo it would be nice to refactor it for 2.0.4. it would also allow an optional all-in-one jar file (mojarra is going to do the same [1]). regards, gerhard [1] https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=924 http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces 2010/7/27 Martin Marinschek > So - without the dependencies problem - +100 for getting rid of > shared. The sooner this goes, the better. > > But, of course: make sure the shade thing runs smoothly with the IDE > integration (I want to be able to check-out the sample app and start > working, highly favored best case: without having to do a full maven > build after each change). > > And, of course, make sure there is no issues with the deployment or > circular dependencies... I am sure you guys will be able to sort this > out ;) > > best regards, > > Martin > > On Mon, Jul 26, 2010 at 11:33 PM, Jan-Kees Van Andel > wrote: > > I think you're right. The only real solution is a nice and clean Shared > > project. Otherwise the dependencies will become very tangled. > > /JK > > > > > > Sent from my iPad > > Op 26 jul. 2010 om 23:10 heeft Leonardo Uribe het > > volgende geschreven: > > > > Hi > > > > 2010/7/26 Jakob Korherr > >> > >> "This code is just some wrappers and it is not expected this will change > >> in the future. So the question is why bother us in this case? In this > case > >> use maven-shade-plugin is not worth." > >> > >> Actually and quite frankly it really is worth it. It is very easy and if > >> you understand it, it is even easier than just copy & past, because you > >> don't have to change packages manually. Furthermore, if you look at > those > >> classes, they have been refactored a couple of times from the very > beginning > >> (myfaces 1.1). > >> > >> In addition, there will surely be myfaces-test versions for JSF 2.1 (and > >> 2.2, 3.0,...) and then you will always have to copy those classes and > hope > >> nothing will change. If you use the shade-plugin, you can throw your > worries > >> away! > >> > > > > Myfaces-test uses myfaces-builder-plugin unpack goal to share code > between > > versions, so the wrappers will be only on myfaces-test12. > > > > I'm worried about a possible circular dependency between myfaces core and > > myfaces test. The wrappers are on myfaces-core, but myfaces-test requires > > core wrappers to be build, but we require myfaces-test on core to run > some > > tests, so which one should be compiled first? which one should be > released > > first?. When you execute maven release plugin, it is necessary to change > > versions to the release ones, so do that will cause a lot of problems on > > release. > > > > regards, > > > > Leonardo > > > >> > >> Regards, > >> Jakob > >> > >> 2010/7/26 Mark Struberg > >>> > >>> I think you are both right. I can understand that copying code is > really > >>> ugly, > >>> but otoh Leos argument is also pretty strong. > >>> > >>> There is a solution for this. Cut off the shared parts and move it into > >>> an own > >>> module. > >>> > >>> This sounds easy but isn't always doable. But it might be worth a try. > >>> > >>> LieGrue, > >>> strub > >>> > >>> > >>> > > >>> >From: Jakob Korherr > >>> >To: MyFaces Development > >>> >Sent: Mon, July 26, 2010 10:32:31 PM > >>> >Subject: Re: Use maven-shade-plugin to prevent duplicate code > >>> > > >>> >Why would you like to have any duplicate code? This should not be > >>> > anyone's > >>> >target in my opinion... > >>> > > >>> > > >>> > > >>> >2010/7/26 Leonardo Uribe > >>> > > >>> >Hi > >>> >> > >>> >>Yes, it is true, that myfaces-test is used for testing myfaces core, > >>> >> but in > >>> >>theory, myfaces-test should be used to test jsf stuff without rely on > a > >>> >> specific > >>> >> > >>> >>jsf implementation. > >>> >> > >>> >>In this case I think (and it is my personal opinion) it is better to > >>> >> have some > >>> > >>> >>duplicate code and keep things simple. Use maven-shade-plugin to deal > >>> >> with > >>> >>shared code is another different history. > >>> >> > >>> >>regards, > >>> >> > >>> >>Leonardo Uribe > >>> >> > >>> >> > >>> >>2010/7/26 Jakob Korherr > >>> >> > >>> >> > >>> >>Actually this already is the case: MyFaces-test is used for testing > >>> >> MyFaces > >>> >>core. > >>> >>> > >>> >>> > >>> >>>Regards, > >>> >>>Jakob > >>> >>> > >>> >>> > >>> >>>2010/7/26 Rudy De Busscher > >>> >>> > >>> >>>Hi Jakob, > >>> >>>> > >>> >>>>So it was never the idea that MyFaces Test (and maybe the GSOC > >>> >>>> testing effort) > >>> >> > >>> >>>>will be used to supply the test infrastructure for MyFaces Core? > >>> >>>> > >>> >>>>In that case : MyFaces Core can supply code. > >>> >>>> > >>> >>>>Regards > >>> >>>>Rudy. > >>> >>>> > >>> >>>> > >>> >>>> > >>> >>>>On 26 July 2010 22:01, Jakob Korherr > wrote: > >>> >>>> > >>> >>>>Hi Rudy, > >>> >>>>> > >>> >>>>>Yes we totally have to be careful with circular dependencies, but > it > >>> >>>>> should not > >>> >>>> > >>> >>>>>be that big problem. > >>> >>>>> > >>> >>>>>Actually I think that the opposite is true. MyFaces core is the > JSF > >>> >>>>>implementation and MyFaces test provides the Mock classes for JSF, > >>> >>>>> and for > >>> >>>>>implementing these Mock classes it can reuse some functionality > >>> >>>>> already present > >>> >>>> > >>> >>>>>in MyFaces core (e.g. the real classes which should be mocked). > IMO > >>> >>>>> this is the > >>> >>>> > >>> >>>>>way it should be. > >>> >>>>> > >>> >>>>>Regards, > >>> >>>>>Jakob > >>> >>>>> > >>> >>>>> > >>> >>>>>2010/7/26 Rudy De Busscher > >>> >>>>> > >>> >>>>> > >>> >>>>>Hi all, > >>> >>>>>> > >>> >>>>>>I agree, duplicated code has to be avoided and when the > >>> >>>>>> maven-shade-plugin can > >>> >>>> > >>> >>>>>>help, the better. > >>> >>>>>> > >>> >>>>>>but I think we have to define which project supplies code for > which > >>> >>>>>> other > >>> >>>>>>project (so that we don't get a spaghetti (using the tomatoes ;) > or > >>> >>>>>> get circular > >>> >>>>>> > >>> >>>>>>dependencies.). I know that MyFaces core exists much longer then > >>> >>>>>> MyFaces Test > >>> >>>> > >>> >>>>>>but I find it more > >>> >>>>>> > >>> >>>>>> > >>> >>>>>>logic that the MyFaces Test supplies code for the MyFaces Core > >>> >>>>>> project. > >>> >>>>>> > >>> >>>>>>my 2c. > >>> >>>>>> > >>> >>>>>>Regards > >>> >>>>>>Rudy > >>> >>>>>> > >>> >>>>>> > >>> >>>>>> > >>> >>>>>>On 26 July 2010 21:40, Matthias Wessendorf > >>> >>>>>> wrote: > >>> >>>>>> > >>> >>>>>>On Mon, Jul 26, 2010 at 9:30 PM, Jakob Korherr > >>> >>>>>> > >>> >>>>wrote: > >>> >>>>>>>> Hehe, yeah I maybe forgot 10 "many". > >>> >>>>>>>> > >>> >>>>>>>> I can provide a wiki page for the general idea and the > approach > >>> >>>>>>>> used on > >>> >>>>>>>> myfaces-test. > >>> >>>>>>> > >>> >>>>>>>+1 > >>> >>>>>>> > >>> >>>>>>> > >>> >>>>>>>> Then everyone can adopt this idea and see how it works. > >>> >>>>>>> > >>> >>>>>>>great. I have that on my agenda as well, for Trinidad but a > >>> >>>>>>>new release is more important, today... > >>> >>>>>>> > >>> >>>>>>>> > >>> >>>>>>>> "RIP _shared? :)" > >>> >>>>>>>> --> yes! > >>> >>>>>>> > >>> >>>>>>>I thought so. Yes! :) > >>> >>>>>>> > >>> >>>>>>> > >>> >>>>>>>> > >>> >>>>>>>> Regards, > >>> >>>>>>>> Jakob > >>> >>>>>>>> > >>> >>>>>>>> 2010/7/26 Matthias Wessendorf > >>> >>>>>>>>> > >>> >>>>>>>>> On Mon, Jul 26, 2010 at 8:56 PM, Jakob Korherr > >>> > > >>> >>>>>>>>> wrote: > >>> >>>>>>>>> > Hi guys, > >>> >>>>>>>>> > > >>> >>>>>>>>> > Working on the tests for FlashImpl, I ran into a problem > with > >>> >>>>>>>>> > the > >>> >>>>>>>>> > AbstractAttributeMap (MYFACES-2840). After fixing it, I > >>> >>>>>>>>> > needed to > >>> >copy > >>> >>>>>>>>> > my > >>> >>>>>>>>> > changes over to myfaces-test to be able to use the new > >>> >>>>>>>>> > version in > >>> the > >>> >>>>>>>>> > test > >>> >>>>>>>>> > case (MYFACESTEST-21). And this copying really sucks... > >>> >>>>>>>>> > >>> >>>>>>>>> +1 > >>> >>>>>>>>> > >>> >>>>>>>>> > > >>> >>>>>>>>> > If you think about it there are many, many, many different > >>> >>>>>>>>> > places in > >>> > >>> >>>the > >>> >>>>>>>>> > >>> >>>>>>>>> you forgot a many :-) > >>> >>>>>>>>> > >>> >>>>>>>>> > whole MyFaces project where we have duplicate code, for > >>> >>>>>>>>> > example > >>> >>>>>>>>> > package-private, unspecified classes on myfaces-api which > >>> >>>>>>>>> > also exist > >>> > >>> >>in > >>> >>>>>>>>> > myfaces-impl, classes of myfaces-impl which are used for > the > >>> >>>>>>>>> > mock > >>> >>>>>>>>> > implementations of myfaces-test, or the biggest one: the > >>> >>>>>>>>> > shared > >>> >>>project. > >>> >>>>>>>>> > > >>> >>>>>>>>> > An introduction to the maven-shade-plugin: This plugin lets > >>> >>>>>>>>> > you use > >>> a > >>> >>>>>>>>> > dependency to another project and then at build time it > >>> >>>>>>>>> > copies all > >>> >>>>>>>>> > needed > >>> >>>>>>>>> > classes to the created jar file, removes the dependency > from > >>> >>>>>>>>> > the > >>> >>>pom.xml > >>> >>>>>>>>> > and > >>> >>>>>>>>> > changes the imports in the class files. Thus you work with > >>> >>>>>>>>> > the real > >>> >>>>>>>>> > classes > >>> >>>>>>>>> > at development time and then at build time the used classes > >>> >>>>>>>>> > are > >>> >copied > >>> >>>>>>>>> > into > >>> >>>>>>>>> > the artifact and the development dependency is gone. > >>> >>>>>>>>> > Furthermore you > >>> > >>> >>>can > >>> >>>>>>>>> > make all kinds of alterations to those classes (e.g. change > >>> package). > >>> >>>>>>>>> > > >>> >>>>>>>>> > We successfully use the maven-shade-plugin in MyFaces CODI > to > >>> >>>>>>>>> > reuse > >>> >>>>>>>>> > functionaltiy between the JSF 1.2 and 2.0 modules. In > >>> >>>>>>>>> > addition, I > >>> >have > >>> >>>>>>>>> > locally already used it to fix MYFACESTEST-21: I use it to > >>> >>>>>>>>> > get the > >>> >>>>>>>>> > AbstractAttributeMap and all its related classes from > >>> >>>>>>>>> > myfaces-impl > >>> to > >>> >>>>>>>>> > myfaces-test. And it really works like a calm. > >>> >>>>>>>>> > > >>> >>>>>>>>> > However I have to be honest, one thing currently has a bug: > >>> >>>>>>>>> > filters > >>> >>are > >>> >>>>>>>>> > only > >>> >>>>>>>>> > applied to the binary and not also to the sources jar (see > >>> >>>>>>>>> > http://jira.codehaus.org/browse/MSHADE-83), but I already > >>> >>>>>>>>> > provided a > >>> >>>>>>>>> > patch > >>> >>>>>>>>> > and a test case for it, so I guess it will be fixed very > >>> >>>>>>>>> > soon. > >>> >>>>>>>>> > > >>> >>>>>>>>> > So if there are no objects, I would like to introduce the > >>> >>>>>>>>> > maven-shade-plugin > >>> >>>>>>>>> > on myfaces-test at first, to show you guys how awesome it > is. > >>> >>>>>>>>> > Afterwards, > >>> >>>>>>>>> > and of course if you all like it, I would really like to > use > >>> >>>>>>>>> > it on > >>> >>>>>>>>> > several > >>> >>>>>>>>> > places in MyFaces. This would for example be the chance to > >>> >>>>>>>>> > get rid > >>> of > >>> >>>>>>>>> > the > >>> >>>>>>>>> > shared project once and for all. > >>> >>>>>>>>> > > >>> >>>>>>>>> > Opinions, suggestions and tomatoes are welcome! > >>> >>>>>>>>> > >>> >>>>>>>>> +1 on this approach. I'd like to see the *adoption* (kinda) > >>> >>>>>>>>> documented, so that other (sub) projects can *learn* from > your > >>> efforts! > >>> >>>>>>>>> > >>> >>>>>>>>> RIP _shared? :) > >>> >>>>>>>>> > >>> >>>>>>>>> -Matthias > >>> >>>>>>>>> > >>> >>>>>>>>> > >>> >>>>>>>>> > > >>> >>>>>>>>> > Regards, > >>> >>>>>>>>> > Jakob > >>> >>>>>>>>> > > >>> >>>>>>>>> > -- > >>> >>>>>>>>> > Jakob Korherr > >>> >>>>>>>>> > > >>> >>>>>>>>> > blog: http://www.jakobk.com > >>> >>>>>>>>> > twitter: http://twitter.com/jakobkorherr > >>> >>>>>>>>> > work: http://www.irian.at > >>> >>>>>>>>> > > >>> >>>>>>>>> > >>> >>>>>>>>> > >>> >>>>>>>>> > >>> >>>>>>>>> -- > >>> >>>>>>>>> Matthias Wessendorf > >>> >>>>>>>>> > >>> >>>>>>>>> blog: http://matthiaswessendorf.wordpress.com/ > >>> >>>>>>>>> sessions: http://www.slideshare.net/mwessendorf > >>> >>>>>>>>> twitter: http://twitter.com/mwessendorf > >>> >>>>>>>> > >>> >>>>>>>> > >>> >>>>>>>> > >>> >>>>>>>> -- > >>> >>>>>>>> Jakob Korherr > >>> >>>>>>>> > >>> >>>>>>>> blog: http://www.jakobk.com > >>> >>>>>>>> twitter: http://twitter.com/jakobkorherr > >>> >>>>>>>> work: http://www.irian.at > >>> >>>>>>>> > >>> >>>>>>> > >>> >>>>>>> > >>> >>>>>>> > >>> >>>>>>>-- > >>> >>>>>>> > >>> >>>>>>>Matthias Wessendorf > >>> >>>>>>> > >>> >>>>>>>blog: http://matthiaswessendorf.wordpress.com/ > >>> >>>>>>>sessions: http://www.slideshare.net/mwessendorf > >>> >>>>>>>twitter: http://twitter.com/mwessendorf > >>> >>>>>>> > >>> >>>>>> > >>> >>>>> > >>> >>>>> > >>> >>>>>-- > >>> >>>>> > >>> >>>>>Jakob Korherr > >>> >>>>> > >>> >>>>>blog: http://www.jakobk.com > >>> >>>>>twitter: http://twitter.com/jakobkorherr > >>> >>>>>work: http://www.irian.at > >>> >>>>> > >>> >>>> > >>> >>> > >>> >>> > >>> >>>-- > >>> >>> > >>> >>>Jakob Korherr > >>> >>> > >>> >>>blog: http://www.jakobk.com > >>> >>>twitter: http://twitter.com/jakobkorherr > >>> >>>work: http://www.irian.at > >>> >>> > >>> >> > >>> > > >>> > > >>> >-- > >>> >Jakob Korherr > >>> > > >>> >blog: http://www.jakobk.com > >>> >twitter: http://twitter.com/jakobkorherr > >>> >work: http://www.irian.at > >>> > > >>> > >>> > >>> > >> > >> > >> > >> -- > >> Jakob Korherr > >> > >> blog: http://www.jakobk.com > >> twitter: http://twitter.com/jakobkorherr > >> work: http://www.irian.at > > > > > > > > -- > > http://www.irian.at > > Your JSF powerhouse - > JSF Consulting, Development and > Courses in English and German > > Professional Support for Apache MyFaces > --00163683359ac3e2f804948791de Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable hi @ all,

imo it would be nice to refactor it for 2.0.4.=
it would also allow an optional all-in-one jar file (mojarra is = going to do the same [1]).

regards,
gerhard


http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in = English and German

Professional Support for Apache MyFaces



2010/7/27 Martin Marinsch= ek <mmarinsc= hek@apache.org>
So - without the dependencies problem - +100 for getting rid of
shared. The sooner this goes, the better.

But, of course: make sure the shade thing runs smoothly with the IDE
integration (I want to be able to check-out the sample app and start
working, highly favored best case: without having to do a full maven
build after each change).

=A0And, of course, make sure there is no issues with the deployment or
circular dependencies... I am sure you guys will be able to sort this
out ;)

best regards,

Martin

On Mon, Jul 26, 2010 at 11:33 PM, Jan-Kees Van Andel
<jankeesvanandel@gmail.com<= /a>> wrote:
> I think you're right. The only real solution is a nice and clean S= hared
> project. Otherwise the dependencies will become very tangled.
> /JK
>
>
> Sent from my iPad
> Op 26 jul. 2010 om 23:10 heeft Leonardo Uribe <
lu4242@gmail.com> het
> volgende geschreven:
>
> Hi
>
> 2010/7/26 Jakob Korherr <jakob.korherr@gmail.com>
>>
>> "This code is just some wrappers and it is not expected this = will change
>> in the future. So the question is why bother us in this case? In t= his case
>> use maven-shade-plugin is not worth."
>>
>> Actually and quite frankly it really is worth it. It is very easy = and if
>> you understand it, it is even easier than just copy & past, be= cause you
>> don't have to change packages manually. Furthermore, if you lo= ok at those
>> classes, they have been refactored a couple of times from the very= beginning
>> (myfaces 1.1).
>>
>> In addition, there will surely be myfaces-test versions for JSF 2.= 1 (and
>> 2.2, 3.0,...) and then you will always have to copy those classes = and hope
>> nothing will change. If you use the shade-plugin, you can throw yo= ur worries
>> away!
>>
>
> Myfaces-test uses myfaces-builder-plugin unpack goal to share code bet= ween
> versions, so the wrappers will be only on myfaces-test12.
>
> I'm worried about a possible circular dependency between myfaces c= ore and
> myfaces test. The wrappers are on myfaces-core, but myfaces-test requi= res
> core wrappers to be build, but we require myfaces-test on core to run = some
> tests, so which one should be compiled first? which one should be rele= ased
> first?. When you execute maven release plugin, it is necessary to chan= ge
> versions to the release ones, so do that will cause a lot of problems = on
> release.
>
> regards,
>
> Leonardo
>
>>
>> Regards,
>> Jakob
>>
>> 2010/7/26 Mark Struberg <s= truberg@yahoo.de>
>>>
>>> I think you are both right. I can understand that copying code= is really
>>> ugly,
>>> but otoh Leos argument is also pretty strong.
>>>
>>> There is a solution for this. Cut off the shared parts and mov= e it into
>>> an own
>>> module.
>>>
>>> This sounds easy but isn't always doable. But it might be = worth a try.
>>>
>>> LieGrue,
>>> strub
>>>
>>>
>>> >
>>> >From: Jakob Korherr <jakob.korherr@gmail.com>
>>> >To: MyFaces Development <dev@myfaces.apache.org>
>>> >Sent: Mon, July 26, 2010 10:32:31 PM
>>> >Subject: Re: Use maven-shade-plugin to prevent duplicate c= ode
>>> >
>>> >Why would you like to have any duplicate code? This should= not be
>>> > anyone's
>>> >target in my opinion...
>>> >
>>> >
>>> >
>>> >2010/7/26 Leonardo Uribe <lu4242@gmail.com>
>>> >
>>> >Hi
>>> >>
>>> >>Yes, it is true, that myfaces-test is used for testing= myfaces core,
>>> >> but in
>>> >>theory, myfaces-test should be used to test jsf stuff = without rely on a
>>> >> specific
>>> >>
>>> >>jsf implementation.
>>> >>
>>> >>In this case I think (and it is my personal opinion) i= t is better to
>>> >> have some
>>>
>>> >>duplicate code and keep things simple. Use maven-shade= -plugin to deal
>>> >> with
>>> >>shared code is another different history.
>>> >>
>>> >>regards,
>>> >>
>>> >>Leonardo Uribe
>>> >>
>>> >>
>>> >>2010/7/26 Jakob Korherr <jakob.korherr@gmail.com>
>>> >>
>>> >>
>>> >>Actually this already is the case: MyFaces-test is use= d for testing
>>> >> MyFaces
>>> >>core.
>>> >>>
>>> >>>
>>> >>>Regards,
>>> >>>Jakob
>>> >>>
>>> >>>
>>> >>>2010/7/26 Rudy De Busscher <rdebusscher@gmail.com>
>>> >>>
>>> >>>Hi Jakob,
>>> >>>>
>>> >>>>So it was never the idea that MyFaces Test (an= d maybe the GSOC
>>> >>>> testing effort)
>>> >>
>>> >>>>will be used to supply the test infrastructure= for MyFaces Core?
>>> >>>>
>>> >>>>In that case : MyFaces Core can supply code. >>> >>>>
>>> >>>>Regards
>>> >>>>Rudy.
>>> >>>>
>>> >>>>
>>> >>>>
>>> >>>>On 26 July 2010 22:01, Jakob Korherr <jakob.korherr@gmail.com> wrote= :
>>> >>>>
>>> >>>>Hi Rudy,
>>> >>>>>
>>> >>>>>Yes we totally have to be careful with cir= cular dependencies, but it
>>> >>>>> should not
>>> >>>>
>>> >>>>>be that big problem.
>>> >>>>>
>>> >>>>>Actually I think that the opposite is true= . MyFaces core is the JSF
>>> >>>>>implementation and MyFaces test provides t= he Mock classes for JSF,
>>> >>>>> and for
>>> >>>>>implementing these Mock classes it can reu= se some functionality
>>> >>>>> already present
>>> >>>>
>>> >>>>>in MyFaces core (e.g. the real classes whi= ch should be mocked). IMO
>>> >>>>> this is the
>>> >>>>
>>> >>>>>way it should be.
>>> >>>>>
>>> >>>>>Regards,
>>> >>>>>Jakob
>>> >>>>>
>>> >>>>>
>>> >>>>>2010/7/26 Rudy De Busscher <rdebusscher@gmail.com>
>>> >>>>>
>>> >>>>>
>>> >>>>>Hi all,
>>> >>>>>>
>>> >>>>>>I agree, duplicated code has to be avo= ided and when the
>>> >>>>>> maven-shade-plugin can
>>> >>>>
>>> >>>>>>help, the better.
>>> >>>>>>
>>> >>>>>>but I think we have to define which pr= oject supplies code for which
>>> >>>>>> other
>>> >>>>>>project (so that we don't get a sp= aghetti (using the tomatoes ;) or
>>> >>>>>> get circular
>>> >>>>>>
>>> >>>>>>dependencies.). =A0I know that MyFaces= core exists much longer then
>>> >>>>>> MyFaces Test
>>> >>>>
>>> >>>>>>but I find it more
>>> >>>>>>
>>> >>>>>>
>>> >>>>>>logic that the MyFaces Test supplies c= ode for the MyFaces Core
>>> >>>>>> project.
>>> >>>>>>
>>> >>>>>>my 2c.
>>> >>>>>>
>>> >>>>>>Regards
>>> >>>>>>Rudy
>>> >>>>>>
>>> >>>>>>
>>> >>>>>>
>>> >>>>>>On 26 July 2010 21:40, Matthias Wessen= dorf <matzew@apache.org>
>>> >>>>>> wrote:
>>> >>>>>>
>>> >>>>>>On Mon, Jul 26, 2010 at 9:30 PM, Jakob= Korherr
>>> >>>>>> <jakob.korherr@gmail.com>
>>> >>>>wrote:
>>> >>>>>>>> Hehe, yeah I maybe forgot 10 = "many".
>>> >>>>>>>>
>>> >>>>>>>> I can provide a wiki page for= the general idea and the approach
>>> >>>>>>>> used on
>>> >>>>>>>> myfaces-test.
>>> >>>>>>>
>>> >>>>>>>+1
>>> >>>>>>>
>>> >>>>>>>
>>> >>>>>>>> Then everyone can adopt this = idea and see how it works.
>>> >>>>>>>
>>> >>>>>>>great. I have that on my agenda as= well, for Trinidad but a
>>> >>>>>>>new release is more important, tod= ay...
>>> >>>>>>>
>>> >>>>>>>>
>>> >>>>>>>> "RIP _shared? :)" >>> >>>>>>>> --> yes!
>>> >>>>>>>
>>> >>>>>>>I thought so. Yes! :)
>>> >>>>>>>
>>> >>>>>>>
>>> >>>>>>>>
>>> >>>>>>>> Regards,
>>> >>>>>>>> Jakob
>>> >>>>>>>>
>>> >>>>>>>> 2010/7/26 Matthias Wessendorf= <matzew@apache.org>
>>> >>>>>>>>>
>>> >>>>>>>>> On Mon, Jul 26, 2010 at 8= :56 PM, Jakob Korherr
>>> ><jakob.korhe= rr@gmail.com>
>>> >>>>>>>>> wrote:
>>> >>>>>>>>> > Hi guys,
>>> >>>>>>>>> >
>>> >>>>>>>>> > Working on the tests= for FlashImpl, I ran into a problem with
>>> >>>>>>>>> > the
>>> >>>>>>>>> > AbstractAttributeMap= (MYFACES-2840). After fixing it, I
>>> >>>>>>>>> > needed to
>>> >copy
>>> >>>>>>>>> > my
>>> >>>>>>>>> > changes over to myfa= ces-test to be able to use the new
>>> >>>>>>>>> > version in
>>> the
>>> >>>>>>>>> > test
>>> >>>>>>>>> > case (MYFACESTEST-21= ). And this copying really sucks...
>>> >>>>>>>>>
>>> >>>>>>>>> +1
>>> >>>>>>>>>
>>> >>>>>>>>> >
>>> >>>>>>>>> > If you think about i= t there are many, many, many different
>>> >>>>>>>>> > places in
>>>
>>> >>>the
>>> >>>>>>>>>
>>> >>>>>>>>> you forgot a many :-)
>>> >>>>>>>>>
>>> >>>>>>>>> > whole MyFaces projec= t where we have duplicate code, for
>>> >>>>>>>>> > example
>>> >>>>>>>>> > package-private, uns= pecified classes on myfaces-api which
>>> >>>>>>>>> > also exist
>>>
>>> >>in
>>> >>>>>>>>> > myfaces-impl, classe= s of myfaces-impl which are used for the
>>> >>>>>>>>> > mock
>>> >>>>>>>>> > implementations of m= yfaces-test, or the biggest one: the
>>> >>>>>>>>> > shared
>>> >>>project.
>>> >>>>>>>>> >
>>> >>>>>>>>> > An introduction to t= he maven-shade-plugin: This plugin lets
>>> >>>>>>>>> > you use
>>> a
>>> >>>>>>>>> > dependency to anothe= r project and then at build time it
>>> >>>>>>>>> > copies all
>>> >>>>>>>>> > needed
>>> >>>>>>>>> > classes to the creat= ed jar file, removes the dependency from
>>> >>>>>>>>> > the
>>> >>>pom.xml
>>> >>>>>>>>> > and
>>> >>>>>>>>> > changes the imports = in the class files. Thus you work with
>>> >>>>>>>>> > the real
>>> >>>>>>>>> > classes
>>> >>>>>>>>> > at development time = and then at build time the used classes
>>> >>>>>>>>> > are
>>> >copied
>>> >>>>>>>>> > into
>>> >>>>>>>>> > the artifact and the= development dependency is gone.
>>> >>>>>>>>> > Furthermore you
>>>
>>> >>>can
>>> >>>>>>>>> > make all kinds of al= terations to those classes (e.g. change
>>> package).
>>> >>>>>>>>> >
>>> >>>>>>>>> > We successfully use = the maven-shade-plugin in MyFaces CODI to
>>> >>>>>>>>> > reuse
>>> >>>>>>>>> > functionaltiy betwee= n the JSF 1.2 and 2.0 modules. In
>>> >>>>>>>>> > addition, I
>>> >have
>>> >>>>>>>>> > locally already used= it to fix MYFACESTEST-21: I use it to
>>> >>>>>>>>> > get the
>>> >>>>>>>>> > AbstractAttributeMap= and all its related classes from
>>> >>>>>>>>> > myfaces-impl
>>> to
>>> >>>>>>>>> > myfaces-test. And it= really works like a calm.
>>> >>>>>>>>> >
>>> >>>>>>>>> > However I have to be= honest, one thing currently has a bug:
>>> >>>>>>>>> > filters
>>> >>are
>>> >>>>>>>>> > only
>>> >>>>>>>>> > applied to the binar= y and not also to the sources jar (see
>>> >>>>>>>>> > http://jira.codehaus.or= g/browse/MSHADE-83), but I already
>>> >>>>>>>>> > provided a
>>> >>>>>>>>> > patch
>>> >>>>>>>>> > and a test case for = it, so I guess it will be fixed very
>>> >>>>>>>>> > soon.
>>> >>>>>>>>> >
>>> >>>>>>>>> > So if there are no o= bjects, I would like to introduce the
>>> >>>>>>>>> > maven-shade-plugin >>> >>>>>>>>> > on myfaces-test at f= irst, to show you guys how awesome it is.
>>> >>>>>>>>> > Afterwards,
>>> >>>>>>>>> > and of course if you= all like it, I would really like to use
>>> >>>>>>>>> > it on
>>> >>>>>>>>> > several
>>> >>>>>>>>> > places in MyFaces. T= his would for example be the chance to
>>> >>>>>>>>> > get rid
>>> of
>>> >>>>>>>>> > the
>>> >>>>>>>>> > shared project once = and for all.
>>> >>>>>>>>> >
>>> >>>>>>>>> > Opinions, suggestion= s and tomatoes are welcome!
>>> >>>>>>>>>
>>> >>>>>>>>> +1 on this approach. I= 9;d like to see the *adoption* (kinda)
>>> >>>>>>>>> documented, so that other= (sub) projects can *learn* from your
>>> efforts!
>>> >>>>>>>>>
>>> >>>>>>>>> RIP _shared? :)
>>> >>>>>>>>>
>>> >>>>>>>>> -Matthias
>>> >>>>>>>>>
>>> >>>>>>>>>
>>> >>>>>>>>> >
>>> >>>>>>>>> > Regards,
>>> >>>>>>>>> > Jakob
>>> >>>>>>>>> >
>>> >>>>>>>>> > --
>>> >>>>>>>>> > Jakob Korherr
>>> >>>>>>>>> >
>>> >>>>>>>>> > blog: http://www.jakobk.com
>>> >>>>>>>>> > twitter: http://twitter.com/jakob= korherr
>>> >>>>>>>>> > work: http://www.irian.at
>>> >>>>>>>>> >
>>> >>>>>>>>>
>>> >>>>>>>>>
>>> >>>>>>>>>
>>> >>>>>>>>> --
>>> >>>>>>>>> Matthias Wessendorf
>>> >>>>>>>>>
>>> >>>>>>>>> blog: http://matthiaswessendo= rf.wordpress.com/
>>> >>>>>>>>> sessions: http://www.slideshare.= net/mwessendorf
>>> >>>>>>>>> twitter: http://twitter.com/mwessendorf=
>>> >>>>>>>>
>>> >>>>>>>>
>>> >>>>>>>>
>>> >>>>>>>> --
>>> >>>>>>>> Jakob Korherr
>>> >>>>>>>>
>>> >>>>>>>> blog: http://www.jakobk.com
>>> >>>>>>>> twitter: http://twitter.com/jakobkorherr
>>> >>>>>>>> work:
http://www.irian.at
>>> >>>>>>>>
>>> >>>>>>>
>>> >>>>>>>
>>> >>>>>>>
>>> >>>>>>>--
>>> >>>>>>>
>>> >>>>>>>Matthias Wessendorf
>>> >>>>>>>
>>> >>>>>>>blog: http://matthiaswessendorf.wordpr= ess.com/
>>> >>>>>>>sessions: http://www.slideshare.net/mwess= endorf
>>> >>>>>>>twitter: http://twitter.com/mwessendorf
>>> >>>>>>>
>>> >>>>>>
>>> >>>>>
>>> >>>>>
>>> >>>>>--
>>> >>>>>
>>> >>>>>Jakob Korherr
>>> >>>>>
>>> >>>>>blog: http://www.jakobk.com
>>> >>>>>twitter: http://twitter.com/jakobkorherr
>>> >>>>>work: http://www.irian.at
>>> >>>>>
>>> >>>>
>>> >>>
>>> >>>
>>> >>>--
>>> >>>
>>> >>>Jakob Korherr
>>> >>>
>>> >>>blog: http://www.jakobk.com
>>> >>>twitter: http://twitter.com/jakobkorherr
>>> >>>work: http://www.irian.at
>>> >>>
>>> >>
>>> >
>>> >
>>> >--
>>> >Jakob Korherr
>>> >
>>> >blog: = http://www.jakobk.com
>>> >twitter: http://twitter.com/jakobkorherr
>>> >work: ht= tp://www.irian.at
>>> >
>>>
>>>
>>>
>>
>>
>>
>> --
>> Jakob Korherr
>>
>> blog: http://w= ww.jakobk.com
>> twitter: http://twitter.com/jakobkorherr
>> work: http://www= .irian.at
>
>



--

http://www.irian.at
Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces

--00163683359ac3e2f804948791de--