Hi,

>From a pure JSF point of view, you could also add a
WEB-INF/faces-config.xml file in your project that redefine all OmniFaces
artifact that are annotated. It's a super poor man solution/ugly hack as
you might have to alter the file with every OmniFaces releases, but would
allow you to have the OmniFaces JAR in the EAR while still have everything
it provides available. I agree with Antonio's suggestion to ask for a
library split within OmniFaces as a more future-proof solution.


Regards,


On Thu, Feb 27, 2014 at 5:31 PM, Antonio Petrelli <
antonio.petre...@gmail.com> wrote:

> 2014-02-27 17:26 GMT+01:00 Martin Hoeller <mar...@xss.co.at>:
>
> > On 27 Feb 2014, Antonio Petrelli wrote:
> >
> > > 2014-02-27 17:14 GMT+01:00 Martin Hoeller <mar...@xss.co.at>:
> > >
> > > > On 27 Feb 2014, Antonio Petrelli wrote:
> > > >
> > > > > 2014-02-27 17:05 GMT+01:00 Martin Hoeller <mar...@xss.co.at>:
> > > > >
> > > > > > I have another concrete example with a single WAR where OmniFaces
> > is a
> > > > > > dependency by the WAR and by some EJB JAR, both contained in the
> > EAR.
> > > > The
> > > > > > OmniFaces JAR goes in the EARs lib folder and thus OmniFaces ist
> > not
> > > > > > fully usable without workarounds. See also my question on
> > > > StackOverflow:
> > > > > >
> > > > > >
> > > >
> >
> http://stackoverflow.com/questions/22046464/how-to-correctly-use-omnifaces-in-an-ear
> > > > > >
> > > > > >
> > > > > Hi,
> > > > > the real question is: why do you want to use a JSF-specific library
> > > > inside
> > > > > an EJB?
> > > >
> > > > OmniFaces is a JSF library but not UI component focused like
> RichFaces.
> > > > It hast some really nice classes like BeanManager that could be
> useful
> > > > outside a JSF application.
> > > >
> > >
> > > If it's really BeanManager or few classes that you need, I suggest to
> use
> > > the Shade plugin, to create an artifact with one (or few) classes,
> > possibly
> > > moved to another package:
> > >
> >
> http://maven.apache.org/plugins/maven-shade-plugin/examples/class-relocation.html
> >
> > I was already thinking of this :)
> >
> > However, I felt like there would be something wrong with this approach,
> as
> > I usually just need to declare a dependency when I want to use a library.
> > Not repackage it and include the classes twice in the EAR.
> >
>
> In fact what I proposed is a workaround. Probably you could collaborate
> with OmniFaces to split the library into a "common" jar and a JSF-specific
> jar, so that the common can be safely put in the EAR.
>
> Antonio
>



-- 
*Simon Lessard*, ADF Architect
*CMA* *SYSTeMS*
*( +33(0) 6 79 37 39 85 (France)*

Reply via email to