Improve Maven build and GitHub Maven workflow (#2079)

* Fix consecutive Maven builds failing without performing `clean`

By default moditect-maven-plugin refuses to overwrite the JAR file it
generated in a previous run.

* Make GitHub Maven build workflow detect Javadoc issues
This commit is contained in:
Marcono1234 2022-02-16 21:51:08 +01:00 committed by GitHub
parent a0b102c7ff
commit d19e9fe0af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -15,4 +15,5 @@ jobs:
java-version: '11'
cache: 'maven'
- name: Build with Maven
run: mvn --batch-mode --update-snapshots verify
# This also runs javadoc:javadoc to detect any issues with the Javadoc
run: mvn --batch-mode --update-snapshots verify javadoc:javadoc

View File

@ -86,6 +86,8 @@
<module>
<moduleInfoFile>${project.build.sourceDirectory}/module-info.java</moduleInfoFile>
</module>
<!-- Overwrite the previously generated JAR file, if any -->
<overwriteExistingFiles>true</overwriteExistingFiles>
</configuration>
</execution>
</executions>