Skip to content

Commit

Permalink
chore: Fix maven build
Browse files Browse the repository at this point in the history
  • Loading branch information
hypery2k committed Nov 5, 2024
1 parent 83179a7 commit b2c6b59
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 28 deletions.
35 changes: 33 additions & 2 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,25 @@
name: Build

env:
# https://github.com/actions/virtual-environments/issues/1499
MAVEN_CLI_OPTS: '-ntp --batch-mode --errors --fail-at-end --show-version -Dmaven.wagon.httpconnectionManager.ttlSeconds=60 -Dmaven.wagon.http.retryHandler.count=3 -Dstyle.color=always'

on: [push]
on:
# allow to manual run the action
workflow_dispatch: {}
pull_request: {}
merge_group: {}
push:
branches:
- develop
tags:
- '*'

permissions:
contents: write
# For junit report
checks: write
pull-requests: write

jobs:
build:
Expand All @@ -18,5 +36,18 @@ jobs:

- name: Build with Maven
run: |
./mvnw clean verify -U
./mvnw ${MAVEN_CLI_OPTS} clean verify
./mvnw javadoc:javadoc
- name: Publish Test Report
uses: mikepenz/action-junit-report@v4
if: success() || failure() # always run even if the previous step fails
with:
report_paths: '**/target/*-reports/TEST-*.xml'

- name: Upload coverage to Codecov
uses: codecov/[email protected]
with:
file: "${{ github.workspace }}/spi/target/jacoco.xml"
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: ${{ !startsWith(github.event.ref, 'refs/tags/v') }}
26 changes: 0 additions & 26 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -247,32 +247,6 @@
</distributionManagement>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>${maven-source-plugin.version}</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${maven-javadoc-plugin.version}</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-release-plugin</artifactId>
<version>3.1.1</version>
Expand Down

0 comments on commit b2c6b59

Please sign in to comment.