Maven:报告插件org.apache.maven.plugins:maven-project-info-reports-plugin具有空版本 [英] Maven: Report plugin org.apache.maven.plugins:maven-project-info-reports-plugin has an empty version

查看:171
本文介绍了Maven:报告插件org.apache.maven.plugins:maven-project-info-reports-plugin具有空版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I have a Maven 2 project which I build with the following parameters:

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

我在构建日志中看到以下警告消息:

I see the following warning message in the build log:

[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的部分:

The part of the pom.xml section with 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部分中添加:

I tried to explicitly include in the dependencies section:

...
<dependency>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <version>2.7</version>
</dependency>
...

但是它不能解决我的问题.我仍然在日志中看到警告消息.

But it did not resolve my issue. I still see the warning message in the log.

推荐答案

plugin部分中包含有关maven-project-info-reports-plugin的信息(例如,还指定了maven-resources-plugin):

Include info for the maven-project-info-reports-plugin in the plugin section (where for example also the maven-resources-plugin is specified):

<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具有空版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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