You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: user/languages/java.md
+9-10Lines changed: 9 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,9 @@
1
1
---
2
-
title: Building a Java project
2
+
title: Build a Java project
3
3
layout: en
4
4
5
5
---
6
6
7
-
### What This Guide Covers
8
7
9
8
<asidemarkdown="block"class="ataglance">
10
9
@@ -32,7 +31,7 @@ new to Travis CI, please read our [Onboarding](/user/onboarding/) and
32
31
## Overview
33
32
34
33
The Travis CI environment contains various versions of OpenJDK,
35
-
Gradle, Maven and Ant.
34
+
Gradle, Maven, and Ant.
36
35
37
36
To use the Java environment, add the following to your `.travis.yml`:
38
37
@@ -41,7 +40,7 @@ language: java
41
40
```
42
41
{: data-file=".travis.yml"}
43
42
44
-
## Projects Using Maven
43
+
## Maven Projects
45
44
46
45
### Maven Dependency Management
47
46
@@ -83,7 +82,7 @@ Travis CI uses that instead:
83
82
84
83
To use a different `script` command, customize the [build step](/user/job-lifecycle/#customizing-the-build-phase).
85
84
86
-
## Projects Using Gradle
85
+
## Gradle Projects
87
86
88
87
### Gradle Dependency Management
89
88
@@ -138,7 +137,7 @@ cache:
138
137
139
138
> Note that if you use Gradle with `sudo` (i.e. `sudo ./gradlew assemble`), the caching configuration above will have no effect, since the depencencies will be in `/root/.gradle` which the `travis` user account does not have write access to.
140
139
141
-
## Projects Using Ant
140
+
## Ant Projects
142
141
143
142
### Ant Dependency Management
144
143
@@ -162,7 +161,7 @@ ant test
162
161
163
162
To use a different `script` command, customize the [build step](/user/job-lifecycle/#customizing-the-build-phase).
164
163
165
-
### Using Ant on Ubuntu Xenial (16.04)
164
+
### Use Ant on Ubuntu Xenial (16.04)
166
165
167
166
Unfortunately, `ant` currently doesn't come pre-installed on our Xenial image. You'll need to install it manually by adding the following recipe to your .travis.yml file:
168
167
@@ -188,7 +187,7 @@ The list of available JVMs for different dists are at
188
187
* [JDKs installed for **Trusty**](/user/reference/trusty/#jvm-clojure-groovy-java-scala-images)
189
188
* [JDKs installed for **Precise**](/user/reference/precise/#jvm-clojure-groovy-java-scala-vm-images)
190
189
191
-
### Switching JDKs (Java 8 and below) Within One Job
190
+
### Switch JDKs (Java 8 and lower) within one Job
192
191
193
192
If your build needs to switch JDKs (Java 8 and below) during a job, you can do so with
Use of `jdk_switcher` also updates `$JAVA_HOME` appropriately.
204
203
205
-
## Using Java 10 and later
204
+
## Use Java 10 and higher
206
205
207
206
> Take note that `oraclejdk10` is EOL since October 2018 and as such it's not supported anymore on Travis CI.
208
207
> See [https://www.oracle.com/technetwork/java/javase/eol-135779.html](https://www.oracle.com/technetwork/java/javase/eol-135779.html){: data-proofer-ignore=""}.
209
208
>
210
209
> `openjdk` is now the default jdk available on our VMs as `install-jdk` no longer installs `oraclejdk`. Please see this [Github Issue](https://github.com/sormuras/bach/issues/56) for context.
211
210
212
-
### Switching JDKs (to Java 10 and up) Within One Job
211
+
### Switch JDKs (to Java 10 and higher) within one Job
213
212
214
213
If your build needs to switch JDKs (Java 10 and up) during a job, you can do so with
0 commit comments