警告org.apache.maven.plugins的'build.plugins.plugin.version':缺少maven-deploy-plugin [英] WARNING 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-deploy-plugin is missing

查看:600
本文介绍了警告org.apache.maven.plugins的'build.plugins.plugin.version':缺少maven-deploy-plugin的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我成功地将Maven工件部署到了中央存储库.但是,我在运行mvn release:perform时看到了此警告:

I successfully deployed my Maven artifact to the Central Repository. However, I saw this warning when I ran 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 ...<activation>\n            <activateByDefault>... @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] 

<activateByDefault>警告已解决.但是我不确定缺少的插件.

The <activateByDefault> warning has been solved. But I am not sure about the missing plugin.

这是我的POM.xml:

Here is my POM.xml:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

    <groupId>com.mijecu25</groupId>
    <artifactId>messages</artifactId>
    <version>1.0.1-SNAPSHOT</version>
    <name>messages</name>
    <description>Library with messages for debugging</description>
    <url>https://github.com/mijecu25/messages</url>
    <inceptionYear>2016</inceptionYear>
    <organization>
        <name>Mijecu25</name>
        <url>http://www.mijecu25.com</url>
    </organization>

    <licenses>
        <license>
            <name>MIT License</name>
            <url>http://www.opensource.org/licenses/mit-license.php</url>
        </license>
    </licenses>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <scm>
        <connection>scm:git:git://github.com/mijecu25/messages.git</connection>
        <developerConnection>scm:git:git@github.com:mijecu25/messages.git</developerConnection>
        <url>https://github.com/mijecu25/messages</url>
        <tag>HEAD</tag>
    </scm>

    <developers>
        <developer>
            <id>miguelvelezmj25</id>
            <name>Miguel Velez</name>
            <email>miguelvelez@mijecu25.com</email>
            <url>http://www.mijecu25.com/miguelvelez/</url>
            <roles>
                <role>developer</role>
            </roles>
        </developer>
    </developers>

    <distributionManagement>
        <snapshotRepository>
            <id>sonatype-nexus-snapshots</id>
            <name>Sonatype Nexus snapshot repository</name>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>

        <repository>
            <id>sonatype-nexus-staging</id>
            <name>Sonatype Nexus release repository</name>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>  

    <profiles>
        <profile>
            <id>release</id>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.5</version>
                        <configuration>
                            <passphrase>${gpg.passphrase}</passphrase>
                        </configuration>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>2.2.1</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>2.9.1</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.3</version>
                <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>cobertura-maven-plugin</artifactId>
                <version>2.7</version>
                <configuration>
                    <format>xml</format>
                    <maxmem>256m</maxmem>
                    <aggregate>true</aggregate>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.eluder.coveralls</groupId>
                <artifactId>coveralls-maven-plugin</artifactId>
                <version>4.1.0</version>
                <configuration>
                    <sourceEncoding>UTF-8</sourceEncoding>
                    <repoToken>${env.coveralls_repo_token}</repoToken>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.5</version>
                <configuration>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <useReleaseProfile>true</useReleaseProfile>
                    <releaseProfiles>release</releaseProfiles>
                    <goals>deploy</goals>
                </configuration>
            </plugin>

            <plugin>
                <artifactId>maven-jar-plugin</artifactId>
                <version>2.5</version>
                <configuration>
                    <archive>
                        <addMavenDescriptor>false</addMavenDescriptor>
                        <manifest>
                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>        
        </plugins>
    </build>
</project>

如您所见,我没有使用maven-deploy-plugin.您知道警告的意思吗?

AS you can see, I am not using the maven-deploy-plugin. Do you know what the warning means?

编辑:在评论中,建议我修复settings.xml文件中的错误.这是我这样做后的新输出:

In the comments, it was suggested that I fix the error in the settings.xml file. This is the new output after I did so:

[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] 

还有其他想法吗?

谢谢!

推荐答案

windows->首选项-> maven->用户设置->现在可以提供settings.xml的正确位置 mavenfolder中存在的setting.xml文件 C:\ Program Files \ apache-maven-3.5.3 \ conf \ settings.xml

windows -> preferences->maven->user setting-> now give correct location of settings.xml setting.xml file which present in mavenfolder C:\Program Files\apache-maven-3.5.3\conf\settings.xml

这篇关于警告org.apache.maven.plugins的'build.plugins.plugin.version':缺少maven-deploy-plugin的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆