diff --git a/.travis.yml b/.travis.yml
index 283d06b..f41db62 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -10,11 +10,14 @@ cache:
directories:
- "$HOME/.m2/repository"
+before_install:
+ - gpg --fast-import gpg.asc
+
install:
- - echo "bintray\${env.BINTRAY_USER}\${env.BINTRAY_KEY}" > ~/.m2/settings.xml
+ - echo "ossrh\${env.SONATYPE_USER}\${env.SONATYPE_PASSWORD}" > ~/.m2/settings.xml
- if [[ $TRAVIS_PULL_REQUEST = false ]] && [[ $TRAVIS_BRANCH = master || $TRAVIS_BRANCH = dev-* ]] || [[ $TRAVIS_TAG = v* ]]; then GOAL=deploy; else GOAL=install; fi
- - if [[ $TRAVIS_TAG = v* ]]; then ADDITIONAL_PROFILES=release; mvn -q -U org.seedstack:seedstack-maven-plugin:release; else ADDITIONAL_PROFILES=snapshots; fi
+ - if [[ $TRAVIS_TAG = v* ]]; then ADDITIONAL_PROFILES=release; mvn -q -U org.seedstack:seedstack-maven-plugin:release; fi
-script: mvn -U -Pbuild-number,compatibility,bintray,quality,javadoc,$ADDITIONAL_PROFILES $GOAL jacoco:report
+script: mvn -U -Pbuild-number,compatibility,javadoc,quality,$ADDITIONAL_PROFILES $GOAL
after_success: mvn -q coveralls:report -DrepoToken=$COVERALLS_TOKEN
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7a29453..a0a20c9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,9 @@
+# Version 3.1.3 (2021-07-31)
+
+* [fix] Avoid calling `ensureIndexes()` and `ensureCaps()` for each datastore instantiation which adds a considerable
+ overhead in some circumstances. It is now done at application startup and can be controlled with
+ `mongoDb.morphia.ensureCapsAtStartup` and `mongoDb.morphia.ensureIndexesAtStartup` config options.
+
# Version 3.1.2 (2020-08-05)
* [chg] Updated for seed 3.10+
@@ -8,21 +14,24 @@
# Version 3.1.0 (2020-01-31)
-* [new] Morphia repository now has the ability to stream results from the database as consumed (using a cursor instead of a list behind the scenes).
+* [new] Morphia repository now has the ability to stream results from the database as consumed (using a cursor instead
+ of a list behind the scenes).
* [chg] Update the Morphia module to work with business framework 4.3.0+.
-* [chg] Updated Morphia to 1.5.8 (its package has changed to `dev.morphia`, update project code accordingly if necessary).
+* [chg] Updated Morphia to 1.5.8 (its package has changed to `dev.morphia`, update project code accordingly if
+ necessary).
# Version 3.0.2 (2019-01-10)
-* [fix] Fix issue #11: an exception occurred at startup because the way of accessing the ValidationFactory changed.
+* [fix] Fix issue #11: an exception occurred at startup because the way of accessing the ValidationFactory changed.
# Version 3.0.1 (2019-01-10)
-* [fix] During translation of composite specifications (or, and), set the field for each member (avoid "No field has been set" exception).
+* [fix] During translation of composite specifications (or, and), set the field for each member (avoid "No field has
+ been set" exception).
# Version 3.0.0 (2017-11-30)
-* [new] Implements automatic translation of business specifications to Morphia queries.
+* [new] Implements automatic translation of business specifications to Morphia queries.
# Version 2.0.0 (2017-01-13)
@@ -31,7 +40,8 @@
# Version 1.1.0 (2016-04-26)
* [new] Automatically build indexes
-* [new] Add Bean Validation support to Morphia (at pre-persist) when SeedStack validation add-on is present in the classpath.
+* [new] Add Bean Validation support to Morphia (at pre-persist) when SeedStack validation add-on is present in the
+ classpath.
* [new] Add `exists()` and `count()` in `BaseMorphiaRepository` according to change in business framework.
* [chg] Update for SeedStack 16.4.
* [brk] Remove `do*()` methods in `BaseMorphiaRepository` according to change in business framework.
diff --git a/checkstyle.xml b/checkstyle.xml
index 1fe5bc0..1636763 100644
--- a/checkstyle.xml
+++ b/checkstyle.xml
@@ -1,7 +1,7 @@