gpt4 book ai didi

Maven:报告插件 org.apache.maven.plugins:maven-project-info-reports-plugin has a empty version

转载 作者:行者123 更新时间:2023-12-03 12:42:28 25 4
gpt4 key购买 nike

我有一个使用以下参数构建的 Maven 2 项目:

-B -f <path to pom.xml> clean site -P <several profiles>

我在构建日志中看到以下警告消息:
[INFO] --- maven-resources-plugin:2.6:resources (default) @ autotest ---
[INFO] Copying 1 resource
[INFO] Copying 1 resource
[INFO] skip non existing resourceDirectory C:\Jenkins\workspace\selfTests\${localProfile}
[INFO] [INFO] Using 'UTF-8' encoding to copy filtered resources.

[INFO] --- maven-resources-plugin:2.6:testResources (default) @ autotest ---
[INFO] Copying 29 resources
[WARNING] Report plugin org.apache.maven.plugins:maven-project-info-reports-plugin has an empty version.
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[INFO] configuring report plugin org.apache.maven.plugins:maven-project-info-reports-plugin:2.7
[INFO] Relativizing decoration links with respect to project URL: http://maven.apache.org
[INFO] Rendering site with org.apache.maven.skins:maven-default-skin:jar:1.0 skin.
[INFO] Generating "Cobertura Test Coverage" report --- cobertura-maven-plugin:2.6
[INFO] Cobertura 2.0.3 - GNU GPL License (NO WARRANTY) - See COPYRIGHT file

pom.xml 部分带有 org.apache.maven.plugins 的部分:
...
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<phase>test</phase>
<goals>
<goal>resources</goal>
<goal>testResources</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>2.5</version>
<configuration>
<filesets>
<fileset>
<directory>src/main/generated-groovy-stubs</directory>
</fileset>
</filesets>
</configuration>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.8</version>
</plugin>
...

我试图明确包含在 dependencies 中部分:
...
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.7</version>
</dependency>
...

但它没有解决我的问题。我仍然在日志中看到警告消息。

最佳答案

包括 maven-project-info-reports-plugin 的信息在 plugin部分(例如还指定了 maven-resources-plugin):

<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<phase>test</phase>
<goals>
<goal>resources</goal>
<goal>testResources</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.7</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>2.5</version>
<configuration>
<filesets>
<fileset>
<directory>src/main/generated-groovy-stubs</directory>
</fileset>
</filesets>
</configuration>
</plugin>
</plugins>

关于Maven:报告插件 org.apache.maven.plugins:maven-project-info-reports-plugin has a empty version,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18734650/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com