Skip to content

Commit

Permalink
chore: maven-compiler-plugin固定版本以去除警告,并增加构建稳定性
Browse files Browse the repository at this point in the history
```
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.github.pagehelper:pagehelper:jar:6.0.0
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 223, column 29
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
```

应使用pluginManagement来固定版本,且可减少重复配置
  • Loading branch information
qxo committed Nov 10, 2023
1 parent cceb2e7 commit e76d96b
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,20 @@
</dependency>
-->
</dependencies>

<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
<configuration>
<source>8</source>
<target>8</target>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<profiles>
<profile>
<id>dev</id>
Expand All @@ -205,10 +218,6 @@
<!--Compiler-->
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>8</source>
<target>8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand All @@ -230,10 +239,6 @@
<!--Compiler-->
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>8</source>
<target>8</target>
</configuration>
</plugin>
<!-- Source -->
<plugin>
Expand Down

0 comments on commit e76d96b

Please sign in to comment.