[hibernate-dev] [OGM] Build time

Gunnar Morling gunnar at hibernate.org
Thu Nov 28 06:17:49 EST 2013


2013/11/28 Emmanuel Bernard <emmanuel at hibernate.org>

> On Thu 2013-11-28 10:45, Gunnar Morling wrote:
> > 2013/11/28 Emmanuel Bernard <emmanuel at hibernate.org>
> > > a. Provide a -Dminimal flag to run in case 1.
> > >
> >
> > You still would have to specify the backend you want to build, right? How
> > would such flag be used then?
>
> Not that would be to build all backends. That's use case #2.
>
> >
> > That's how I cover that case:
> >
> >     mvn clean install -pl {couchdb|mongodb|...}
> >
> > This is fast as there is no docs, dist etc. included in these modules. To
> > optionally also build core I do:
> >
> >     mvn clean install -pl {couchdb|mongodb|...} -am (for _a_lso _m_aking
> > dependencies)
> >
> > Would a custom flag improve upon this?
>
> This does cover case #1.
> My personal problem is 1. I can't remember that it's pl / am. And when I
> do, I can't remember what pl does vs am.
> I guess if maven had some autocompletion logic I might be less
> concerned.
>

You might give https://github.com/juven/maven-bash-completion a shot. I
just tried it but it gave me some error. Not sure why. Bash code is so
ugly... .

>
> >
> >
> > b. Provide a -Dcomplete flag to run in case 3.
> > >
> >
> > We might do that.
> >
> > One shortcoming in Maven is though that one - afaik - can't enable
> profiles
> > using several properties. So having -Dcomplete (or -DskipAllExpensive if
> we
> > want to default the other way around) would mean that we can't skip
> single
> > things specifically (e.g. only skip docs). If we're ok with loosing that
> > granular level of control we can try that.
>
> Ah, yes that sucks.
>
> >
> >
> > > c. Provide a script to do 2. I suspect case 2. can only be done with a
> > >    custom script or by moving to Gradle. For various reasons, I don't
> want
> > >    us to move to Gradle at this stage.
> > >
> >
> > How about
> >
> > d. Use an alias for all skip options:
> >
> > export mvnFast = "mvn -DskipITs -DskipDocs -DskipDistro"
> >
> > This gives a quick build in one command and still allows for fine
> > granularity if needed.
> >
>
> That's ok for case #2. But not #1.
>

Right. As said, #1 seems  to me best served by -pl {module}. I don't think
a custom option would be easier to memorize.


>
> >
> > > Everyone OK with doing a. and b.
> > > The problem with c. is that making a cross platform script requires
> time
> > > but we could make it work for us at least.
> > >
> > > Note that this leaves open what 'mvn clean install' should do.
> > >
> >
> > To me it should include everything by default (hence I'd prefer
> > -DskipAllExpensive over -Dcomplete) but if a majority of you guys prefer
> > another behavior I'd adapt.
> >
>
> The concern I have is someone cloning OGM and getting a BUILD FAILED in
> his face. That's not even mentioning the 2.3km of logs to dig into to
> figure out why.
>

"mvn clean install" shouldn't actually fail without further ado atm.

For MongoDB we use the embedded DB if no external host name is configured
and CouchDB is skipped altogether.

Davide and I discussed to still compile and package the module and only
omit the tests (but display a warning). That way one would get the "it
works" experience out of the box and we'd actually have included everything
by default except the Couch tests. On CI of course the host name is set so
the Couch tests run there.



>
> I guess I'll have to go for a custom script...
>


More information about the hibernate-dev mailing list