Java 警告';build.plugins.plugin.version';对于org.apache.maven.plugins:缺少maven部署插件

Java 警告';build.plugins.plugin.version';对于org.apache.maven.plugins:缺少maven部署插件,java,maven,warnings,maven-central,Java,Maven,Warnings,Maven Central,我成功地将Maven工件部署到中央存储库。但是,我在运行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

我成功地将Maven工件部署到中央存储库。但是,我在运行
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] 
还有其他想法吗


谢谢

windows->preferences->maven->user setting->现在给出settings.xml的正确位置 设置mavenfolder中存在的.xml文件
警告中提到的C:\Program Files\apache-maven-3.5.3\conf\settings.xml

org.apache.maven.plugins:maven deploy plugin丢失。
并且您的
settings.xml
中存在问题,如图所示:
[INFO][warning]在构建有效设置时遇到一些问题[INFO][warning]无法识别的标记:“activateByDefault”(位置:START_tag seen…\n…@261:32)@/usr/bin/apache-maven-3.3.9/conf/settings.xml,第261行,第32列[信息][警告]
Right!我已经在
settings.xml
文件中修复了这个问题。首先,您需要修复settings.xml文件中的错误,该文件不应该是maven发行版中的错误……或者最好用原始文件替换。如果需要自定义settings.xml,请将其放入用户主页
$home/.m2/settings.xml
。因此,您认为如果我在
settings.xml
文件中修复该错误,它将使用
maven deploy插件
修复警告?我修复了
settings.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>
[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]