Hi Take a look at:
http://markmail.org/message/xqxdydmpeeb2icq5?q=Use+maven-shade-plugin+to+prevent+duplicate+code+list:org.apache.myfaces.dev&page=1 If you want to use some code inside shared into some modules, you should use maven-shade-plugin and relocate the package name of the classes involved. Code inside org.apache.myfaces.shared or shared_impl was not meant to be used outside myfaces core. That's the reason why there is a module that changes the package name for tomahawk, orchestra and other projects. But note shared code is considered stable, so I don't see any problem to use one specific version of shared into your code because I suppose you are only using some jsf utility stuff. Also please note each time myfaces core is released, shared project is released too, so people using that stuff can use it with maven-shade-plugin or an ant task renaming packages. The plan for 2.0.12 / 2.1.6 is review shared stuff and do a full cleanup. There is a proposal here: http://svn.apache.org/repos/asf/myfaces/core/branches/2.0.x_refactor_shade_duplicate/ The idea is have a independent release lifecycle for myfaces core "shared" module and replace the old ant task used to rename packages with maven-shade-plugin. Note the points of integration with application servers are listed here: https://cwiki.apache.org/confluence/display/MYFACES/Integration+with+application+and+web+servers In the future, the intention is create a module grouping these stuff into a single package. That package will be a "implementation specific api", so code there will preserve binary compatibility between minor versions and only will be changed on spec changes (for example 2.1 --> 2.2). Note this is just some ideas I have and it needs some discussion under this list. regards, Leonardo Uribe 2011/11/30 Paul Nicolucci <[email protected]>: > > Hello Everyone, > > I wanted to find out some information about MyFaces-3247, specifically why > the classes were moved from org.apache.myfaces.shared_impl to > org.apache.myfaces.shared. > > In WebSphere Application Server we have our own LifecycleProviderFactory > and AnnotationProviders that use classes in the myfaces.shared_impl > package, this is fine unless we have a customer who uses an implementation > other > than the one that we ship with WAS, any implementation at or after 2.0.8 > has the new org.apache.myfaces.shared package and we run into a > ClassNotFound exception. > > Could you provide some background on why this was changed? It seems to be > a large change that touches many many files that could have been safer to > make at a version boundary such as 2.1.x. Our concern is that > we now need to figure out a way to have multiple versions of our > AnnotationProviders that use these shared classes, so that we can offer our > customers the ability to use any version of MyFaces 2.0.x with their > application if they wish to. > For instance we recently gave our WAS version 7 customers the ability to > use MyFaces 2.0 ( any version which they please ) in an isolated shared > library, again we'll need to use different annotation providers for < 2.0.8 > and >=2.0.8. > > Would any thought be given to backing this out? Or is it too late not since > it has been changed since 2.0.8 of MyFaces? Either way if some information > on the reasoning behind this change can be given that would help me > greatly. > > Thanks for the information! > > Regards, > > Paul Nicolucci > >
