Skip to content

Commit

Permalink
Use maven-enforcer-plugin to enforce build-time requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
A248 committed Feb 5, 2021
1 parent d9bb41f commit b8aea50
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,40 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.0.0-M3</version>
<executions>
<execution>
<id>enforce-rules</id>
<goals>
<goal>enforce</goal>
</goals>
</execution>
</executions>
<configuration>
<rules>
<requireJavaVersion>
<version>15.0.1</version>
<message>
While this library maintains compatibility with Java 8,
it requires JDK 15 as a build-time requirement, because
of the need to conditionally access newer APIs as well as
javadoc limitations on older versions.
</message>
</requireJavaVersion>
<requireNoRepositories>
<message>Third-party repositories are not allowed</message>
</requireNoRepositories>
<requireReleaseDeps>
<message>No snapshot dependencies are allowed</message>
<!-- Prevent false positives on self-dependencies -->
<onlyWhenRelease>true</onlyWhenRelease>
</requireReleaseDeps>
</rules>
</configuration>
</plugin>
</plugins>
<pluginManagement>
<plugins>
Expand Down

0 comments on commit b8aea50

Please sign in to comment.