سؤال

I am using Ivy for dependency managment.

I have problems with

  • maven-findbgs-plugin:plugin:1.3.1
    • maven-cobertura-plugin:plugin:1.3

There were several topics on SO about this:e.g. Maven Dependencies can't be resolved

The answer is to exclude jaxen:

    <dependency org="org.jdom" name="jdom" rev="2.0.2">
        <exclude module="jaxen"/>
    </dependency>

I tried to exclude these dependencies, but then got another problem:

unresolved dependency: asm#asm;2.0: java.text.ParseException: inconsistent module descriptor file found in 'http://repo1.maven.org/maven2/asm/asm/2.0/asm-2.0.pom': bad revision: expected='2.0' found='@product.version@';

Here is ivy.xml:

<?xml version="1.0" encoding="ISO-8859-1"?>
<ivy-module version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd">

    <info
        organisation="organisation"
        module="module"
        status="integration">
    </info>

    <dependencies>
        <dependency org="dom4j" name="dom4j" rev="1.6.1"/>

        <dependency org="org.jdom" name="jdom" rev="2.0.2">
            <exclude module="jaxen"/>
        </dependency>

        <dependency org="org.apache.poi" name="poi" rev="3.8"/> 
        <dependency org="org.apache.poi" name="poi-ooxml" rev="3.8"/>
        <dependency org="org.apache.poi" name="ooxml-schemas" rev="1.1"/>
        <dependency org="junit" name="junit" rev="4.10"/>
        <dependency org="org.mockito" name="mockito-all" rev="1.9.0"/>
        <dependency org="maven-plugins" name="maven-cobertura-plugin" rev="1.1" />
    </dependencies>

</ivy-module>

What should I to do?

هل كانت مفيدة؟

المحلول

First I see that you are using a really old version of maven-cobertura-plugin (1.3) the current version is 2.5.1.
Furthermore the pom you are accessing is one of those artifacts in Maven Central which are simply of bad quality which means in this case simply unusable.
The maven-findbugs-plugin you are referencing is also really old. Current version is 2.5.2 in contradiction to 1.3.1 which you are using.
What I don't understand is why are you trying to resolve Maven Plugins because you are running Ivy and following from that you are using Ant.

نصائح أخرى

Here is working ivy.xml

<ivy-module version="2.0">
    <info organisation="it.cup2000" module="sar"/>
    <configurations defaultconfmapping="runtime->*">
        <conf name="runtime" />
        <conf name="compile" extends="runtime"/>
        <conf name="test" extends="compile"/>
    </configurations>       
    <dependencies>
        <dependency org="org.jdom" name="jdom2" rev="2.0.3"/>
        <exclude org="maven-plugins" module="maven-cobertura-plugin"/>
        <exclude org="maven-plugins" module="maven-findbugs-plugin"/>
    </dependencies>
</ivy-module>

The jdom2 dependency triggers the problem and the two exclude fix it

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top