警告org.apache.maven.plugins的’build.plugins.plugin.version’:缺少maven-deploy-plugin
我成功地将我的Maven工件部署到Central Repository。 但是,当我运行mvn release:perform
时,我看到了这个警告mvn release:perform
:
[INFO] Invoking perform goals in directory /Users/miguelvelez/Documents/Programming/Java/Projects/messages/target/checkout [INFO] Executing goals 'deploy'... [WARNING] Maven will be executed in interactive mode, but no input stream has been configured for this MavenInvoker instance. [INFO] [WARNING] [INFO] [WARNING] Some problems were encountered while building the effective settings [INFO] [WARNING] Unrecognised tag: 'activateByDefault' (position: START_TAG seen ...\n ... @261:32) @ /usr/bin/apache-maven-3.3.9/conf/settings.xml, line 261, column 32 [INFO] [WARNING] [INFO] [INFO] Scanning for projects... [INFO] [WARNING] [INFO] [WARNING] Some problems were encountered while building the effective model for com.mijecu25:messages:jar:1.0.0 [INFO] [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-deploy-plugin is missing. [INFO] [WARNING] [INFO] [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build. [INFO] [WARNING] [INFO] [WARNING] For this reason, future Maven versions might no longer support building such malformed projects. [INFO] [WARNING]
警告已经解决。 但我不确定丢失的插件。
这是我的POM.xml:
4.0.0 com.mijecu25 messages 1.0.1-SNAPSHOT messages Library with messages for debugging https://github.com/mijecu25/messages 2016 Mijecu25 http://www.mijecu25.com MIT License http://www.opensource.org/licenses/mit-license.php UTF-8 scm:git:git://github.com/mijecu25/messages.git scm:git:git@github.com:mijecu25/messages.git https://github.com/mijecu25/messages HEAD miguelvelezmj25 Miguel Velez miguelvelez@mijecu25.com http://www.mijecu25.com/miguelvelez/ developer sonatype-nexus-snapshots Sonatype Nexus snapshot repository https://oss.sonatype.org/content/repositories/snapshots sonatype-nexus-staging Sonatype Nexus release repository https://oss.sonatype.org/service/local/staging/deploy/maven2/ release performRelease true org.apache.maven.plugins maven-gpg-plugin 1.5 ${gpg.passphrase} sign-artifacts verify sign org.apache.maven.plugins maven-source-plugin 2.2.1 attach-sources jar-no-fork org.apache.maven.plugins maven-javadoc-plugin 2.9.1 attach-javadocs jar junit junit 4.12 test org.apache.maven.plugins maven-compiler-plugin 3.3 1.7 1.7 UTF-8 org.codehaus.mojo cobertura-maven-plugin 2.7 xml 256m true org.eluder.coveralls coveralls-maven-plugin 4.1.0 UTF-8 ${env.coveralls_repo_token} org.apache.maven.plugins maven-release-plugin 2.5 true true release deploy maven-jar-plugin 2.5 false true
如您所见,我没有使用maven-deploy-plugin
。 你知道这个警告意味着什么吗?
编辑:在评论中,有人建议我修复settings.xml
文件中的错误。 这是我这样做后的新输出:
[WARNING] Maven will be executed in interactive mode, but no input stream has been configured for this MavenInvoker instance. [INFO] [INFO] Scanning for projects... [INFO] [WARNING] [INFO] [WARNING] Some problems were encountered while building the effective model for com.mijecu25:messages:jar:1.0.1 [INFO] [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-deploy-plugin is missing. [INFO] [WARNING] [INFO] [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build. [INFO] [WARNING] [INFO] [WARNING] For this reason, future Maven versions might no longer support building such malformed projects. [INFO] [WARNING]
还有什么想法?
谢谢!