Cobertura maven插件版本不正确

时间:2013-07-29 12:21:43

标签: maven cobertura

我正在使用cobertura,当我指定版本2.5时,它会下载1.9。为什么呢?

我的pom:                                                                     org.codehaus.mojo                     的Cobertura,Maven的插件                     2.5.2                                                                                                            ZA / CO / C2D / * / 的.class                                                                                                                                                      清洁                             前现场                                                              清洁                                                                                                            仪器                             现场                                                              仪器                                 的Cobertura                                                                                                                       

<reporting>
    <plugins>
        <plugin>
            <!-- use mvn cobertura:cobertura to generate cobertura reports -->
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>cobertura-maven-plugin</artifactId>
            <version>2.5.2</version>
            <configuration>
                <formats>
                    <format>html</format>
                    <format>xml</format>
                </formats>
            </configuration>
        </plugin>
    </plugins>
</reporting>

输出: [INFO] --- cobertura-maven-plugin:2.5.2:instrument(default-cli)@ services --- 正在下载:http://repo1.maven.org/maven2/net/sourceforge/cobertura/cobertura/1.9.4.1/cobertura-1.9.4.1.pom

当我运行它然后打破 [错误] net.sourceforge.cobertura.javancss.parser.ParseException:遇到“”&gt;“”&gt; “”

据我了解,这已在2.0.2版中修复。

2 个答案:

答案 0 :(得分:0)

当然你不能不能在括号内指定版本......你能解释一下项目层次结构的更多内容吗?和你的完整pom.xml?

答案 1 :(得分:0)

这是因为您指定了 cobertura-maven-plugin 的版本,这是与 cobertura 包不同的jar

插件2.5.2使用内部cobertura版本1.9.4.1,如http://mojo.codehaus.org/cobertura-maven-plugin/

中所述