Skip to content

Commit 8279bf3

Browse files
Update maven workflows to use maven wrapper and add javadoc validation (#385)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: thomasturrell <1552612+thomasturrell@users.noreply.github.com>
1 parent ae6f276 commit 8279bf3

4 files changed

Lines changed: 6 additions & 77 deletions

File tree

.github/workflows/maven-publish-snapshot.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.

.github/workflows/maven-publish.yml

Lines changed: 0 additions & 41 deletions
This file was deleted.

.github/workflows/maven_pull_request.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,14 @@ jobs:
1919
distribution: "temurin"
2020
cache: maven
2121
- name: Build with Maven
22-
run: mvn -B verify --file pom.xml
22+
run: ./mvnw -B install
23+
- name: Check documentation
24+
run: ./mvnw -B javadoc:javadoc -pl xapi-model,xapi-client,xapi-model-spring-boot-starter -am # This checks that the Javadoc is valid
2325
- name: Scan with Sonar
2426
run: |
2527
if [ $FORK = false ] && [ "$ACTOR" != "dependabot[bot]" ]
2628
then
27-
mvn org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=BerryCloud_xapi-java -Dsonar.organization=berrycloud --file pom.xml
29+
./mvnw org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=BerryCloud_xapi-java -Dsonar.organization=berrycloud
2830
fi
2931
env:
3032
FORK: ${{ github.event.pull_request.head.repo.fork }}

.github/workflows/maven_push.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ jobs:
1919
distribution: "temurin"
2020
cache: maven
2121
- name: Build with Maven
22-
run: mvn -B verify --file pom.xml
22+
run: ./mvnw -B verify
2323
- name: Scan with Sonar
24-
run: mvn org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=BerryCloud_xapi-java -Dsonar.organization=berrycloud --file pom.xml
24+
run: ./mvnw org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=BerryCloud_xapi-java -Dsonar.organization=berrycloud
2525
env:
2626
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
2727
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

0 commit comments

Comments
 (0)