尝试使用 3.8.1 而不是 3.8.0 但得到消息:
[警告] org.apache.maven.plugins:maven-compiler-plugin:jar:3.8.1 的 POM 丢失,没有可用的依赖信息。
我的 pom.xml 在 3.8.0 上运行良好。除了一个特定的问题。我期待已久的 3.8.1。根据Maven Central,它似乎可用。但简单地在我的 pom.xml 中将 3.8.0 更改为 3.8.1 会导致警告和失败消息:
插件 org.apache.maven.plugins:maven-compiler-plugin:3.8.1 或其依赖项之一无法解析:Failure to find org.apache.maven.plugins:maven-compiler-plugin:jar:3.8.1在https://repo.maven.apache.org/maven2被缓存在本地存储库中,直到 central 的更新间隔已过或强制更新时才会重新尝试解析 -> [帮助 1]
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>11</source>
<target>11</target>
<debug>true</debug>
</configuration>
</plugin>
Run Code Online (Sandbox Code Playgroud)
我误解了什么,在 Maven Central 中看到 3.8.1 但不能在我的 pom.xml 中使用它?
小智 11
帮助我的是使用以下标签围绕插件:
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
</plugin>
</plugins>
</pluginManagement>
</build>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
6095 次 |
| 最近记录: |