[COMPRESS-413] Travis build redundantly repeats compilation and tests
redundantly #43. Patch applied except removal of Oracle 7 and 8 from
Travis build. Closes #43.
diff --git a/.travis.yml b/.travis.yml
index 508d7e4..dfeca93 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -13,17 +13,28 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-language: java
 sudo: false
+# Use Trusty as dist
+dist: trusty
+language: java
+
 
 jdk:
   - openjdk7
+  - openjdk8
   - oraclejdk7
   - oraclejdk8
+  - oraclejdk9
 
 cache:
   directories:
     - $HOME/.m2
+    - .mvn
+# don't run mvn install before building
+install: true
 
-after_success:
-  - mvn clean apache-rat:check test jacoco:report coveralls:report -Ptravis-jacoco
+# do all the building and testing in a single phase, instead of compiling everything three times
+# and running all tests twice.
+
+script:
+   - ./mvnw clean apache-rat:check test jacoco:report coveralls:report -Ptravis-jacoco