Ivy - Can't download because POM file and the JAR file name aren't matching patterns

后端 未结 1 1392
南旧
南旧 2020-12-11 10:51

me again with IVY.

The problem now is that the ivy file the POM file to the JSON library is called:

http://repo1.maven.org/maven2/net/sf/json-lib/json-lib/2.

相关标签:
1条回答
  • It's called a classifier attribute in Maven. Try declaring your dependency as follows:

    <ivy-module version='2.0' xmlns:m="http://ant.apache.org/ivy/maven">
        ..
        <dependencies>
            ..
            <dependency org="net.sf.json-lib" name="json-lib" rev="2.4"> 
                <artifact name="json-lib" type="jar" m:classifier="jdk13"/>
            </dependency>
            ..
        </dependencies>
    </ivy-module>
    

    This will retrieve the associated artifact rather than the default primary artifact from the Maven module.

    Update

    This ivy dependency declaration is functionally the same as the following in Maven

    <dependency>
      <groupId>net.sf.json-lib</groupId>
      <artifactId>json-lib</artifactId>
      <version>2.4</version>
      <classifier>jdk13</classifier>
    </dependency>
    
    0 讨论(0)
提交回复
热议问题