[hibernate-dev] [OGM] Build time

Davide D'Alto davide at hibernate.org
Thu Nov 28 05:31:53 EST 2013


> a. Provide a -Dminimal flag to run in case 1.
For the backends, I'm fine in using mvn -pl {module}

> b. Provide a -Dcomplete flag to run in case 3.
>> 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.
I'm ok with that, if we are using the complete flag we probably don't want
to exclude stuff.
Unless I'm missing something.

> export mvnFast = "mvn -DskipITs -DskipDocs -DskipDistro"

I don't have major preferences, I think a profile "fast" would be nice:
mvn -Pfast

but an alias is as good for me.

> Note that this leaves open what 'mvn clean install' should do.

I don't mind what we include (ideally everything) but it should
successfully build without additional steps.


On Thu, Nov 28, 2013 at 9:45 AM, Gunnar Morling <gunnar at hibernate.org>wrote:

> Answers inline.
>
> 2013/11/28 Emmanuel Bernard <emmanuel at hibernate.org>
>
> > My machine is in a poor state. But still, the default mvn install took
> > more than 7 minutes.
> > For info the minimal build takes 3:20 (4:30 with the integration tests).
> >
> > We have added a few mechanisms over time on OGM:
> >
> > * modules depending on an external DB are skipped if SOMEDB_HOSTNAME is
> >   not set
> >
> * skipDocs which skips documentation and JavaDocs (JavaDocs take a lot
> >   of time on my machine)
> > * skipITs which skips the integration tests
> > * skipDistro which skips the distribution
> >
> > While each individual mechanism serves a purpose, it ends up serving
> > everyone badly. Minimalarians complain about the myriad of flags to
> > write each time. Safarians complain that if they forget
> > COUCHDB_HOSTNAME, the distribution will simply not contain it.
> >
> > I think there are four main use cases
> >
> > 1. run the test suite for one specific db + rebuild core as things might
> >    have changed
> > 2. run the minimal test suite to make sure things compile and work
> > 3. run a full test on every backend and build the distribution for a
> >    release
> > 4. other cases
> >
> > I suspect the % of time per use case is as follow (your mileage may
> > vary):
> >
> > 1. 45%
> > 2. 45%
> > 3. 1%
> > 4. 9%
> >
> > But when you are in case 3. you absolutely must be sure everything run
> > and no module is skipped.
> >
> > Here is a proposal
> >
> > 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?
>
> 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?
>
>
> 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.
>
>
> > 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.
>
>
> > 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.
>
>
> >
> > Thoughts?
> >
> > Emmanuel
> > _______________________________________________
> > 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