Skip to content

Commit

Permalink
enforce maven.compiler.source and maven.compiler.target not starting
Browse files Browse the repository at this point in the history
with "1."
  • Loading branch information
kwin committed Jan 15, 2024
1 parent 413220e commit fcd579f
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,26 @@ under the License.
</rules>
</configuration>
</execution>
<execution>
<id>enforce-maven.compiler.target-version</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireProperty>
<property>maven.compiler.target</property>
<regex>(?!1\.).*</regex>
<regexMessage>The value of property maven.compiler.target must not start with "1.", use for example "8" instead of "1.8"!</regexMessage>
</requireProperty>
<requireProperty>
<property>maven.compiler.source</property>
<regex>(?!1\.).*</regex>
<regexMessage>The value of property maven.compiler.source must not start with "1.", use for example "8" instead of "1.8"!</regexMessage>
</requireProperty>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
Expand Down

0 comments on commit fcd579f

Please sign in to comment.