[hibernate-dev] [jdf-dev] JBoss Modules dependency vs pain POM dependency + exclusions

Emmanuel Bernard emmanuel at hibernate.org
Thu Jun 6 11:41:26 EDT 2013


As I explain in the email I forwarded, modules are good on paper but
suffer from a few practical problems:

I need to manually install them on my deployed server instead of just
handing over the JAR. If there was a way to declare a dep from
 jboss-deployment-structure.xml and get it downloaded from somewhere
(including from my WAR as a local copy), then some of my problems would
be solved. In particular the fact that I might forget to install a
module in one of my runtimes.

Of course modules are JBoss specific so it's a pain to make my
application portable across several app servers.

And finally JBoss modules dependencies are not seen by Maven / Eclipse.
So I have to artificially add Hibernate Search into my pom as provided
even if I have already declared this dependency else where.

I don't call this experience significantly better. It's just different.

Emmanuel

On Thu 2013-06-06 15:55, Sanne Grinovero wrote:
> are you proposing to remove Hibernate as a Maven dependency? I don't think
> that's correct.
> 
> I like the modules approach much better because it has several other
> benefits, not least that it doesn't push all our dependencies to the
> application classpath, and also makes the deployment smaller.
> 
> Did you not try the modules? Ultimately I think it should be the encouraged
> deployment mode, possibly the only supported one for wildfly.
> On 6 Jun 2013 13:47, "Ales Justin" <ales.justin at gmail.com> wrote:
> 
> > Next time ping me for any issues, as I've done this ages ago for
> > CapeDwarf. :-)
> >
> > On Jun 6, 2013, at 1:37 PM, Emmanuel Bernard <emmanuel at hibernate.org>
> > wrote:
> >
> > > Below is an email describing the issues i had to get Hibernate Search
> > run in WildFly / EAP. A possibility to make life easier for Hibernate
> > Search users in WildFly is as described by Pete to create a
> > hibernate-search-orm-wildfly which marks Hibernate ORM as provided.
> > >
> > > What do you think?
> > >
> > > Emmanuel
> > >
> > > Begin forwarded message:
> > >
> > >> From: Pete Muir <pmuir at redhat.com>
> > >> Date: 6 juin 2013 11:21:13 UTC+02:00
> > >> To: Emmanuel Bernard <emmanuel at hibernate.org>
> > >> Cc: jdf-dev at lists.jboss.org
> > >> Subject: Re: [jdf-dev] JBoss Modules dependency vs pain POM dependency
> > + exclusions
> > >>
> > >> Hey Emmanuel,
> > >>
> > >> On 5 Jun 2013, at 19:25, Emmanuel Bernard <emmanuel at hibernate.org>
> > wrote:
> > >>
> > >>> The Hibernate Search enabled version of TicketMonster relies on
> > >>> Hibernate Search 4.3 which itself has a dependency on Hibernate ORM
> > >>> included in WildFly and JBoss EAP.
> > >>>
> > >>> My first approach was to ask the user to add the Hibernate Search JBoss
> > >>> Module manually into their EAP / WildFly distribution and have it
> > >>> referenced in jboss-deployment-structure.xml.
> > >>> I also had to put Hibernate Search in my POM as provided because the
> > BOM
> > >>> references an older version of Hibernate Search.
> > >>
> > >> We should be targeting the version of HSearch that is in WFK. If the
> > BOM is out of date (highly possible), then please either send a pull to
> > update it or ask Rafael to do so. He or I can do a you a release very
> > quickly once the change is in.
> > >>
> > >>>
> > >>> To avoid the manual step, I tried to list Hibernate Search explicitly
> > in
> > >>> the POM as regular scope and no longer use
> > >>> jboss-deployment-structure.xml. But then I have to play with exclusions
> > >>> which is not too nice either.
> > >>>
> > >>> Which approach is better suited for TicketMonster? And is there a
> > better
> > >>> way?
> > >>
> > >> Fix the HSearch POM so that it marks as optional or provided stuff that
> > you are excluding would be one way. If you don't want to do this, then
> > another option would be to produce a HSearch-for-WF pom as part of HSearch
> > that does it.
> > >>
> > >> In general, it's better to not make the user fiddle with exclusions,
> > and instead do it in the framework itself.
> > >>
> > >>>
> > >>> Here is the commit that moves from a module dependency to plain pom.xml
> > >>>
> > https://github.com/emmanuelbernard/ticket-monster/commit/9da10a15921367d074783711a5692297e02318b6
> > >>>
> > >>> Emmanuel
> > >>> _______________________________________________
> > >>> jdf-dev mailing list
> > >>> jdf-dev at lists.jboss.org
> > >>> https://lists.jboss.org/mailman/listinfo/jdf-dev
> > >>
> > > _______________________________________________
> > > hibernate-dev mailing list
> > > hibernate-dev at lists.jboss.org
> > > https://lists.jboss.org/mailman/listinfo/hibernate-dev
> >
> >
> > _______________________________________________
> > hibernate-dev mailing list
> > hibernate-dev at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/hibernate-dev
> >


More information about the hibernate-dev mailing list