Vì vậy, tôi đang cố gắng sử dụng phiên bản mới nhất của một số plugin. Trước đó tôi đã sử dụng thẻ điều kiện tiên quyết nhưng rất nhiều tài nguyên (example) nói rằng nó nên được coi là không được dùng nữa và thay vào đó, plugin maven-enforcer-được sử dụng. đây là cấu hình của tôi:phiên bản: display-plugin-updates không hiểu maven-enforcer-plugin
<plugin>
<inherited>true</inherited>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>1.3.1</version>
<executions>
<execution>
<id>enforce-maven-3</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireMavenVersion>
<version>3.0.4</version>
</requireMavenVersion>
</rules>
<fail>true</fail>
</configuration>
</execution>
</executions>
</plugin>
Tuy nhiên, khi tôi chạy phiên bản mvn: hiển thị-plugin cập nhật tôi vẫn nhận được văn bản này:
[ERROR] Project does not define required minimum version of Maven.
[ERROR] Update the pom.xml to contain
[ERROR] <prerequisites>
[ERROR] <maven>3.0</maven>
[ERROR] </prerequisites>
[INFO]
[INFO] Require Maven 2.0.6 to use the following plugin updates:
[INFO] maven-jar-plugin ................................................ 2.4
[INFO] maven-shade-plugin ............................................ 1.7.1
[INFO]
[INFO] Require Maven 2.2.1 to use the following plugin updates:
[INFO] maven-jar-plugin ................................................ 2.6
[INFO]
[INFO] Require Maven 3.0 to use the following plugin updates:
[INFO] maven-shade-plugin .............................................. 2.3
Sử dụng điều kiện tiên quyết-tag thay vì hoạt động.
https://jira.codehaus.org/browse/MVERSIONS-272. –
Bạn sử dụng phiên bản Maven nào? – khmarbaise
3.3.1 Có vẻ như Aleksandr M là hoàn toàn tại chỗ trên – Richo