зеркало из https://github.com/github/docs.git
Update building-and-testing-java-with-maven.md (#1609)
Co-authored-by: Lucas Costi <lucascosti@users.noreply.github.com>
This commit is contained in:
Родитель
18ff3cf474
Коммит
dee836bbd0
|
@ -53,7 +53,7 @@ jobs:
|
|||
with:
|
||||
java-version: 1.8
|
||||
- name: Build with Maven
|
||||
run: mvn -B package --file pom.xml
|
||||
run: mvn --batch-mode --update-snapshots verify
|
||||
```
|
||||
{% endraw %}
|
||||
|
||||
|
@ -85,7 +85,7 @@ steps:
|
|||
with:
|
||||
java-version: 1.8
|
||||
- name: Run the Maven verify phase
|
||||
run: mvn -B verify --file pom-ci.xml
|
||||
run: mvn --batch-mode --update-snapshots verify
|
||||
```
|
||||
{% endraw %}
|
||||
|
||||
|
@ -108,7 +108,7 @@ steps:
|
|||
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
|
||||
restore-keys: ${{ runner.os }}-m2
|
||||
- name: Build with Maven
|
||||
run: mvn -B package --file pom.xml
|
||||
run: mvn --batch-mode --update-snapshots verify
|
||||
```
|
||||
{% endraw %}
|
||||
|
||||
|
@ -125,7 +125,7 @@ Maven will usually create output files like JARs, EARs, or WARs in the `target`
|
|||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-java@v1
|
||||
- run: mvn -B package --file pom.xml
|
||||
- run: mvn --batch-mode --update-snapshots verify
|
||||
- run: mkdir staging && cp target/*.jar staging
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
|
|
|
@ -84,7 +84,7 @@ jobs:
|
|||
server-username: MAVEN_USERNAME
|
||||
server-password: MAVEN_PASSWORD
|
||||
- name: Publish package
|
||||
run: mvn -B deploy
|
||||
run: mvn --batch-mode deploy
|
||||
env:
|
||||
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
|
||||
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
|
||||
|
@ -143,7 +143,7 @@ jobs:
|
|||
with:
|
||||
java-version: 1.8
|
||||
- name: Publish package
|
||||
run: mvn -B deploy
|
||||
run: mvn --batch-mode deploy
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
```
|
||||
|
@ -182,7 +182,7 @@ jobs:
|
|||
server-username: MAVEN_USERNAME
|
||||
server-password: MAVEN_PASSWORD
|
||||
- name: Publish to the Maven Central Repository
|
||||
run: mvn -B deploy
|
||||
run: mvn --batch-mode deploy
|
||||
env:
|
||||
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
|
||||
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
|
||||
|
@ -191,7 +191,7 @@ jobs:
|
|||
with:
|
||||
java-version: 1.8
|
||||
- name: Publish to GitHub Packages
|
||||
run: mvn -B deploy
|
||||
run: mvn --batch-mode deploy
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
```
|
||||
|
|
|
@ -1 +1 @@
|
|||
Runs the `mvn -B deploy` command to publish to the `ossrh` repository. The `MAVEN_USERNAME` environment variable will be set with the contents of your `OSSRH_USERNAME` secret, and the `MAVEN_PASSWORD` environment variable will be set with the contents of your `OSSRH_TOKEN` secret.
|
||||
Runs the `mvn --batch-mode deploy` command to publish to the `ossrh` repository. The `MAVEN_USERNAME` environment variable will be set with the contents of your `OSSRH_USERNAME` secret, and the `MAVEN_PASSWORD` environment variable will be set with the contents of your `OSSRH_TOKEN` secret.
|
||||
|
|
|
@ -1 +1 @@
|
|||
Runs the `mvn -B deploy` command to publish to {% data variables.product.prodname_registry %}. The `GITHUB_TOKEN` environment variable will be set with the contents of the `GITHUB_TOKEN` secret.
|
||||
Runs the `mvn --batch-mode deploy` command to publish to {% data variables.product.prodname_registry %}. The `GITHUB_TOKEN` environment variable will be set with the contents of the `GITHUB_TOKEN` secret.
|
||||
|
|
Загрузка…
Ссылка в новой задаче